]> git.donarmstrong.com Git - biopieces.git/commitdiff
changed options of read_solexa and read_fastq - undocumented
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 4 Sep 2009 15:05:29 +0000 (15:05 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 4 Sep 2009 15:05:29 +0000 (15:05 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@653 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/read_fastq
bp_bin/read_solexa

index 262bfde5b3bdee45f47b071cd96a8ce7f09aa60c..5173aba2ce35dd8b05400fe339b7b0a5e6d9e6aa 100755 (executable)
@@ -40,10 +40,11 @@ my ( $options, $in, $out, $record, $data_in, $num, $entry );
 
 $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 => 'skip_quality', short => 's', type => 'flag',   mandatory => 'no', default => undef, 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 => 'convert2dec', short => 'c', type => 'flag',   mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+        { long => 'cutoff',      short => 'C', type => 'int',    mandatory => 'no', default => 20,    allowed => undef, disallowed => undef },
+        { long => 'soft_mask',   short => 's', type => 'flag',   mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
     ]   
 );
 
@@ -64,6 +65,8 @@ if ( $options->{ 'data_in' } )
     {
         if ( $record = Maasha::Fastq::fastq2biopiece( $entry ) )
         {
+            Maasha::Fastq::softmask_phred_str( $record->{ 'SEQ' }, $record->{ 'SCORES' }, $options->{ 'cutoff' } ) if $options->{ 'soft_mask' };
+
             Maasha::Biopieces::put_record( $record, $out );
         }
 
index 0d93142097d3df871c735a55728d357a5b156411..b7a56396ed9393033fcfd34458aeb5ec6cd1de2e 100755 (executable)
@@ -42,11 +42,11 @@ my ( $options, $in, $out, $record, $data_in, $num, $entry, @seqs, @scores, $i );
 
 $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 => 'skip_quality', short => 's', type => 'flag',   mandatory => 'no', default => undef,   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 => 'convert2dec', short => 'c', type => 'flag',   mandatory => 'no', default => undef,   allowed => undef, disallowed => undef },
+        { long => 'cutoff',      short => 'C', type => 'int',    mandatory => 'no', default => 20,      allowed => undef, disallowed => undef },
+        { long => 'soft_mask',   short => 's', type => 'flag',   mandatory => 'no', default => undef,   allowed => undef, disallowed => undef },
     ]   
 );
 
@@ -67,6 +67,8 @@ if ( $options->{ 'data_in' } )
     {
         if ( $record = Maasha::Fastq::fastq2biopiece( $entry ) )
         {
+            Maasha::Fastq::softmask_solexa_str( $record->{ 'SEQ' }, $record->{ 'SCORES' }, $options->{ 'cutoff' } ) if $options->{ 'soft_mask' };
+
             Maasha::Biopieces::put_record( $record, $out );
         }