Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cummeRbund to retrieve genes and samples from input metadata. #506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions tools/cummerbund/cummeRbund.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool id="cummeRbund" name="cummeRbund" version="2.16.0">
<tool id="cummeRbund" name="cummeRbund" version="2.16.0+galaxy1" profile="18.09">
<description>visualize Cuffdiff output</description>
<macros>
<import>cummeRbund_macros.xml</import>
Expand All @@ -8,7 +8,6 @@
<requirement type="package" version="1.0.1">r-argparse</requirement>
<requirement type="package" version="2.16.0">bioconductor-cummerbund</requirement>
</requirements>
<code file="cummeRbund_options.py"/>
<command detect_errors="aggressive">
<![CDATA[
#for i, p in enumerate($plots):
Expand All @@ -22,7 +21,8 @@
#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}
#set $gene_id = str($gene.gene_id).split(': ')[0]
--genes $gene_id
#end for
#end if
#elif $p.plot.type == "maplot":
Expand All @@ -32,29 +32,33 @@
#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}
#set $gene_id = str($gene.gene_id).split(': ')[0]
--genes $gene_id
#end for
#end if
#elif $p.plot.type == "heatmap":
--clustering "$p.plot.clustering" $p.plot.labcol $p.plot.labrow $p.plot.border --features $p.plot.features $p.plot.log10
#if len($p.plot.genes) > 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
Expand All @@ -63,7 +67,7 @@
#end for
]]></command>
<inputs>
<param name="input_database" type="data" format="sqlite" label="Select backend database (sqlite)" />
<param name="input_database" type="data" format="cuffdiff.sqlite" label="Select backend database (sqlite)" />
<repeat name="plots" title="Plots">
<param name="width" type="integer" value="1280" label="The width of the image"/>
<param name="height" type="integer" value="960" label="The height of the image"/>
Expand Down Expand Up @@ -109,8 +113,7 @@
<expand macro="multiple_genes_conditional" />
</when>
<when value="volcano">
<param name="x" type="select" label="First sample name for comparison" dynamic_options="get_samples(input_database.dataset.file_name)" />
<param name="y" type="select" label="Second sample name for comparison" dynamic_options="get_samples(input_database.dataset.file_name)" />
<expand macro="xy_selector" />
<expand macro="multiple_genes_conditional" />
</when>
<when value="heatmap">
Expand Down Expand Up @@ -142,15 +145,15 @@
<when value="scatterMatrix" />
<when value="expressionplot">
<expand macro="features_selector" />
<param name="gene_id" type="select" label="Gene ID" dynamic_options="get_genes(input_database.dataset.file_name)" />
<expand macro="gene_selector" />
<param name="draw_summary" type="boolean" truevalue="--summary" falsevalue="" checked="False" label="Draw a 'summary' line with mean FPKM values for each condition?"/>
<param name="error_bars" type="boolean" truevalue="--error_bars" falsevalue="" checked="True" label="Draw error bars?"/>
<expand macro="replicates_checkbox" />
<expand macro="log10_checkbox" />
</when>
<when value="expressionbarplot">
<expand macro="features_selector" />
<param name="gene_id" type="select" label="Gene ID" dynamic_options="get_genes(input_database.dataset.file_name)" />
<expand macro="gene_selector" />
<param name="error_bars" type="boolean" truevalue="--error_bars" falsevalue="" checked="True" label="Draw error bars?"/>
<expand macro="replicates_checkbox" />
<expand macro="log10_checkbox" />
Expand Down
25 changes: 22 additions & 3 deletions tools/cummerbund/cummeRbund_macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,33 @@
<macro name="log10_checkbox">
<param name="log10" type="boolean" truevalue="--log10" falsevalue="" checked="True" label="Apply log10 transformation on FPKM values?"/>
</macro>
<macro name="samples_meta">
<options>
<filter type="data_meta" ref="input_database" key="samples" />
</options>
</macro>
<macro name="genes_meta">
<options>
<filter type="data_meta" ref="input_database" key="genes" />
</options>
</macro>
<macro name="gene_selector">
<param name="gene_id" type="select" label="Gene ID">
<expand macro="genes_meta" />
</param>
</macro>
<macro name="xy_selector">
<param name="x" type="select" label="Sample name for x axis" dynamic_options="get_samples(input_database.dataset.file_name)" />
<param name="y" type="select" label="Sample name for y axis" dynamic_options="get_samples(input_database.dataset.file_name)" />
<param name="x" type="select" label="Sample name for x axis">
<expand macro="samples_meta" />
</param>
<param name="y" type="select" label="Sample name for y axis">
<expand macro="samples_meta" />
</param>
</macro>
<macro name="genes_selector">
<repeat name="genes" title="Genes" min="2">
<!-- Cannot create a heatmap for less than two genes -->
<param name="gene_id" type="select" label="Gene ID" dynamic_options="get_genes(input_database.dataset.file_name)" />
<expand macro="gene_selector" />
</repeat>
</macro>
<macro name="features_selector">
Expand Down
11 changes: 0 additions & 11 deletions tools/cummerbund/cummeRbund_options.py

This file was deleted.