]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/plot_matches
refactoring of assemble_pairs
[biopieces.git] / bp_bin / plot_matches
index ef0780c0d7d65c66529c75dd7d3fc5130a147386..59148d7688b70b6befc33d2e6c9db37b2bac55b1 100755 (executable)
@@ -40,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(
     [
@@ -113,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";