From: martinahansen Date: Tue, 16 Jun 2009 10:08:17 +0000 (+0000) Subject: added VMATCH support to get_genome_seq X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ab3910b065f7e4272222552924ab0ceb17290b96;p=biopieces.git added VMATCH support to get_genome_seq git-svn-id: http://biopieces.googlecode.com/svn/trunk@534 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/bp_bin/get_genome_seq b/bp_bin/get_genome_seq index 737469d..c2874e3 100755 --- a/bp_bin/get_genome_seq +++ b/bp_bin/get_genome_seq @@ -104,7 +104,6 @@ if ( $options->{ "genome" } ) } } - while ( $record = Maasha::Biopieces::get_record( $in ) ) { if ( $options->{ "genome" } and not $record->{ "SEQ" } ) @@ -123,6 +122,13 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) $beg = $record->{ "S_BEG" } + $index_beg; $len = $record->{ "S_END" } - $record->{ "S_BEG" } + 1; } + elsif ( $record->{ "REC_TYPE" } eq "VMATCH" and exists $lookup_hash{ $record->{ "S_ID" } } ) + { + ( $index_beg, $index_len ) = @{ $lookup_hash{ $record->{ "S_ID" } } }; + + $beg = $record->{ "S_BEG" } + $index_beg; + $len = $record->{ "S_END" } - $record->{ "S_BEG" } + 1; + } elsif ( $record->{ "REC_TYPE" } eq "BLAST" and exists $lookup_hash{ $record->{ "S_ID" } } ) { ( $index_beg, $index_len ) = @{ $lookup_hash{ $record->{ "S_ID" } } };