X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fread_gff;h=140321958a12dda44cc61f50d156c3611d25f157;hb=5de6112b70b59420b245ce636a8b2e3c90acbe00;hp=411c2a6d1b6b556876f1dd5efe3289f20693ff01;hpb=7831048f78fe7aadd60c660733959634ebc38591;p=biopieces.git diff --git a/bp_bin/read_gff b/bp_bin/read_gff index 411c2a6..1403219 100755 --- a/bp_bin/read_gff +++ b/bp_bin/read_gff @@ -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::Filesys; @@ -35,7 +36,7 @@ use Maasha::GFF; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $data_in, $num, $entry ); +my ( $options, $in, $out, $record, $data_in, $num, $entry ); $options = Maasha::Biopieces::parse_options( [ @@ -57,9 +58,11 @@ if ( $options->{ 'data_in' } ) $num = 1; - while ( $entry = Maasha::GFF::get_entry( $data_in ) ) + while ( $entry = Maasha::GFF::gff_entry_get( $data_in ) ) { - Maasha::Biopieces::put_record( $entry, $out ); + if ( $record = Maasha::GFF::gff2biopiece( $entry ) ) { + Maasha::Biopieces::put_record( $record, $out ); + } last if $options->{ "num" } and $num == $options->{ "num" }; @@ -69,25 +72,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); }