$options = Maasha::Biopieces::parse_options(
[
- { long => 'data_in', short => 'i', type => 'files!', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
- { long => 'num', short => 'n', type => 'uint', mandatory => 'no', default => undef, allowed => undef, disallowed => 0 },
- { long => 'quality', short => 'q', type => 'uint', mandatory => 'no', default => 20, allowed => undef, disallowed => undef },
+ { long => 'data_in', short => 'i', type => 'files!', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+ { long => 'num', short => 'n', type => 'uint', mandatory => 'no', default => undef, allowed => undef, disallowed => 0 },
+ { long => 'quality', short => 'q', type => 'uint', mandatory => 'no', default => 20, allowed => undef, disallowed => undef },
+ { long => 'skip_scores', short => 's', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
]
);
{
if ( $record = Maasha::Fastq::fastq2biopiece( $entry ) )
{
- Maasha::Fastq::lowercase_low_scores( $record->{ 'SEQ' }, $record->{ 'SCORES' }, $options->{ 'quality' } );
+ if ( not $options->{ 'skip_scores' } )
+ {
+ Maasha::Fastq::lowercase_low_scores( $record->{ 'SEQ' }, $record->{ 'SCORES' }, $options->{ 'quality' } );
- $record->{ 'SCORES' } =~ s/(.)/ord( $1 ) - 33 . ";"/ge; # http://maq.sourceforge.net/fastq.shtml
- $record->{ 'SCORE_MEAN' } = sprintf( "%.2f", Maasha::Calc::mean( [ split /;/, $record->{ 'SCORES' } ] ) );
+ $record->{ 'SCORES' } =~ s/(.)/ord( $1 ) - 33 . ";"/ge; # http://maq.sourceforge.net/fastq.shtml
+ $record->{ 'SCORE_MEAN' } = sprintf( "%.2f", Maasha::Calc::mean( [ split /;/, $record->{ 'SCORES' } ] ) );
+ }
Maasha::Biopieces::put_record( $record, $out );
}
$options = Maasha::Biopieces::parse_options(
[
- { long => 'data_in', short => 'i', type => 'files!', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
- { long => 'num', short => 'n', type => 'uint', mandatory => 'no', default => undef, allowed => undef, disallowed => '0' },
- { long => 'format', short => 'f', type => 'string', mandatory => 'no', default => 'octal', allowed => 'octal,decimal', disallowed => undef },
- { long => 'quality', short => 'q', type => 'uint', mandatory => 'no', default => 20, allowed => undef, disallowed => undef },
+ { long => 'data_in', short => 'i', type => 'files!', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+ { long => 'num', short => 'n', type => 'uint', mandatory => 'no', default => undef, allowed => undef, disallowed => '0' },
+ { long => 'format', short => 'f', type => 'string', mandatory => 'no', default => 'octal', allowed => 'octal,decimal', disallowed => undef },
+ { long => 'quality', short => 'q', type => 'uint', mandatory => 'no', default => 20, allowed => undef, disallowed => undef },
+ { long => 'skip_scores', short => 's', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
]
);
{
if ( $record = Maasha::Fastq::fastq2biopiece( $entry ) )
{
- $record->{ 'SCORES' } =~ s/(\d+) ?/Maasha::Fastq::score2phred( $1 )/ge if $options->{ 'format' } eq 'decimal';
- Maasha::Fastq::solexa2phred( $record->{ 'SCORES' } );
- Maasha::Fastq::lowercase_low_scores( $record->{ 'SEQ' }, $record->{ 'SCORES' }, $options->{ 'quality' } );
-
- $record->{ 'SCORES' } =~ s/(.)/ord( $1 ) - 33 . ";"/ge; # http://maq.sourceforge.net/fastq.shtml
- $record->{ 'SCORE_MEAN' } = sprintf( "%.2f", Maasha::Calc::mean( [ split /;/, $record->{ 'SCORES' } ] ) );
+ if ( not $options->{ 'skip_scores' } )
+ {
+ $record->{ 'SCORES' } =~ s/(\d+) ?/Maasha::Fastq::score2phred( $1 )/ge if $options->{ 'format' } eq 'decimal';
+ Maasha::Fastq::solexa2phred( $record->{ 'SCORES' } );
+ Maasha::Fastq::lowercase_low_scores( $record->{ 'SEQ' }, $record->{ 'SCORES' }, $options->{ 'quality' } );
+
+ $record->{ 'SCORES' } =~ s/(.)/ord( $1 ) - 33 . ";"/ge; # http://maq.sourceforge.net/fastq.shtml
+ $record->{ 'SCORE_MEAN' } = sprintf( "%.2f", Maasha::Calc::mean( [ split /;/, $record->{ 'SCORES' } ] ) );
+ }
Maasha::Biopieces::put_record( $record, $out );
}