]> git.donarmstrong.com Git - biopieces.git/commitdiff
added --logscale_y switch to relevant plot_* biopieces
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 10 Aug 2009 08:30:27 +0000 (08:30 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 10 Aug 2009 08:30:27 +0000 (08:30 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@628 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/plot_chrdist
bp_bin/plot_histogram
bp_bin/plot_lendist
bp_bin/plot_phastcons_profiles
code_perl/Maasha/Plot.pm

index 9e3ba416f1b3c45864a7448b9118dc26f38833aa..7d1572106956d713998c3652bc2c9698d0fe0fac 100755 (executable)
@@ -42,12 +42,13 @@ $terminals = "dumb,x11,aqua,post,svg";
 
 $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 => 'terminal',  short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
-        { long => 'title',     short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
-        { long => 'xlabel',    short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'ylabel',    short => 'Y', type => 'string', mandatory => 'no',  default => undef,    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 => 'terminal',   short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
+        { long => 'title',      short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
+        { long => 'xlabel',     short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'ylabel',     short => 'Y', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'logscale_y', short => 'L', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
     ]   
 );
 
index 4950305b8aede84ba0a131644860836bb992abd0..7308c1973ebf38873ed122be8ac0f21e1bf36335 100755 (executable)
@@ -42,14 +42,15 @@ $terminals = "dumb,x11,aqua,post,svg";
 
 $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 => 'key',       short => 'k', type => 'string', mandatory => 'yes', default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'terminal',  short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
-        { long => 'title',     short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
-        { long => 'xlabel',    short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'ylabel',    short => 'Y', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'sort',      short => 's', type => 'string', mandatory => 'no',  default => 'alph',   allowed => 'num,alph', 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 => 'key',        short => 'k', type => 'string', mandatory => 'yes', default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'terminal',   short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
+        { long => 'title',      short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
+        { long => 'xlabel',     short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'ylabel',     short => 'Y', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'sort',       short => 's', type => 'string', mandatory => 'no',  default => 'alph',   allowed => 'num,alph', disallowed => undef },
+        { long => 'logscale_y', short => 'L', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
     ]   
 );
 
index dfc0abb390dfeb60f91eaceb9333658dd135e3f0..58f9145fbcad051eb4ef9a19b4475ea9df4b5088 100755 (executable)
@@ -43,13 +43,14 @@ $terminals = "dumb,x11,aqua,post,svg";
 
 $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 => 'key',       short => 'k', type => 'string', mandatory => 'yes', default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'terminal',  short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
-        { long => 'title',     short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
-        { long => 'xlabel',    short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'ylabel',    short => 'Y', type => 'string', mandatory => 'no',  default => undef,    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 => 'key',        short => 'k', type => 'string', mandatory => 'yes', default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'terminal',   short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
+        { long => 'title',      short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
+        { long => 'xlabel',     short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'ylabel',     short => 'Y', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'logscale_y', short => 'L', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
     ]   
 );
 
index 82db05615e68b84eb264b83f2e0a59099c61c22f..0fb79d133ecc977689ee70d475e72e3ceaeac943 100755 (executable)
@@ -46,16 +46,17 @@ $terminals = "dumb,x11,aqua,post,svg";
 
 $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 => 'genome',    short => 'g', type => 'genome', mandatory => 'yes', default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'mean',      short => 'm', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'median',    short => 'M', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'flank',     short => 'f', type => 'uint',   mandatory => 'no',  default => 0,        allowed => undef,      disallowed => undef },
-        { long => 'terminal',  short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
-        { long => 'title',     short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
-        { long => 'xlabel',    short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
-        { long => 'ylabel',    short => 'Y', type => 'string', mandatory => 'no',  default => undef,    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 => 'genome',     short => 'g', type => 'genome', mandatory => 'yes', default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'mean',       short => 'm', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'median',     short => 'M', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'flank',      short => 'f', type => 'uint',   mandatory => 'no',  default => 0,        allowed => undef,      disallowed => undef },
+        { long => 'terminal',   short => 't', type => 'string', mandatory => 'no',  default => 'dumb',   allowed => $terminals, disallowed => undef },
+        { long => 'title',      short => 'T', type => 'string', mandatory => 'no',  default => $default, allowed => undef,      disallowed => undef },
+        { long => 'xlabel',     short => 'X', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'ylabel',     short => 'Y', type => 'string', mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
+        { long => 'logscale_y', short => 'L', type => 'flag',   mandatory => 'no',  default => undef,    allowed => undef,      disallowed => undef },
     ]   
 );
 
index 94d542bb4e389cc1f35df12fa883a695c6ab6d76..22968f3c8a62d4748441c3a15bcc7b5c93d86d0b 100644 (file)
@@ -90,6 +90,7 @@ sub lineplot_simple
     print $fh_in "set title \"$options->{ 'title' }\"\n"   if $options->{ "title" };
     print $fh_in "set xlabel \"$options->{ 'xlabel' }\"\n" if $options->{ "xlabel" };
     print $fh_in "set ylabel \"$options->{ 'ylabel' }\"\n" if $options->{ "ylabel" };
+    print $fh_in "set logscale y\n"                        if $options->{ "logscale_y" };
     print $fh_in "set grid\n"                              if not $options->{ "terminal" } eq "dumb";
     print $fh_in "set autoscale\n";
     print $fh_in "unset key\n";
@@ -150,6 +151,7 @@ sub histogram_simple
     print $fh_in "set title \"$options->{ 'title' }\"\n"   if $options->{ "title" };
     print $fh_in "set xlabel \"$options->{ 'xlabel' }\"\n" if $options->{ "xlabel" };
     print $fh_in "set ylabel \"$options->{ 'ylabel' }\"\n" if $options->{ "ylabel" };
+    print $fh_in "set logscale y\n"                        if $options->{ "logscale_y" };
     print $fh_in "set autoscale\n";
     print $fh_in "unset key\n";
     print $fh_in "set style fill solid\n";
@@ -227,6 +229,7 @@ sub histogram_lendist
     print $fh_in "set title \"$options->{ 'title' }\"\n"   if $options->{ "title" };
     print $fh_in "set xlabel \"$options->{ 'xlabel' }\"\n" if $options->{ "xlabel" };
     print $fh_in "set ylabel \"$options->{ 'ylabel' }\"\n" if $options->{ "ylabel" };
+    print $fh_in "set logscale y\n"                        if $options->{ "logscale_y" };
     print $fh_in "set autoscale\n";
     print $fh_in "unset key\n";
     print $fh_in "set style fill solid\n";
@@ -284,6 +287,7 @@ sub histogram_chrdist
     print $fh_in "set title \"$options->{ 'title' }\"\n"   if $options->{ "title" };
     print $fh_in "set xlabel \"$options->{ 'xlabel' }\"\n" if $options->{ "xlabel" };
     print $fh_in "set ylabel \"$options->{ 'ylabel' }\"\n" if $options->{ "ylabel" };
+    print $fh_in "set logscale y\n"                        if $options->{ "logscale_y" };
     print $fh_in "set autoscale\n";
     print $fh_in "unset key\n";
     print $fh_in "set style fill solid\n";