X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fplot_matches;h=59148d7688b70b6befc33d2e6c9db37b2bac55b1;hb=48bea5c28b89dc5586d0bddb338ccd6ba23aa1f9;hp=3aa016efb19f7c99f791d70518c90272a5f3edce;hpb=5aed4676ad1bf35abbade6215ac90ee591e6d8fe;p=biopieces.git diff --git a/bp_bin/plot_matches b/bp_bin/plot_matches index 3aa016e..59148d7 100755 --- a/bp_bin/plot_matches +++ b/bp_bin/plot_matches @@ -26,6 +26,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +use warnings; use strict; use Maasha::Biopieces; use Maasha::Plot; @@ -39,7 +40,7 @@ use IPC::Open2; my ( $options, $in, $out, $default, $terminals, $record, @data, $fh, $result, %data_hash, $tmp_dir ); $default = "plot_matches"; -$terminals = "dumb,x11,aqua,post,svg"; +$terminals = "dumb,x11,aqua,post,svg,png"; $options = Maasha::Biopieces::parse_options( [ @@ -112,7 +113,7 @@ sub dotplot_matches foreach $match ( @{ $matches } ) { - if ( $match->{ "DIR" } =~ /^f/ ) + if ( ($match->{ "DIR" } and $match->{ "DIR" } =~ /^f/) or ($match->{ "STRAND" } and $match->{ "STRAND" } eq '+') ) { print $fh_forward join( "\t", $match->{ "Q_BEG" } + 1, $match->{ "S_BEG" } + 1 ), "\n"; print $fh_forward join( "\t", $match->{ "Q_END" } + 1, $match->{ "S_END" } + 1 ), "\n"; @@ -135,7 +136,7 @@ sub dotplot_matches close $fh_forward; close $fh_backward; - $cmd = "gnuplot"; + $cmd = "gnuplot -persist"; $pid = open2( $fh_out, $fh_in, $cmd );