Handle interactive and non-interactive modes more elegantly.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4009 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
a7409df1a6
commit
6037443e55
|
|
@ -1,13 +1,15 @@
|
||||||
source(paste(Sys.getenv("STING_DIR"), "/R/gsacommons.R", sep=""));
|
source(paste(Sys.getenv("STING_DIR"), "/R/gsacommons.R", sep=""));
|
||||||
|
|
||||||
args = commandArgs(TRUE);
|
if (interactive()) {
|
||||||
|
if (!exists("plotRoot")) {
|
||||||
|
plotRoot = "test.plot";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
args = commandArgs(TRUE);
|
||||||
|
|
||||||
evalRoot = args[1];
|
evalRoot = args[1];
|
||||||
#if (is.na(evalRoot)) { evalRoot = "/home/radon01/kiran/scr1/projects/ESPGabrielDownsampling/results/v1/merged.vcf.eval120/eval"; }
|
plotRoot = args[2];
|
||||||
if (is.na(evalRoot)) { evalRoot = "/home/radon01/kiran/scr1/projects/ESPGabrielDownsampling/results/v1/merged.vcf.eval.v2/eval"; }
|
}
|
||||||
|
|
||||||
plotRoot = args[2];
|
|
||||||
if (is.na(plotRoot)) { plotRoot = "plot"; }
|
|
||||||
|
|
||||||
eval = read.eval(evalRoot);
|
eval = read.eval(evalRoot);
|
||||||
|
|
||||||
|
|
@ -56,6 +58,6 @@ plot.titvSpectrum(eval, novelty_name="novel");
|
||||||
plot.end(plotRoot);
|
plot.end(plotRoot);
|
||||||
|
|
||||||
# Per-sample
|
# Per-sample
|
||||||
plot.begin(plotRoot, "variants_per_sample", width=12, height=8);
|
#plot.begin(plotRoot, "variants_per_sample", width=12, height=8);
|
||||||
plot.variantsPerSample(eval);
|
#plot.variantsPerSample(eval);
|
||||||
plot.end(plotRoot);
|
#plot.end(plotRoot);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue