view release on metacpan or search on metacpan
generated from [GTExV8](https://www.gtexportal.org/home/) data for 54 human tissues, and
**genomic-variations** such as SNVs and Indels from [1KGP](https://www.internationalgenome.org/)
and gene fusions from [COSMIC](https://cancer.sanger.ac.uk/cosmic).
For full documentation, please visit <https://galantelab.github.io/sandy/>.
## Features
* Simulate DNA and RNA sequencing
Simulate **single-end** (long and short fragments) and **paired-end** sequencing reads for
**genome** and **transcriptome** analysis. The simulation can be customized with raffle seed,
sequencing coverage, number of reads, fragment mean, output formats (`fastq`, `sam` and their
compressed versions `fastq.gz` and `bam`), sequence identifier (header of entries in `fastq`)
and much more.
* Sequencer **quality-profile**
**Sandy** generates `fastq` quality entries that mimic the [Illumina](https://www.illumina.com/),
[PacBio](https://www.pacb.com/) and [Nanopore](https://nanoporetech.com/) sequencers, as well as
generating the *phred-score* using a statistical model based on the *poisson* distribution.
* RNA-Seq **expression-matrix**
lib/App/Sandy/Command/Genome.pm view on Meta::CPAN
'seed' => time,
'verbose' => 0,
'prefix' => 'out',
'output-dir' => '.',
'jobs' => 1,
'count-loops-by' => 'coverage',
'coverage' => 8,
'strand-bias' => 'random',
'seqid-weight' => 'length',
'sequencing-type' => 'paired-end',
'fragment-mean' => 300,
'fragment-stdd' => 50,
'sequencing-error' => 0.001,
'read-mean' => 100,
'read-stdd' => 0,
'quality-profile' => 'poisson',
'join-paired-ends' => 0,
'output-format' => 'fastq.gz',
'compression-level' => 6
}
sub rm_opt {
lib/App/Sandy/Command/Genome.pm view on Meta::CPAN
-q, --quality-profile sequencing system profiles from quality
database [default:"poisson"]
-e, --sequencing-error sequencing error rate for poisson
[default:"0.001"; Number]
-m, --read-mean read mean size for poisson
[default:"100"; Integer]
-d, --read-stdd read standard deviation size for poisson
[default:"0"; Integer]
-t, --sequencing-type single-end or paired-end reads
[default:"paired-end"]
-M, --fragment-mean the fragment mean size for paired-end reads
[default:"300"; Integer]
-D, --fragment-stdd the fragment standard deviation size for
paired-end reads [default:"50"; Integer]
Genome-specific options:
-c, --coverage genome coverage [default:"8", Number]
-a, --genomic-variation a list of genomic variation entries from
variation database. This option may be passed
multiple times [default:"none"]
-A, --genomic-variation-regex a list of perl-like regex to match genomic
variation entries in variation database.
This option may be passed multiple times
[default:"none"]
=head1 DESCRIPTION
This subcommand simulates genome sequencing reads taking into account the
quality-profile and the genome-variation patterns, along with: raffle
seed; coverage (depth); fragment mean and standard deviation; single-end
(long and short fragments) and paired-end sequencing type; bam, sam,
fastq.gz and fastq output formats and more.
=head2 INPUT
I<sandy genome> expects as argument a fasta file with chromosome sequences.
For example, L<the GENCODE human genome|https://www.gencodegenes.org/human/>
GRCh38.p13 fasta file.
=head2 OUTPUT
lib/App/Sandy/Command/Genome.pm view on Meta::CPAN
B<Paired-end specific escape characters>
----------------------------------------------------------------------------
Escape Meaning
----------------------------------------------------------------------------
%T mate read start position
%N mate read end position
%A mate read start position regarding reference genome ***
%B mate read end position regarding reference genome ***
%D distance between the paired-reads
%M fragment mean
%D fragment standard deviation
%f fragment size
%F fragment strand
%S fragment start position
%E fragment end position
%X fragment start position regarding reference genome ***
%Z fragment end position regarding reference genome ***
----------------------------------------------------------------------------
*** specific for genomic variation (genome simulation only)
=item B<--jobs>
Sets the number of child jobs to be created
=item B<--seed>
Sets the seed of the base generator. The ability to set the seed is
lib/App/Sandy/Command/Genome.pm view on Meta::CPAN
=item B<--coverage>
Calculates the number of reads based on the genome
coverage: number_of_reads = (sequence_size * coverage) / read_size.
This is the default option for genome sequencing simulation
=item B<--sequencing-type>
Sets the sequencing type to single-end or paired-end
=item B<--fragment-mean>
If the sequencing-type is set to paired-end, it sets the
fragment mean
=item B<--fragment-stdd>
If the sequencing-type is set to paired-end, it sets the
fragment standard deviation
=item B<--sequencing-error>
Sets the sequencing error rate if quality-profile is equal to 'poisson'.
Valid values are between zero and one
=item B<--quality-profile>
Sets the sequencing system profile for quality. The default value is a poisson
distribution, but the user can choose among several profiles stored into the
lib/App/Sandy/Command/Transcriptome.pm view on Meta::CPAN
'seed' => time,
'verbose' => 0,
'prefix' => 'out',
'output-dir' => '.',
'jobs' => 1,
'count-loops-by' => 'number-of-reads',
'number-of-reads' => 1000000,
'strand-bias' => 'minus',
'seqid-weight' => 'length',
'sequencing-type' => 'paired-end',
'fragment-mean' => 300,
'fragment-stdd' => 50,
'sequencing-error' => 0.001,
'read-mean' => 100,
'read-stdd' => 0,
'quality-profile' => 'poisson',
'join-paired-ends' => 0,
'output-format' => 'fastq.gz',
'compression-level' => 6
}
sub rm_opt {
lib/App/Sandy/Command/Transcriptome.pm view on Meta::CPAN
-q, --quality-profile sequencing system profiles from quality
database [default:"poisson"]
-e, --sequencing-error sequencing error rate for poisson
[default:"0.001"; Number]
-m, --read-mean read mean size for poisson
[default:"100"; Integer]
-d, --read-stdd read standard deviation size for poisson
[default:"0"; Integer]
-t, --sequencing-type single-end or paired-end reads
[default:"paired-end"]
-M, --fragment-mean the fragment mean size for paired-end reads
[default:"300"; Integer]
-D, --fragment-stdd the fragment standard deviation size for
paired-end reads [default:"50"; Integer]
Transcriptome-specific options:
-n, --number-of-reads set the number of reads
[default:"1000000", Integer]
-f, --expression-matrix an expression-matrix entry from database
=head1 DESCRIPTION
This subcommand simulates transcriptome sequencing reads taking into account
the quality-profile and the expression-matrix weights, along with: raffle
seed; number of reads; fragment mean and standard deviation; single-end
(long and short fragments) and paired-end sequencing type; bam, sam,
fastq.gz and fastq output formats and more.
=head2 INPUT
I<sandy transcriptome> expects as argument a fasta file with transcript sequences.
For example, L<the GENCODE human genome|https://www.gencodegenes.org/human/>
transcript sequences and protein-coding transcript sequences.
=head2 OUTPUT
lib/App/Sandy/Command/Transcriptome.pm view on Meta::CPAN
B<Paired-end specific escape characters>
----------------------------------------------------------------------------
Escape Meaning
----------------------------------------------------------------------------
%T mate read start position
%N mate read end position
%A mate read start position regarding reference genome ***
%B mate read end position regarding reference genome ***
%D distance between the paired-reads
%M fragment mean
%D fragment standard deviation
%f fragment size
%F fragment strand
%S fragment start position
%E fragment end position
%X fragment start position regarding reference genome ***
%Z fragment end position regarding reference genome ***
----------------------------------------------------------------------------
*** specific for genomic variation (genome simulation only)
=item B<--jobs>
Sets the number of child jobs to be created
=item B<--seed>
Sets the seed of the base generator. The ability to set the seed is
lib/App/Sandy/Command/Transcriptome.pm view on Meta::CPAN
Sets the read mean if quality-profile is equal to 'poisson'. The
quality-profile from database overrides the read-size
=item B<--read-stdd>
Sets the read standard deviation if quality-profile is equal to
'poisson'. The quality-profile from database overrides the read-stdd
=item B<--number-of-reads>
Sets the number of reads desired for each fragment end. That means,
it will be the number of reads for each pair - 1 x N reads for single-end
and 2 x N reads for paired-end. This is the default option for transcriptome
sequencing simulation
=item B<--sequencing-type>
Sets the sequencing type to single-end or paired-end
=item B<--fragment-mean>
If the sequencing-type is set to paired-end, it sets the
fragment mean
=item B<--fragment-stdd>
If the sequencing-type is set to paired-end, it sets the
fragment standard deviation
=item B<--sequencing-error>
Sets the sequencing error rate if quality-profile is equal to 'poisson'.
Valid values are between zero and one
=item B<--quality-profile>
Sets the sequencing system profile for quality. The default value is a poisson
distribution, but the user can choose among several profiles stored into the
lib/App/Sandy/DB/Handle/Quality.pm view on Meta::CPAN
my $schema = App::Sandy::DB->schema;
my %report = %{ &DEFAULT_PROFILE };
my $rs = $schema->resultset('QualityProfile')->search(undef);
while (my $quality = $rs->next) {
my %hash = (
'mean' => $quality->mean,
'stdd' => $quality->stdd,
'error' => $quality->error,
'type' => $quality->is_single_molecule ? 'single-molecule' : 'fragment',
'source' => $quality->source,
'provider' => $quality->is_user_provided ? "user" : "vendor",
'date' => $quality->date
);
$report{$quality->name} = \%hash;
}
return \%report;
}
lib/App/Sandy/Read/PairedEnd.pm view on Meta::CPAN
# ABSTRACT: App::Sandy::Read subclass for simulate paired-end reads.
use App::Sandy::Base 'class';
use constant NUM_TRIES => 1000;
extends 'App::Sandy::Read';
our $VERSION = '0.25'; # VERSION
has 'fragment_mean' => (
is => 'ro',
isa => 'My:IntGt0',
required => 1
);
has 'fragment_stdd' => (
is => 'ro',
isa => 'My:IntGe0',
required => 1
);
sub gen_read {
my ($self, $ptable, $ptable_size, $read_size, $is_leader, $rng, $blacklist) = @_;
unless ($read_size <= $self->fragment_mean && $self->fragment_mean <= $ptable_size) {
croak sprintf
"read_size (%d) must be leseer or equal to fragment_mean (%d) and\n" .
"fragment_mean (%d) must be lesser or equal to ptable_size (%d)"
=> $read_size, $self->fragment_mean, $self->fragment_mean, $ptable_size;
}
my $fragment_size = 0;
my $random_tries = 0;
until (($fragment_size <= $ptable_size) && ($fragment_size >= $read_size)) {
# ptable_size must be greater or equal to fragment_size and
# fragment_size must be greater or equal to read_size
# As fragment_size is randomly calculated, try out NUM_TRIES times
if (++$random_tries > NUM_TRIES) {
croak sprintf
"So many tries to calculate a fragment. the constraints were not met:\n" .
"fragment_size <= ptable_size (%d) and fragment_size >= read_size (%d)"
=> $ptable_size, $read_size;
}
$fragment_size = $rng->get_norm($self->fragment_mean, $self->fragment_stdd);
}
# Build the fragment string
my ($fragment_ref, $attr) = $self->subseq_rand_ptable($ptable,
$ptable_size, $fragment_size, $read_size, $rng, $blacklist);
# Catch R1 substring
my $read1_ref = $self->subseq($fragment_ref, $fragment_size, $read_size, 0);
@$attr{qw/start1 end1/} = ($attr->{start}, $attr->{start} + $read_size - 1);
# Insert sequencing error
$attr->{error1} = $self->insert_sequencing_error($read1_ref, $read_size, $rng);
# Catch R2 substring
my $read2_ref = $self->subseq($fragment_ref, $fragment_size, $read_size,
$fragment_size - $read_size);
@$attr{qw/start2 end2/} = ($attr->{end}, $attr->{end} - $read_size + 1);
# Reverse completement
$self->reverse_complement($read2_ref);
# Insert sequencing error
$attr->{error2} = $self->insert_sequencing_error($read2_ref, $read_size, $rng);
return ($read1_ref, $read2_ref, $attr);
}
lib/App/Sandy/Role/Digest.pm view on Meta::CPAN
'append-id' => 'append-id|i=s',
'output-format' => 'output-format|O=s',
'compression-level' => 'compression-level|x=i',
'join-paired-ends' => 'join-paired-ends|1',
'verbose' => 'verbose|v',
'output-dir' => 'output-dir|o=s',
'jobs' => 'jobs|j=i',
'coverage' => 'coverage|c=f',
'read-mean' => 'read-mean|m=i',
'read-stdd' => 'read-stdd|d=i',
'fragment-mean' => 'fragment-mean|M=i',
'fragment-stdd' => 'fragment-stdd|D=i',
'sequencing-error' => 'sequencing-error|e=f',
'sequencing-type' => 'sequencing-type|t=s',
'quality-profile' => 'quality-profile|q=s',
'strand-bias' => 'strand-bias|b=s',
'seqid-weight' => 'seqid-weight|w=s',
'number-of-reads' => 'number-of-reads|n=i',
'expression-matrix' => 'expression-matrix|f=s',
'genomic-variation' => 'genomic-variation|a=s@',
'genomic-variation-regex' => 'genomic-variation-regex|A=s@'
);
lib/App/Sandy/Role/Digest.pm view on Meta::CPAN
die "Option 'strand-bias' requires one of these arguments: $opt. Not $opts->{'strand-bias'}\n";
}
# sequencing_type (SEQUENCING_TYPE_OPT)
if (not exists $SEQUENCING_TYPE{$opts->{'sequencing-type'}}) {
my $opt = join ', ' => keys %SEQUENCING_TYPE;
die "Option 'sequencing-type' requires one of these arguments: $opt not $opts->{'sequencing-type'}\n";
}
## Dependently validated arguments
# fragment_mean and fragment_stdd
if ($opts->{'sequencing-type'} eq 'paired-end') {
# fragment_mean > 0
if ($opts->{'fragment-mean'} <= 0) {
die "Option 'fragment-mean' requires an integer greater than zero, not $opts->{'fragment-mean'}\n";
}
# fragment_stdd > 0
if ($opts->{'fragment-stdd'} < 0) {
die "Option 'fragment-stdd' requires an integer greater or equal to zero, not $opts->{'fragment-stdd'}\n";
}
# (fragment_mean - fragment_stdd) >= read_mean + read_stdd
if (($opts->{'fragment-mean'} - $opts->{'fragment-stdd'}) < ($opts->{'read-mean'} + $opts->{'read-stdd'})) {
die "Option 'fragment-mean' minus 'fragment-stdd' requires a value greater or equal 'read-mean' plus 'read-stdd', not " .
($opts->{'fragment-mean'} - $opts->{'fragment-stdd'}) . "\n";
}
}
# count-loops-by (COUNT_LOOPS_BY_OPT). The default value is defined into the consuming class
if (not exists $COUNT_LOOPS_BY{$default_opt{'count-loops-by'}}) {
my $opt = join ', ' => keys %COUNT_LOOPS_BY;
die "The provider must define the default count-lopps-by: $opt, not $default_opt{'count-loops-by'}";
}
# If default is 'coverage'
lib/App/Sandy/Role/Digest.pm view on Meta::CPAN
#-------------------------------------------------------------------------------
# Construct the Seq and Simulator classes
#-------------------------------------------------------------------------------
my %paired_end_param = (
template_id => $opts->{'id'},
format => $opts->{'output-format'},
quality_profile => $opts->{'quality-profile'},
sequencing_error => $opts->{'sequencing-error'},
read_mean => $opts->{'read-mean'},
read_stdd => $opts->{'read-stdd'},
fragment_mean => $opts->{'fragment-mean'},
fragment_stdd => $opts->{'fragment-stdd'}
);
my %single_end_param = (
template_id => $opts->{'id'},
format => $opts->{'output-format'},
quality_profile => $opts->{'quality-profile'},
sequencing_error => $opts->{'sequencing-error'},
read_mean => $opts->{'read-mean'},
read_stdd => $opts->{'read-stdd'}
);
lib/App/Sandy/Seq/PairedEnd.pm view on Meta::CPAN
package App::Sandy::Seq::PairedEnd;
# ABSTRACT: App::Sandy::Seq subclass for simulate paired-end entries.
use App::Sandy::Base 'class';
use App::Sandy::Read::PairedEnd;
extends 'App::Sandy::Seq';
our $VERSION = '0.25'; # VERSION
has 'fragment_mean' => (
is => 'ro',
isa => 'My:IntGt0',
required => 1
);
has 'fragment_stdd' => (
is => 'ro',
isa => 'My:IntGe0',
required => 1
);
has '_read' => (
is => 'ro',
isa => 'App::Sandy::Read::PairedEnd',
builder => '_build_read',
lazy_build => 1,
lib/App/Sandy/Seq/PairedEnd.pm view on Meta::CPAN
sub BUILD {
my $self = shift;
## Just to ensure that the lazy attributes are built before &new returns
$self->_read;
}
sub _build_read {
my $self = shift;
App::Sandy::Read::PairedEnd->new(
sequencing_error => $self->sequencing_error,
fragment_mean => $self->fragment_mean,
fragment_stdd => $self->fragment_stdd
);
}
override '_build_sym_table' => sub {
my $self = shift;
my $sym_table = super();
my %sym_table_paired_end = (
'%M' => '$info->{fragment_mean}',
'%D' => '$info->{fragment_stdd}',
'%f' => '$info->{fragment_size}',
'%S' => '$info->{fragment_start}',
'%E' => '$info->{fragment_end}',
'%X' => '$info->{fragment_start_ref}',
'%Z' => '$info->{fragment_end_ref}',
'%F' => '$info->{fragment_strand}',
'%A' => '$info->{mate_start_ref}',
'%B' => '$info->{mate_end_ref}',
'%T' => '$info->{mate_start}',
'%N' => '$info->{mate_end}',
'%L' => '$info->{tlen}',
);
@$sym_table{keys %sym_table_paired_end} = values %sym_table_paired_end;
return $sym_table;
};
override '_build_info' => sub {
my $self = shift;
my $info = super();
my %info_paired_end = (
fragment_mean => $self->fragment_mean,
fragment_stdd => $self->fragment_stdd
);
@$info{keys %info_paired_end} = values %info_paired_end;
return $info;
};
sub sprint_seq {
my ($self, $id, $num, $seq_id, $seq_id_type, $ptable, $ptable_size, $is_leader, $rng, $blacklist) = @_;
my $read_size = $self->_get_read_size($rng);
lib/App/Sandy/Seq/PairedEnd.pm view on Meta::CPAN
$read_size, $is_leader, $rng, $blacklist);
my $annot_a = $attr->{annot};
$self->_set_info(
'id' => $id,
'num' => $num,
'seq_id' => $seq_id,
'seq_id_type' => $seq_id_type,
'read_size' => $read_size,
'fragment_start' => $attr->{start},
'fragment_end' => $attr->{end},
'fragment_start_ref' => $attr->{start_ref},
'fragment_end_ref' => $attr->{end_ref},
'fragment_size' => $attr->{end} - $attr->{start} + 1,
'fragment_strand' => $is_leader ? 'P' : 'M',
'var' => @$annot_a ? join ',' => @$annot_a : 'none'
);
return $is_leader
? ($self->_sprint_seq($read1_ref, $read_size, 1, $attr, 1, $rng), $self->_sprint_seq($read2_ref, $read_size, 2, $attr, 0, $rng))
: ($self->_sprint_seq($read2_ref, $read_size, 1, $attr, 0, $rng), $self->_sprint_seq($read1_ref, $read_size, 2, $attr, 1, $rng));
}
sub _sprint_seq {
my ($self, $read_ref, $read_size, $read_num, $attr, $is_leader, $rng) = @_;
lib/App/Sandy/Simulator.pm view on Meta::CPAN
my $class = ref $self->seq;
if ($class eq 'App::Sandy::Seq::SingleEnd') {
my $read_mean = $self->seq->read_mean;
if ($index_size < $read_mean) {
log_msg ":: Parsing fasta file '$fasta': Seqid sequence length (>$id => $index_size) lesser than required read mean ($read_mean)";
delete $indexed_fasta->{$id};
push @blacklist => $id;
}
} elsif ($class eq 'App::Sandy::Seq::PairedEnd') {
my $fragment_mean = $self->seq->fragment_mean;
if ($index_size < $fragment_mean) {
log_msg ":: Parsing fasta file '$fasta': Seqid sequence length (>$id => $index_size) lesser than required fragment mean ($fragment_mean)";
delete $indexed_fasta->{$id};
push @blacklist => $id;
}
} else {
croak "Unknown option '$class' for sequencing type\n";
}
}
}
unless (%$indexed_fasta) {
lib/App/Sandy/Simulator.pm view on Meta::CPAN
$offset = $pos + 1;
}
if ($init) {
push @stack => [$st, $en];
$len += $en - $st + 1;
}
my $read_len = $class eq 'App::Sandy::Seq::SingleEnd'
? $self->seq->read_mean
: $self->seq->fragment_mean;
if ($len > ($seq_len - $read_len)) {
log_msg ":: Seqid '$id' has too much NNN and will not be used";
delete $indexed_fasta->{$id};
push @blacklist_id => $id;
} else {
$fasta_blacklist{$id} = \@stack;
}
}
lib/App/Sandy/Simulator.pm view on Meta::CPAN
unless ($self->truncate) {
my $class = ref $self->seq;
if ($class eq 'App::Sandy::Seq::SingleEnd') {
if ($new_size < $self->seq->read_mean) {
log_msg ":: Skip '$seq_id:$type': So many deletions resulted in a sequence lesser than the required read-mean";
next;
}
} elsif ($class eq 'App::Sandy::Seq::PairedEnd') {
if ($new_size < $self->seq->fragment_mean) {
log_msg ":: Skip '$seq_id:$type': So many deletions resulted in a sequence lesser than the required fragment mean";
next;
}
} else {
die "No valid options for 'seq'";
}
}
# If all's right
$table_h->{size} = $new_size;
$type_h->{$type} = $table_h;
lib/App/Sandy/Simulator.pm view on Meta::CPAN
# Close files
log_msg ":: Writing and closing output file: @{ $files{$file_class} }";
for my $fh_idx (0..$#fh) {
close $fh[$fh_idx]
or die "Cannot write file $files{$file_class}[$fh_idx]: $!\n";
}
if ($self->count_loops_by eq 'number-of-reads') {
# It is necessary to correct the abundance according to
# fragment sequencing end
my $count_factor = ref($self->seq) eq 'App::Sandy::Seq::PairedEnd'
? 2
: 1;
# Save transcripts
log_msg ":: Saving transcripts count";
my $fh = $self->with_open_w($count_file{transcripts}, 0);
log_msg " => Writing counts to $count_file{transcripts} ...";
for my $id (sort keys %counters) {
share/completions/sandy-completion.bash view on Meta::CPAN
--append-id
--id
--jobs
--seed
--coverage
--sequencing-type
--quality-profile
--sequencing-error
--read-mean
--read-stdd
--fragment-mean
--fragment-stdd
--genomic-variation
--genomic-variation-regex
"
local short_opts="-h -u -v -p -o -O -1 -x -i -I -j -s -t -q -e -m -d -M -D -A -a -c"
case "$prev" in
--genomic-variation|-a)
COMPREPLY=($(compgen -W "$(_sandy_database_option "variation")" -- "$cur"))
;;
share/completions/sandy-completion.bash view on Meta::CPAN
--append-id
--id
--jobs
--seed
--number-of-reads
--sequencing-type
--quality-profile
--sequencing-error
--read-mean
--read-stdd
--fragment-mean
--fragment-stdd
"
local short_opts="-f -h -u -v -p -o -O -1 -x -i -I -j -s -n -t -q -e -m -d -M -D"
case "$prev" in
--expression-matrix|-f)
COMPREPLY=($(compgen -W "$(_sandy_database_option "expression")" -- "$cur"))
;;
--quality-profile|-q)
COMPREPLY=($(compgen -W "$(_sandy_database_option "quality")" -- "$cur"))
share/completions/sandy-completion.zsh view on Meta::CPAN
{'(--compression-level)-x','(-x)--compression-level'}'[speed compression: "1" - compress faster, "9" - compress better]:int:->level'
{'(--append-id)-i','(-i)--append-id'}'[append to the defined template id]:str:'
{'(--id)-I','(-I)--id'}'[overlap the default template id]:str:'
{'(--jobs)-j','(-j)--jobs'}'[number of jobs]:int:'
{'(--seed)-s','(-s)--seed'}'[set the seed of the base generator]:int:'
{'(--sequencing-type)-t','(-t)--sequencing-type'}'[single-end or paired-end reads]:str:(single-end paired-end)'
{'(--quality-profile)-q','(-q)--quality-profile'}'[quality-profile from database]:str:->quality'
{'(--sequencing-error)-e','(-e)--sequencing-error'}'[sequencing error rate for poisson]:float'
{'(--read-mean)-m','(-m)--read-mean'}'[read mean size for poisson]:int:'
{'(--read-stdd)-d','(-d)--read-stdd'}'[read standard deviation size for poisson]:int:'
{'(--fragment-mean)-M','(-M)--fragment-mean'}'[the fragment mean size for paired-end reads]:int:'
{'(--fragment-stdd)-D','(-D)--fragment-stdd'}'[the fragment standard deviation size for paired-end reads]:int:'
'*:files:_files'
)
case $cmd in
genome)
args+=(
{'(*--genomic-variation)*-a','(*-a)*--genomic-variation'}'[a list of genomic variation from database]:str:->variation'
{'(*--genomic-variation-regex)*-A','(*-A)*--genomic-variation-regex'}'[a list of perl-like regex to match variations from database]:str:'
{'(--coverage)-c','(-c)--coverage'}'[fastq-file coverage]:float:'
)
t/lib/TestsFor/App/Sandy/Read/PairedEnd.pm view on Meta::CPAN
my $test = shift;
my $class = ref $test;
$test->SUPER::startup;
$class->mk_classdata('table_read');
}
sub setup : Tests(setup) {
my $test = shift;
my %default_attr = (
fragment_mean => 50,
fragment_stdd => 10
);
$test->SUPER::setup(%default_attr);
my $seq = $test->seq;
$test->table_read(App::Sandy::PieceTable->new(orig => \$seq));
$test->table_read->calculate_logical_offset;
}
sub constructor : Tests(8) {
t/lib/TestsFor/App/Sandy/Read/PairedEnd.pm view on Meta::CPAN
is index($seq, $r1_l1), $attr->{start} - 1,
"Position returned must be equal to index in gen_read (PairEnd -> read1). Try $i";
$read->reverse_complement($r2_ref);
ok index($seq, $$r2_ref) < 0,
"Sequence with error must be outside seq in gen_read (PairEnd -> read2). Try $i";
my $r2_f1 = substr $$r2_ref, 1, $read_size - 1;
ok index($seq, $r2_f1) >= 0,
"Sequence with error (but first char -> err) must be inside seq in gen_read (PairedEnd -> read2). Try $i";
is index($seq, $r2_f1), $attr->{read_start_ref},
"Position returned + fragment size must be equal to index in gen_read (PairEnd -> read2). Try $i";
}
}
t/lib/TestsFor/App/Sandy/Seq/PairedEnd.pm view on Meta::CPAN
my $test = shift;
my $class = ref $test;
$test->SUPER::startup;
$class->mk_classdata('table_read');
}
sub setup : Tests(setup) {
my $test = shift;
my %default_attr = (
fragment_mean => 50,
fragment_stdd => 10,
template_id => 'sr0001 simulation_read length=%r position=%c:%t-%n'
);
$test->SUPER::setup(%default_attr);
my $seq = $test->seq;
$test->table_read(App::Sandy::PieceTable->new(orig => \$seq));
$test->table_read->calculate_logical_offset;
}
sub cleanup : Tests(shutdown) {
t/lib/TestsFor/App/Sandy/Simulator.pm view on Meta::CPAN
)
);
my %sg_paired_end = (
%default_attr,
seq => App::Sandy::Seq::PairedEnd->new(
quality_profile => 'poisson',
read_mean => QUALITY_SIZE,
read_stdd => 0,
sequencing_error => 0.1,
fragment_mean => 50,
fragment_stdd => 10,
template_id => 'sr0001 simulation_read length=%r position=%c:%t-%n',
format => FORMAT
)
);
$test->default_attr(\%default_attr);
$test->default_sg_single_end($test->class_to_test->new(%sg_single_end));
$test->default_sg_paired_end($test->class_to_test->new(%sg_paired_end));
}