X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fread_psl;h=0d7fe35e10270a0909c41fe6c06116eeef4e030d;hb=25a6b40e414b3a6465f18239f37a980d77d6e062;hp=866b99bc3343944eadeaafd60b60ef4788ea49ea;hpb=66938be910a5642b50ddf28991649858b5c36580;p=biopieces.git diff --git a/bp_bin/read_psl b/bp_bin/read_psl index 866b99b..0d7fe35 100755 --- a/bp_bin/read_psl +++ b/bp_bin/read_psl @@ -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; @@ -57,13 +58,16 @@ if ( $options->{ 'data_in' } ) $num = 1; - while ( $record = Maasha::UCSC::PSL::psl_get_entry( $data_in ) ) + while ( $entry = Maasha::UCSC::PSL::psl_entry_get( $data_in ) ) { - Maasha::Biopieces::put_record( $record, $out ); + if ( $record = Maasha::UCSC::PSL::psl2biopiece( $entry ) ) + { + Maasha::Biopieces::put_record( $record, $out ); - last if $options->{ "num" } and $num == $options->{ "num" }; + last if $options->{ "num" } and $num == $options->{ "num" }; - $num++; + $num++; + } } close $data_in;