]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed issues in bwa_seq
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 20 Mar 2012 14:05:03 +0000 (14:05 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 20 Mar 2012 14:05:03 +0000 (14:05 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1772 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/assemble_contigs
bp_bin/bwa_seq

index c2eb8b8f280b73a1faf07ac633114cc1fe72afb5..e19fdc13e96d7c607e3fe828bbcb4ad87c551f90 100755 (executable)
@@ -67,14 +67,15 @@ while ( $record = Maasha::Biopieces::get_record( $in ) )
             $record->{ 'STRAND' } = 'X';
         }
 
-        if ( $record->{ 'S_BEG' } and $record->{ 'S_END' } )
+        if ( defined $record->{ 'S_BEG' } and defined $record->{ 'S_END' } )
         {
             for ( $i = $record->{ 'S_BEG' }; $i <= $record->{ 'S_END' }; $i++ ) {
                 $contig_hash->{ $record->{ 'S_ID' } }->{ $record->{ 'Q_ID' } }->{ $record->{ 'STRAND' } }->[ $i ]++;
             }
         }
 
-        if ( $record->{ 'S_BEG1' } and $record->{ 'S_END1' } and $record->{ 'S_BEG2' } and $record->{ 'S_END2' } )
+        if ( defined $record->{ 'S_BEG1' } and defined $record->{ 'S_END1' } and
+             defined $record->{ 'S_BEG2' } and defined $record->{ 'S_END2' } )
         {
             if ( $options->{ 'bridge' } )
             {
index 80c5b5cc87385d4eeb032b1229cb1722bd26b095..4fd89a253427fa7ab8f24c52785317cbf1fc1de3 100755 (executable)
@@ -116,7 +116,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
 
   Sam.open(tmp_sam, 'r') do |io_sam|
     io_sam.each do |entry|
-      output.puts Sam.to_bp(entry)
+      output.puts Sam.to_bp(entry) unless entry[:RNAME] == '*'
     end
   end
 end