From 422763cac75657d7dc01b7b174a04224dea7e124 Mon Sep 17 00:00:00 2001 From: Dave B Date: Fri, 8 Jun 2018 12:48:50 -0400 Subject: [PATCH] Update cummeRbund to retrieve genes and samples from input metadata. --- tools/cummerbund/cummeRbund.xml | 27 ++++++++++++++------------ tools/cummerbund/cummeRbund_macros.xml | 25 +++++++++++++++++++++--- tools/cummerbund/cummeRbund_options.py | 11 ----------- 3 files changed, 37 insertions(+), 26 deletions(-) delete mode 100644 tools/cummerbund/cummeRbund_options.py diff --git a/tools/cummerbund/cummeRbund.xml b/tools/cummerbund/cummeRbund.xml index eae2d086..02cb4b3d 100644 --- a/tools/cummerbund/cummeRbund.xml +++ b/tools/cummerbund/cummeRbund.xml @@ -1,5 +1,5 @@ - + visualize Cuffdiff output cummeRbund_macros.xml @@ -8,7 +8,6 @@ r-argparse bioconductor-cummerbund - 0: --gene_selector #for gene in $p.plot.genes: - --genes ${gene.gene_id} + #set $gene_id = str($gene.gene_id).split(': ')[0] + --genes $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} + #set $gene_id = str($gene.gene_id).split(': ')[0] + --genes $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 + #set $gene_id = str($p.plot.gene_id).split(': ')[0] + --features $p.plot.features $p.plot.error_bars --genes $gene_id $p.plot.replicates $p.plot.log10 #end if #if $p.plot.type == "density": $p.plot.log10 @@ -63,7 +67,7 @@ #end for ]]> - + @@ -109,8 +113,7 @@ - - + @@ -142,7 +145,7 @@ - + @@ -150,7 +153,7 @@ - + diff --git a/tools/cummerbund/cummeRbund_macros.xml b/tools/cummerbund/cummeRbund_macros.xml index aee71742..952ce8db 100644 --- a/tools/cummerbund/cummeRbund_macros.xml +++ b/tools/cummerbund/cummeRbund_macros.xml @@ -6,14 +6,33 @@ + + + + + + + + + + + + + + + - - + + + + + + - + diff --git a/tools/cummerbund/cummeRbund_options.py b/tools/cummerbund/cummeRbund_options.py deleted file mode 100644 index f2e214bd..00000000 --- a/tools/cummerbund/cummeRbund_options.py +++ /dev/null @@ -1,11 +0,0 @@ -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_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 ]