changeset 6:c3b54a4b7741 draft default tip

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