X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Falign_pair_seq;h=7f622f121d397cf0f124830860d3635935f94c5b;hb=c5233962d06d760ad5b5d32b30338fb30117b41b;hp=1f92640b15704b64900ebf52d4def7bdfc57a255;hpb=3424045c3eb23ca9da6241f33cdfa1dd629373db;p=biopieces.git diff --git a/bp_bin/align_pair_seq b/bp_bin/align_pair_seq index 1f92640..7f622f1 100755 --- a/bp_bin/align_pair_seq +++ b/bp_bin/align_pair_seq @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # Copyright (C) 2007-2009 Martin A. Hansen. @@ -26,6 +26,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +use warnings; use strict; use Maasha::Biopieces; use Maasha::AlignTwoSeq; @@ -35,7 +36,7 @@ use Data::Dumper; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my ( $run_time_beg, $run_time_end, $options, $in, $out, $count, $record, @records ); +my ( $options, $in, $out, $count, $record, @records, $space, $matches ); $options = Maasha::Biopieces::parse_options(); @@ -54,11 +55,9 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) if ( $count == 2 ) { - $records[ 0 ]->{ 'SEQ' } = lc $records[ 0 ]->{ 'SEQ' }; - $records[ 1 ]->{ 'SEQ' } = lc $records[ 1 ]->{ 'SEQ' }; - - my $matches = Maasha::AlignTwoSeq::align_two_seq( \$records[ 0 ]->{ 'SEQ' } ,\$records[ 1 ]->{ 'SEQ' } ); + $matches = Maasha::AlignTwoSeq::align_two_seq( { 'Q_SEQ' => \$records[ 0 ]->{ 'SEQ' } , 'S_SEQ' => \$records[ 1 ]->{ 'SEQ' } }, [] ); + Maasha::AlignTwoSeq::shift_case( $matches, \$records[ 0 ]->{ 'SEQ' } ,\$records[ 1 ]->{ 'SEQ' } ); Maasha::AlignTwoSeq::insert_indels( $matches, \$records[ 0 ]->{ 'SEQ' } ,\$records[ 1 ]->{ 'SEQ' } ); map { Maasha::Biopieces::put_record( $_, $out ) } @records; @@ -70,26 +69,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) } } +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< BEGIN { - $run_time_beg = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::log_biopiece(); + Maasha::Biopieces::status_set(); } END { - Maasha::Biopieces::close_stream( $in ); - Maasha::Biopieces::close_stream( $out ); - - $run_time_end = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options ); + Maasha::Biopieces::status_log(); } @@ -97,4 +92,3 @@ END __END__ -