X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Ffold_seq;h=4543920c2f749484ac3dddcd7311a677075780d4;hb=03d0e76c98d4b02f63bb9c03430cc8ad2a6cd354;hp=cb144366855d27eb77ab244e0c7ac79262e5b863;hpb=5a59ed9dbeb22cb93a18a6c08cfb6815d4ee9dc1;p=biopieces.git diff --git a/bp_bin/fold_seq b/bp_bin/fold_seq index cb14436..4543920 100755 --- a/bp_bin/fold_seq +++ b/bp_bin/fold_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; @@ -33,7 +34,7 @@ use Maasha::Biopieces; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $type, $struct, $index ); +my ( $options, $in, $out, $record, $type, $struct, $index ); $options = Maasha::Biopieces::parse_options(); @@ -44,11 +45,9 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) { if ( $record->{ "SEQ" } ) { - if ( not $type ) { - $type = Maasha::Seq::seq_guess_type( $record->{ "SEQ" } ); - } + $type = Maasha::Seq::seq_guess_type( $record->{ "SEQ" } ) if not $type; - if ( $type ne "protein" ) + if ( $type ne "PROTEIN" ) { ( $struct, $index ) = Maasha::Seq::fold_struct_rnafold( $record->{ "SEQ" } ); $record->{ "SEC_STRUCT" } = $struct; @@ -62,25 +61,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) Maasha::Biopieces::put_record( $record, $out ); } +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(); }