From d6d1ccffc4d007466510ec12469ca16ce3d42f66 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Tue, 20 Mar 2012 14:05:03 +0000 Subject: [PATCH] fixed issues in bwa_seq git-svn-id: http://biopieces.googlecode.com/svn/trunk@1772 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/assemble_contigs | 5 +++-- bp_bin/bwa_seq | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bp_bin/assemble_contigs b/bp_bin/assemble_contigs index c2eb8b8..e19fdc1 100755 --- a/bp_bin/assemble_contigs +++ b/bp_bin/assemble_contigs @@ -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' } ) { diff --git a/bp_bin/bwa_seq b/bp_bin/bwa_seq index 80c5b5c..4fd89a2 100755 --- a/bp_bin/bwa_seq +++ b/bp_bin/bwa_seq @@ -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 -- 2.39.5