Repository 'cummerbund'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/cummerbund

Changeset 6:c3b54a4b7741 (2020-07-06)
Previous changeset 5:78fcfc04fcfe (2017-02-23)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/cummerbund commit f929353ffb0623f2218d7dec459c7da62f3b0d24"
modified:
cummeRbund.R
cummeRbund.xml
cummeRbund_macros.xml
cummeRbund_options.py
test-data/boxplot.png
test-data/dendrogram.png
test-data/density.png
test-data/dispersion.png
test-data/expressionbarplot.png
test-data/expressionplot.png
test-data/fpkmSCV.png
test-data/heatmap.png
test-data/maplot.png
test-data/pca.png
test-data/scatter.png
test-data/scatterMatrix.png
test-data/volcano.png
removed:
test-data/boxplot.txt
test-data/dendrogram.txt
test-data/density.txt
test-data/dispersion.txt
test-data/expressionbarplot.txt
test-data/expressionplot.txt
test-data/fpkmSCV.txt
test-data/heatmap.txt
test-data/maplot.txt
test-data/pca.txt
test-data/scatter.txt
test-data/scatterMatrix.txt
test-data/volcano.txt
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 cummeRbund.R
--- a/cummeRbund.R Thu Feb 23 20:24:03 2017 -0500
+++ b/cummeRbund.R Mon Jul 06 20:25:47 2020 -0400
[
b'@@ -1,44 +1,44 @@\n ## Feature Selection ##\n-options(echo=TRUE)\n-get_features <- function(myGenes, f="gene") {\n+options(echo = TRUE)\n+get_features <- function(my_genes, f = "gene") {\n     if (f == "isoforms")\n-        return(isoforms(myGenes))\n+        return(isoforms(my_genes))\n     else if (f == "tss")\n-        return(TSS(myGenes))\n+        return(TSS(my_genes))\n     else if (f == "cds")\n-        return(CDS(myGenes))\n+        return(CDS(my_genes))\n     else\n-        return(myGenes)\n+        return(my_genes)\n }\n \n ## Main Function ##\n \n library(argparse)\n \n-parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n+parser <- ArgumentParser(description = "Create a plot with cummeRbund")\n \n-parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-parser$add_argument(\'--k\', dest=\'k\', action="store")\n-parser$add_argument(\'--x\', dest=\'x\', action="store")\n-parser$add_argument(\'--y\', dest=\'y\', action="store")\n+parser$add_argument("--type", dest = "plotType", default = "Density", required = TRUE)\n+parser$add_argument("--height", dest = "height", type = "integer", default = 960, required = TRUE)\n+parser$add_argument("--width", dest = "width", type = "integer", default = 1280, required = TRUE)\n+parser$add_argument("--outfile", dest = "filename", default = "plot-unknown-0.png", required = TRUE)\n+parser$add_argument("--input", dest = "input_database", default = "cuffData.db", required = TRUE)\n+parser$add_argument("--smooth", dest = "smooth", action = "store_true", default = FALSE)\n+parser$add_argument("--gene_selector", dest = "gene_selector", action = "store_true", default = FALSE)\n+parser$add_argument("--replicates", dest = "replicates", action = "store_true", default = FALSE)\n+parser$add_argument("--labcol", dest = "labcol", action = "store_true", default = FALSE)\n+parser$add_argument("--labrow", dest = "labrow", action = "store_true", default = FALSE)\n+parser$add_argument("--border", dest = "border", action = "store_true", default = FALSE)\n+parser$add_argument("--summary", dest = "summary", action = "store_true", default = FALSE)\n+parser$add_argument("--count", dest = "count", action = "store_true", default = FALSE)\n+parser$add_argument("--error_bars", dest = "error_bars", action = "store_true", default = FALSE)\n+parser$add_argument("--log10", dest = "log10", action = "store_true", default = FALSE)\n+parser$add_argument("--features", dest = "features", action = "store", default = "gen'..b', args$y)\n-    }\n-    else if (args$plotType == \'heatmap\') {\n-        if (args$gene_selector) {\n-            myGenes <- getGenes(cuff, args$genes)\n+            my_genes <- get_features(getGenes(cuff, args$genes), args$features)\n+        } else {\n+            my_genes <- genes(cuff)\n         }\n-        else {\n-            myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n+        csVolcano(my_genes, args$x, args$y)\n+    } else if (args$plotType == "heatmap") {\n+        if (args$gene_selector) {\n+            my_genes <- getGenes(cuff, args$genes)\n+        } else {\n+            my_genes <- getGenes(cuff, annotation(genes(cuff))[[1]])\n         }\n-        csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-    }\n-    else if (args$plotType == \'cluster\') {\n-        myGenes <- getGenes(cuff, args$genes)\n-        csCluster(get_features(myGenes, args$features), k=args$k)\n-    }\n-    else if (args$plotType == \'dispersion\') {\n+        csHeatmap(get_features(my_genes, args$features), clustering = args$clustering, labCol = args$labcol, labRow = args$labrow, border = args$border, logMode = args$log10)\n+    } else if (args$plotType == "cluster") {\n+        my_genes <- getGenes(cuff, args$genes)\n+        csCluster(get_features(my_genes, args$features), k = args$k)\n+    } else if (args$plotType == "dispersion") {\n         dispersionPlot(genes(cuff))\n-    }\n-    else if (args$plotType == \'fpkmSCV\') {\n+    } else if (args$plotType == "fpkmSCV") {\n         fpkmSCVPlot(genes(cuff))\n-    }\n-    else if (args$plotType == \'scatterMatrix\') {\n+    } else if (args$plotType == "scatterMatrix") {\n         csScatterMatrix(genes(cuff))\n+    } else if (args$plotType == "expressionplot") {\n+        my_genes <- getGenes(cuff, args$genes)\n+        expressionPlot(get_features(my_genes, args$features), drawSummary = args$summary, showErrorbars = args$error_bars, replicates = args$replicates)\n+    } else if (args$plotType == "expressionbarplot") {\n+        my_gene_id <- args$genes\n+        my_genes <- getGenes(cuff, my_gene_id)\n+        expressionBarplot(get_features(my_genes, args$features), showErrorbars = args$error_bars, replicates = args$replicates)\n+    } else if (args$plotType == "mds") {\n+        MDSplot(genes(cuff), replicates = args$replicates)\n+    } else if (args$plotType == "pca") {\n+        PCAplot(genes(cuff), "PC1", "PC2", replicates = args$replicates)\n+    } else if (args$plotType == "maplot") {\n+        MAplot(genes(cuff), args$x, args$y, useCount = args$count)\n+    } else if (args$plotType == "genetrack") {\n+        my_gene <- getGene(cuff, args$genes)\n+        plotTracks(makeGeneRegionTrack(my_gene))\n     }\n-    else if (args$plotType == \'expressionplot\') {\n-        myGenes <- getGenes(cuff, args$genes)\n-        expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-    }\n-    else if (args$plotType == \'expressionbarplot\') {\n-        myGeneId <- args$genes\n-        myGenes <- getGenes(cuff, myGeneId)\n-        expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-    }\n-    else if (args$plotType == \'mds\') {\n-        MDSplot(genes(cuff),replicates=args$replicates)\n-    }\n-    else if (args$plotType == \'pca\') {\n-        PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-    }\n-    else if (args$plotType == \'maplot\') {\n-        MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-    }\n-    else if (args$plotType == \'genetrack\') {\n-        myGene <- getGene(cuff, args$genes)\n-        plotTracks(makeGeneRegionTrack(myGene))\n-    }\n-},error = function(e) {\n-    write(paste("Failed:", e, sep=" "), stderr())\n+}, error = function(e) {\n+    write(paste("Failed:", e, sep = " "), stderr())\n     q("no", 1, TRUE)\n })\n-devname = dev.off()\n+devname <- dev.off()\n+print("cummeRbund finished")\n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 cummeRbund.xml
--- a/cummeRbund.xml Thu Feb 23 20:24:03 2017 -0500
+++ b/cummeRbund.xml Mon Jul 06 20:25:47 2020 -0400
[
b'@@ -1,20 +1,22 @@\n <?xml version="1.0"?>\n-<tool id="cummeRbund" name="cummeRbund" version="2.16.0">\n+<tool id="cummeRbund" name="cummeRbund" version="@TOOL_VERSION@+galaxy1">\n     <description>visualize Cuffdiff output</description>\n     <macros>\n         <import>cummeRbund_macros.xml</import>\n     </macros>\n     <requirements>\n-        <requirement type="package" version="1.0.1">r-argparse</requirement>\n-        <requirement type="package" version="2.16.0">bioconductor-cummerbund</requirement>\n+        <requirement type="package" version="1">fonts-conda-ecosystem</requirement>\n+        <requirement type="package" version="1.0.4">r-argparse</requirement>\n+        <requirement type="package" version="3.4.1">r-base</requirement>\n+        <requirement type="package" version="@TOOL_VERSION@">bioconductor-cummerbund</requirement>\n     </requirements>\n     <code file="cummeRbund_options.py"/>\n     <command detect_errors="aggressive">\n <![CDATA[\n #for i, p in enumerate($plots):\n-    Rscript $__tool_directory__/cummeRbund.R\n-    --input "${input_database}" --width $p.width --height $p.height --type "${p.plot.type}"\n-    --outfile plot-${p.plot.type}-${i}.png\n+    Rscript --vanilla --slave \'$__tool_directory__/cummeRbund.R\'\n+    --input \'$input_database\' --width $p.width --height $p.height --type "${p.plot.type}"\n+    --outfile \'plot-${p.plot.type}-${i}.png\'\n     #if $p.plot.type in ["density", "boxplot", "mds", "pca", "dendrogram"]:\n         $p.plot.replicates\n     #elif $p.plot.type == "scatter":\n@@ -22,7 +24,7 @@\n         #if $p.plot.multiple_genes.multiple_genes_selector == "yes":\n             --features $p.plot.multiple_genes.features --gene_selector\n             #for gene in $p.plot.multiple_genes.genes:\n-                --genes ${gene.gene_id}\n+                --genes \'$gene.gene_id\'\n             #end for\n         #end if\n     #elif $p.plot.type == "maplot":\n@@ -32,7 +34,7 @@\n         #if $p.plot.multiple_genes.multiple_genes_selector == "yes":\n             --features $p.plot.multiple_genes.features --gene_selector\n             #for gene in $p.plot.multiple_genes.genes:\n-                --genes ${gene.gene_id}\n+                --genes \'$gene.gene_id\'\n             #end for\n         #end if\n     #elif $p.plot.type == "heatmap":\n@@ -40,26 +42,26 @@\n         #if len($p.plot.genes) > 0:\n             --gene_selector\n             #for gene in $p.plot.genes:\n-                --genes ${gene.gene_id}\n+                --genes \'$gene.gene_id\'\n             #end for\n         #end if\n     #elif $p.plot.type == "cluster":\n         --features $p.plot.features --k $p.plot.k --iter_max $p.plot.iter_max\n         #if len($p.plot.genes) > 0:\n             #for gene in $p.plot.genes:\n-                --genes ${gene.gene_id}\n+                --genes \'$gene.gene_id\'\n             #end for\n         #end if\n     #elif $p.plot.type in [ "expressionplot", "expressionbarplot" ]:\n         #if $p.plot.type == "expressionplot":\n             $p.plot.draw_summary\n         #end if\n-        --features $p.plot.features $p.plot.error_bars --genes ${p.plot.gene_id} $p.plot.replicates $p.plot.log10\n+        --features $p.plot.features $p.plot.error_bars --genes \'$p.plot.gene_id\' $p.plot.replicates $p.plot.log10\n     #end if\n     #if $p.plot.type == "density":\n         $p.plot.log10\n     #end if\n-    > "${output}" 2>&1 ;\n+    > \'${output}\' 2>&1 ;\n #end for\n ]]></command>\n     <inputs>\n@@ -175,7 +177,8 @@\n                     <param name="y" value="q2" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="maplot.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="maplot-0" ftype="png" file="maplot.png" />\n             </output>\n         </test>\n@@ -190,7 +193,8 @@\n                     <param name="y" value="q2" />\n                 </conditional>\n             <'..b'   </output>\n         </test>\n@@ -244,7 +251,8 @@\n                     <param name="gene_id" value="XLOC_000059" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="expressionplot.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="expressionplot-0" ftype="png" file="expressionplot.png" />\n             </output>\n         </test>\n@@ -259,7 +267,8 @@\n                     <param name="gene_id" value="XLOC_000039" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="expressionbarplot.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="expressionbarplot-0" ftype="png" file="expressionbarplot.png" />\n             </output>\n         </test>\n@@ -278,7 +287,8 @@\n                     </repeat>\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="heatmap.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="heatmap-0" ftype="png" file="heatmap.png" />\n             </output>\n         </test>\n@@ -291,7 +301,8 @@\n                     <param name="type" value="density" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="density.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="density-0" ftype="png" file="density.png" />\n             </output>\n         </test>\n@@ -304,7 +315,8 @@\n                     <param name="type" value="dendrogram" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="dendrogram.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="dendrogram-0" ftype="png" file="dendrogram.png" />\n             </output>\n         </test>\n@@ -319,7 +331,8 @@\n                     <param name="y" value="q2" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="volcano.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="volcano-0" ftype="png" file="volcano.png" />\n             </output>\n         </test>\n@@ -332,7 +345,8 @@\n                     <param name="type" value="boxplot" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="boxplot.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="boxplot-0" ftype="png" file="boxplot.png" />\n             </output>\n         </test>\n@@ -345,7 +359,8 @@\n                     <param name="type" value="fpkmSCV" />\n                 </conditional>\n             </repeat>\n-            <output name="output" ftype="txt" file="fpkmSCV.txt" lines_diff="2">\n+            <output name="output" ftype="txt">\n+                <assert_contents><has_text text="cummeRbund finished" /></assert_contents>\n                 <discovered_dataset designation="fpkmSCV-0" ftype="png" file="fpkmSCV.png" />\n             </output>\n         </test>\n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 cummeRbund_macros.xml
--- a/cummeRbund_macros.xml Thu Feb 23 20:24:03 2017 -0500
+++ b/cummeRbund_macros.xml Mon Jul 06 20:25:47 2020 -0400
b
@@ -1,5 +1,6 @@
 <?xml version="1.0"?>
 <macros>
+    <token name="@TOOL_VERSION@">2.16.0</token>
     <macro name="replicates_checkbox">
         <param name="replicates" type="boolean" truevalue="--replicates" falsevalue="" checked="True" label="Replicates?"/>
     </macro>
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 cummeRbund_options.py
--- a/cummeRbund_options.py Thu Feb 23 20:24:03 2017 -0500
+++ b/cummeRbund_options.py Mon Jul 06 20:25:47 2020 -0400
[
@@ -1,11 +1,13 @@
 import sqlite3
 
-def get_genes( database_path ):
-    conn = sqlite3.connect( database_path )
-    gene_ids = conn.execute( 'SELECT gene_short_name, gene_id FROM genes ORDER BY gene_short_name' )
-    return [ ( gene_id[ 0 ], gene_id[ 1 ], False ) for gene_id in gene_ids ]
+
+def get_genes(database_path):
+    conn = sqlite3.connect(database_path)
+    gene_ids = conn.execute('SELECT gene_short_name, gene_id FROM genes ORDER BY gene_short_name')
+    return [(gene_id[0], gene_id[1], False) for gene_id in gene_ids]
 
-def get_samples( database_path ):
-    conn = sqlite3.connect( database_path )
-    samples = conn.execute( 'SELECT sample_name FROM samples ORDER BY sample_name' )
-    return [ ( sample[ 0 ], sample[ 0 ], False ) for sample in samples ]
+
+def get_samples(database_path):
+    conn = sqlite3.connect(database_path)
+    samples = conn.execute('SELECT sample_name FROM samples ORDER BY sample_name')
+    return [(sample[0], sample[0], False) for sample in samples]
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/boxplot.png
b
Binary file test-data/boxplot.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/boxplot.txt
--- a/test-data/boxplot.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,279 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'object\n-> cuff <- readCufflinks(dir = "", dbFile = args$input_database, rebuild = FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/dendrogram.png
b
Binary file test-data/dendrogram.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/dendrogram.txt
--- a/test-data/dendrogram.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,280 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'rebuild = FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-\'dendrogram\' with 2 branches and 2 members total, at height 0.7672512 \n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/density.png
b
Binary file test-data/density.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/density.txt
--- a/test-data/density.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,281 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Warning message:\n-Removed 128 rows containing non-finite values (stat_density). \n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/dispersion.png
b
Binary file test-data/dispersion.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/dispersion.txt
--- a/test-data/dispersion.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,282 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b' 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Warning messages:\n-1: Transformation introduced infinite values in continuous x-axis \n-2: Transformation introduced infinite values in continuous y-axis \n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/expressionbarplot.png
b
Binary file test-data/expressionbarplot.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/expressionbarplot.txt
--- a/test-data/expressionbarplot.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,311 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'plicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Getting gene information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting isoforms information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting CDS information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting TSS information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting promoter information:\n-\tdistData\n-Getting splicing information:\n-\tdistData\n-Getting relCDS information:\n-\tdistData\n-Scale for \'colour\' is already present. Adding another scale for \'colour\',\n-which will replace the existing scale.\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/expressionplot.png
b
Binary file test-data/expressionplot.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/expressionplot.txt
--- a/test-data/expressionplot.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,309 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b't, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Getting gene information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting isoforms information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting CDS information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting TSS information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting promoter information:\n-\tdistData\n-Getting splicing information:\n-\tdistData\n-Getting relCDS information:\n-\tdistData\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/fpkmSCV.png
b
Binary file test-data/fpkmSCV.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/fpkmSCV.txt
--- a/test-data/fpkmSCV.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,285 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Scale for \'x\' is already present. Adding another scale for \'x\', which will\n-replace the existing scale.\n-`geom_smooth()` using method = \'loess\'\n-Warning message:\n-In .local(object, FPKMLowerBound, ...) :\n-  At least one of your conditions does not have enough replicates to estimate variance. Estimating variance across all conditions instead.\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/heatmap.png
b
Binary file test-data/heatmap.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/heatmap.txt
--- a/test-data/heatmap.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,311 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'ty(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Getting gene information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting isoforms information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting CDS information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting TSS information:\n-\tFPKM\n-\tDifferential Expression Data\n-\tAnnotation Data\n-\tReplicate FPKMs\n-\tCounts\n-Getting promoter information:\n-\tdistData\n-Getting splicing information:\n-\tdistData\n-Getting relCDS information:\n-\tdistData\n-Using tracking_id, sample_name as id variables\n-No id variables; using all as measure variables\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/maplot.png
b
Binary file test-data/maplot.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/maplot.txt
--- a/test-data/maplot.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,281 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'ild = FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Warning message:\n-Removed 52 rows containing missing values (geom_point). \n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/pca.png
b
Binary file test-data/pca.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/pca.txt
--- a/test-data/pca.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,280 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'ile = args$input_database, rebuild = FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-Warning: Ignoring unknown aesthetics: label\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/scatter.png
b
Binary file test-data/scatter.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/scatter.txt
--- a/test-data/scatter.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,279 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'object\n-> cuff <- readCufflinks(dir = "", dbFile = args$input_database, rebuild = FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/scatterMatrix.png
b
Binary file test-data/scatterMatrix.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/scatterMatrix.txt
--- a/test-data/scatterMatrix.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,279 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'object\n-> cuff <- readCufflinks(dir = "", dbFile = args$input_database, rebuild = FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-> devname = dev.off()\n-> \n'
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/volcano.png
b
Binary file test-data/volcano.png has changed
b
diff -r 78fcfc04fcfe -r c3b54a4b7741 test-data/volcano.txt
--- a/test-data/volcano.txt Thu Feb 23 20:24:03 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,279 +0,0 @@\n-> get_features <- function(myGenes, f="gene") {\n-+     if (f == "isoforms")\n-+         return(isoforms(myGenes))\n-+     else if (f == "tss")\n-+         return(TSS(myGenes))\n-+     else if (f == "cds")\n-+         return(CDS(myGenes))\n-+     else\n-+         return(myGenes)\n-+ }\n-> \n-> ## Main Function ##\n-> \n-> library(argparse)\n-Loading required package: proto\n-> \n-> parser <- ArgumentParser(description=\'Create a plot with cummeRbund\')\n-> \n-> parser$add_argument(\'--type\', dest=\'plotType\', default=\'Density\', required=TRUE)\n-> parser$add_argument(\'--height\', dest=\'height\', type=\'integer\', default=960, required=TRUE)\n-> parser$add_argument(\'--width\', dest=\'width\', type=\'integer\', default=1280, required=TRUE)\n-> parser$add_argument(\'--outfile\', dest=\'filename\', default="plot-unknown-0.png", required=TRUE)\n-> parser$add_argument(\'--input\', dest=\'input_database\', default="cuffData.db", required=TRUE)\n-> parser$add_argument(\'--smooth\', dest=\'smooth\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--gene_selector\', dest=\'gene_selector\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--replicates\', dest=\'replicates\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labcol\', dest=\'labcol\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--labrow\', dest=\'labrow\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--border\', dest=\'border\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--summary\', dest=\'summary\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--count\', dest=\'count\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--error_bars\', dest=\'error_bars\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--log10\', dest=\'log10\', action="store_true", default=FALSE)\n-> parser$add_argument(\'--features\', dest=\'features\', action="store", default="genes")\n-> parser$add_argument(\'--clustering\', dest=\'clustering\', action="store", default="both")\n-> parser$add_argument(\'--iter_max\', dest=\'iter_max\', action="store")\n-> parser$add_argument(\'--genes\', dest=\'genes\', action="append")\n-> parser$add_argument(\'--k\', dest=\'k\', action="store")\n-> parser$add_argument(\'--x\', dest=\'x\', action="store")\n-> parser$add_argument(\'--y\', dest=\'y\', action="store")\n-> \n-> args <- parser$parse_args()\n-> \n-> ## Load cummeRbund library\n-> library("cummeRbund")\n-Loading required package: BiocGenerics\n-Loading required package: methods\n-Loading required package: parallel\n-\n-Attaching package: \xe2\x80\x98BiocGenerics\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:parallel\xe2\x80\x99:\n-\n-    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n-    clusterExport, clusterMap, parApply, parCapply, parLapply,\n-    parLapplyLB, parRapply, parSapply, parSapplyLB\n-\n-The following objects are masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    IQR, mad, xtabs\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    anyDuplicated, append, as.data.frame, cbind, colnames, do.call,\n-    duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,\n-    is.unsorted, lapply, lengths, Map, mapply, match, mget, order,\n-    paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,\n-    Reduce, rownames, sapply, setdiff, sort, table, tapply, union,\n-    unique, unsplit, which, which.max, which.min\n-\n-Loading required package: RSQLite\n-Loading required package: DBI\n-Loading required package: ggplot2\n-Loading required package: reshape2\n-Loading required package: fastcluster\n-\n-Attaching package: \xe2\x80\x98fastcluster\xe2\x80\x99\n-\n-The following object is masked from \xe2\x80\x98package:stats\xe2\x80\x99:\n-\n-    hclust\n-\n-Loading required package: rtracklayer\n-Loading required package: GenomicRanges\n-Loading required package: stats4\n-Loading required package: S4Vectors\n-\n-Attaching package: \xe2\x80\x98S4Vectors\xe2\x80\x99\n-\n-The following objects are masked from \xe2\x80\x98package:base\xe2\x80\x99:\n-\n-    colMeans, colSums, expand.grid, rowMeans, rowSums\n-\n-Loading required package: IRanges\n-Loading required package: Genome'..b'object\n-> cuff <- readCufflinks(dir = "", dbFile = args$input_database, rebuild = FALSE)\n-> \n-> ## Print out info\n-> print(cuff)\n-CuffSet instance with:\n-\t 2 samples\n-\t 87 genes\n-\t 90 isoforms\n-\t 88 TSS\n-\t 0 CDS\n-\t 87 promoters\n-\t 88 splicing\n-\t 0 relCDS\n-> sink("cuffdb_info.txt")\n-> print(cuff)\n-> print("SAMPLES:")\n-> samples(cuff)\n-> print("REPLICATES:")\n-> replicates(cuff)\n-> print("FEATURES:")\n-> print(annotation(genes(cuff)))\n-> cat(annotation(genes(cuff))[[1]],sep=",")\n-> sink()\n-> \n-> png(filename = args$filename, width = args$width, height = args$height, type=c(\'cairo-png\'))\n-> tryCatch({\n-+     if (args$plotType == \'density\') {\n-+         csDensity(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'boxplot\') {\n-+         csBoxplot(genes(cuff), replicates=args$replicates, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff), "PC1", "PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'dendrogram\') {\n-+         csDendro(genes(cuff), replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'scatter\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+             csScatter(get_features(myGenes, args$features), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+         else {\n-+             csScatter(genes(cuff), args$x, args$y, smooth=args$smooth, logMode=args$log10)\n-+         }\n-+     }\n-+     else if (args$plotType == \'volcano\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- get_features(getGenes(cuff, args$genes), args$features)\n-+         }\n-+         else {\n-+             myGenes <- genes(cuff)\n-+         }\n-+         csVolcano(myGenes, args$x, args$y)\n-+     }\n-+     else if (args$plotType == \'heatmap\') {\n-+         if (args$gene_selector) {\n-+             myGenes <- getGenes(cuff, args$genes)\n-+         }\n-+         else {\n-+             myGenes <- getGenes(cuff,annotation(genes(cuff))[[1]])\n-+         }\n-+         csHeatmap(get_features(myGenes, args$features), clustering=args$clustering, labCol=args$labcol, labRow=args$labrow, border=args$border, logMode=args$log10)\n-+     }\n-+     else if (args$plotType == \'cluster\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         csCluster(get_features(myGenes, args$features), k=args$k)\n-+     }\n-+     else if (args$plotType == \'dispersion\') {\n-+         dispersionPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'fpkmSCV\') {\n-+         fpkmSCVPlot(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'scatterMatrix\') {\n-+         csScatterMatrix(genes(cuff))\n-+     }\n-+     else if (args$plotType == \'expressionplot\') {\n-+         myGenes <- getGenes(cuff, args$genes)\n-+         expressionPlot(get_features(myGenes, args$features), drawSummary=args$summary, showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'expressionbarplot\') {\n-+         myGeneId <- args$genes\n-+         myGenes <- getGenes(cuff, myGeneId)\n-+         expressionBarplot(get_features(myGenes, args$features), showErrorbars=args$error_bars, replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'mds\') {\n-+         MDSplot(genes(cuff),replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'pca\') {\n-+         PCAplot(genes(cuff),"PC1","PC2", replicates=args$replicates)\n-+     }\n-+     else if (args$plotType == \'maplot\') {\n-+         MAplot(genes(cuff), args$x, args$y, useCount=args$count)\n-+     }\n-+     else if (args$plotType == \'genetrack\') {\n-+         myGene <- getGene(cuff, args$genes)\n-+         plotTracks(makeGeneRegionTrack(myGene))\n-+     }\n-+ },error = function(e) {\n-+     write(paste("Failed:", e, sep=" "), stderr())\n-+     q("no", 1, TRUE)\n-+ })\n-> devname = dev.off()\n-> \n'