X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fwrite_fixedstep;h=17957c1bd978eb34b5b247202f7387b388084374;hb=5de6112b70b59420b245ce636a8b2e3c90acbe00;hp=97f8f2128fccca27e2ffd428593c3bf16c9ef48e;hpb=5aed4676ad1bf35abbade6215ac90ee591e6d8fe;p=biopieces.git diff --git a/bp_bin/write_fixedstep b/bp_bin/write_fixedstep index 97f8f21..17957c1 100755 --- a/bp_bin/write_fixedstep +++ b/bp_bin/write_fixedstep @@ -26,7 +26,9 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +use warnings; use strict; +use Data::Dumper; use Maasha::Biopieces; use Maasha::UCSC::Wiggle; @@ -38,9 +40,11 @@ my ( $options, $in, $out, $fh, $record, $entry ); $options = Maasha::Biopieces::parse_options( [ - { long => 'no_stream', short => 'x', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, - { long => 'data_out', short => 'o', type => 'file', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, - { long => 'compress', short => 'Z', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'key', short => 'k', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'step', short => 's', type => 'uint', mandatory => 'no', default => 1, allowed => undef, disallowed => undef }, + { long => 'no_stream', short => 'x', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'data_out', short => 'o', type => 'file', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'compress', short => 'Z', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, ] ); @@ -51,7 +55,7 @@ $fh = Maasha::Biopieces::write_stream( $options->{ "data_out" }, $options->{ "co while ( $record = Maasha::Biopieces::get_record( $in ) ) { - if ( $entry = Maasha::UCSC::Wiggle::biopiece2fixedstep( $record ) ) { + if ( $entry = Maasha::UCSC::Wiggle::biopiece2fixedstep( $record, $options->{ "key" }, $options->{ "step" } ) ) { Maasha::UCSC::Wiggle::fixedstep_entry_put( $entry, $fh ); }