From efd156731c5756fe6d17f3685dda473592d9e762 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Tue, 18 Aug 2009 09:59:12 +0000 Subject: [PATCH] updated rescan_seq git-svn-id: http://biopieces.googlecode.com/svn/trunk@638 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/rescan_seq | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bp_bin/rescan_seq b/bp_bin/rescan_seq index 22e0596..0e431ee 100755 --- a/bp_bin/rescan_seq +++ b/bp_bin/rescan_seq @@ -37,7 +37,7 @@ use Maasha::Patscan; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my ( $options, $in, $out, $record, $re_data, $re, $matches, $match, %re_hash, $res_enz ); +my ( $options, $in, $out, $record, $re_data, $re, $matches, $match, %re_hash, $res_enz, $new_record ); $options = Maasha::Biopieces::parse_options( [ @@ -70,15 +70,15 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) $matches = Maasha::RestrictEnz::re_scan( $record->{ 'SEQ' }, $re ); - if ( scalar @{ $matches } > 0 ) - { - $record->{ $re->{ 'name' } . "_COUNT" } = scalar @{ $matches }; - $record->{ $re->{ 'name' } . "_MATCHES" } = join( ";", @{ $matches } ) if not $options->{ 'no_matches' }; - } + $new_record->{ 'RE' } = $re->{ 'name' }; + $new_record->{ 'RE_COUNT' } = scalar @{ $matches }; + $new_record->{ 'RE_MATCHES' } = join( ";", @{ $matches } ) if not $options->{ 'no_matches' }; + + Maasha::Biopieces::put_record( $new_record, $out ); } } - Maasha::Biopieces::put_record( $record, $out ); + # Maasha::Biopieces::put_record( $record, $out ); } Maasha::Biopieces::close_stream( $in ); -- 2.39.2