diff multigps.xml @ 2:91127c200437 draft

Uploaded
author iuc
date Mon, 03 Apr 2017 11:21:10 -0400
parents 944dcc240ab2
children d78ff3764fe5
line wrap: on
line diff
--- a/multigps.xml	Tue Mar 28 12:24:07 2017 -0400
+++ b/multigps.xml	Mon Apr 03 11:21:10 2017 -0400
@@ -1,31 +1,53 @@
-<tool id="multigps" name="MultiGPS" version="0.73.0">
+<tool id="multigps" name="MultiGPS" version="0.74.0">
     <description>analyzes collections of multi-condition ChIP-seq data</description>
     <macros>
         <import>macros.xml</import>
     </macros>
     <requirements>
-        <requirement type="package" version="0.73">multigps</requirement>
+        <requirement type="package" version="0.74">multigps</requirement>
     </requirements>
     <command detect_errors="aggressive">
         <![CDATA[
-            #set output_dir = $output_html.files_path
-            mkdir -p $output_dir &&
-            multigps
+            python $__tool_directory__/multigps.py
             ## General options
+            #set single_or_multi_expt = $single_or_multi_expt_cond.single_or_multi_expt
+            #if str($single_or_multi_expt) == 'multi':
+                #for $i in $single_or_multi_expt_cond['input_items']:
+                    #set file_name = $i['input']
+                    #set label_cond = $i['label_cond']
+                    #set label = $label_cond.label
+                    #set file_format = $i['input'].ext
+                    #set condition_name = $i['condition_name']
+                    #set replicate_name = 'None'
+                    #set experiment_type = $i['experiment_type']
+                    #set fixed_read_count = $i['fixedreadcount']
+                    #if str($label) == 'Signal':
+                        #set replicate_name = $label_cond['replicate_name']
+                    #else if str($label) == 'Control':
+                        #set rncond = $label_cond['replicate_name_cond']
+                        #if str($rncond['specify_replicate_name']) == 'yes':
+                            #set replicate_name = $rncond['replicate_name']
+                        #end if
+                    #end if
+                    --input_item '$file_name' '$label' '$file_format' '$condition_name' '$replicate_name' '$experiment_type' '$fixed_read_count'
+                #end for
+            #else:
+                #set expt = $single_or_multi_expt_cond.expt
+                #set control = $single_or_multi_expt_cond.control
+                --expt '$expt'
+                --format $expt.ext
+                #if str($control) != 'None':
+                    --control '$control'
+                #end if
+            #end if
             ## Append .txt extensions to events hrefs
             ## in output dataset so files will render
             ## in the browser.
-            --eventsaretxt
-            ## Do not run the parallel version of meme
-            ## since it is not yet available in conda.
-            --meme1proc
-            --expt '$expt'
-            --format $expt.ext
-            #if str($ctrl) != 'None':
-                --ctrl '$ctrl'
-            #end if
+            --eventsaretxt 'true'
+            ## Do not run the parallel version of meme.
+            --meme1proc 'true'
             --threads \${GALAXY_SLOTS:-4}
-            --geninfo '$chromInfo'
+            --chrom_len_file '$chromInfo'
             ## Advanced options
             #set aoc = $advanced_options_cond
             #if str($aoc.advanced_options) == 'display':
@@ -39,9 +61,9 @@
                     #set rgc = $umc.reference_genome_cond
                     --seq
                     #if str($rgc.reference_genome_source) == 'cached':
-		        '${rgc.reference_genome.fields.path}'
+                        '${rgc.reference_genome.fields.path}'
                     #else:
-		        '${rgc.reference_genome}'
+                        '${rgc.reference_genome}'
                     #end if
                 #end if
                 ## Limits on how many reads
@@ -49,11 +71,11 @@
                     --fixedpb $rloc.fixedpb
                     --poissongausspb $rloc.poissongausspb
                     #if str($rloc.nonunique) == 'yes':
-                        --nonunique
+                        --nonunique 'true'
                     #end if
                     --mappability $rloc.mappability
                     #if str($rloc.nocache) == 'yes':
-                        --nocache
+                        --nocache 'true'
                     #end if
                 #end if
                 ## Scaling data
@@ -80,27 +102,27 @@
                 #end if
                 ## Running MultiGPS
                 #if str($aoc.readdistributionfile) != 'None':
-                    --d '$aoc.readdistributionfile'
+                    --readdistributionfile '$aoc.readdistributionfile'
                 #end if
-                --r $aoc.maxtrainingrounds
+                --maxtrainingrounds $aoc.maxtrainingrounds
                 #if str($aoc.nomodelupdate) == 'no':
-                    --nomodelupdate
+                    --nomodelupdate 'true'
                 #end if
                 --minmodelupdateevents $aoc.minmodelupdateevents
                 #if str($bmsc.nomodelsmoothing) == 'no':
-                    --nomodelsmoothing
+                    --nomodelsmoothing 'true'
                 #else:
                     --splinesmoothparam $bmsc.splinesmoothparam
                 #end if
                 #if str($gmsc.gaussmodelsmoothing) == 'yes':
-                    --gaussmodelsmoothing
+                    --gaussmodelsmoothing 'true'
                     --gausssmoothparam $gmsc.gausssmoothparam
                 #end if
                 #if str($aoc.jointinmodel) == 'yes':
-                    --jointinmodel
+                    --jointinmodel 'true'
                 #end if
                 #if str($aoc.fixedmodelrange) == 'yes':
-                    --fixedmodelrange
+                    --fixedmodelrange 'true'
                 #end if
                 --prlogconf $aoc.prlogconf
                 #if $aoc.fixedalpha > 0:
@@ -108,7 +130,7 @@
                 #end if
                 --alphascale $aoc.alphascale
                 #if str($aoc.mlconfignotshared) == 'no':
-                    --mlconfignotshared
+                    --mlconfignotshared 'true'
                 #end if
                 #if str($aoc.exclude) != 'None':
                     --exclude '$aoc.exclude'
@@ -119,7 +141,7 @@
                     #if str($mpc.multigps_priors) == 'yes':
                         #set bmc = $mpc.both_motifs_cond
                         #if str($mpc.noposprior) == 'no':
-                            --noposprior
+                            --noposprior 'true'
                         #end if
                         --probshared $mpc.probshared
                         #if str($bmc.nomotifs) == 'yes':
@@ -127,41 +149,86 @@
                             --mememinw $bmc.mememinw
                             --mememaxw $bmc.mememaxw
                         #else:
-                            #set mfoc = $bmc.nomotifprior_cond
-                            --nomotifs
-                            --nomotifprior $mfoc.nomotifprior
-                            #if str($mfoc.nomotifprior) == 'yes':
-                                --memenmotifs $mfoc.memenmotifs
-                                --mememinw $mfoc.mememinw
-                                --mememaxw $mfoc.mememaxw
+                            #set nmpc = $bmc.nomotifprior_cond
+                            --nomotifs 'true'
+                            #if str($nmpc.nomotifprior) == 'yes':
+                                --nomotifprior 'true'
+                                --memenmotifs $nmpc.memenmotifs
+                                --mememinw $nmpc.mememinw
+                                --mememaxw $nmpc.mememaxw
                             #end if
                         #end if
                     #end if
                 #end if
                 ## Reporting binding events
                 #if str($rbec.report_binding_events) == 'yes':
-                    --q $rbec.minqvalue
+                    --minqvalue $rbec.minqvalue
                     --minfold $rbec.minfold
                     #if str($rbec.nodifftests) == 'no':
-                        --nodifftests
+                        --nodifftests 'true'
                     #end if
                     --edgerod $rbec.edgerod
                     --diffp $rbec.diffp
                 #end if
             #end if
-            2>&1
-            --out '$output_html.files_path'
-            && cp $output_dir/*.events.txt '$experiment_events'
-            && mv $output_dir/*.html '$output_html'
-            && mv $output_dir/*.table.txt '$all_events_table'
-            && mv $output_dir/*.counts '$replicates_counts'
+            --output_html_files_path '$output_html.files_path'
+            --replicates_counts '$replicates_counts'
+            --output_bed '$output_bed'
+            --output_html '$output_html'
+            --all_events_table '$all_events_table'
         ]]>
     </command>
     <inputs>
-        <param name="expt" type="data" format="bam,bed,scidx" label="Run MultiGPS on">
-            <validator type="unspecified_build" />
-        </param>
-        <param name="ctrl" type="data" format="bam,bed,scidx" optional="True" label="Optional file containing reads from a control experiment" help="Must be same forat as the input above" />
+        <conditional name="single_or_multi_expt_cond">
+            <param name="single_or_multi_expt" type="select" label="Run MultiGPS on single or multiple inputs?">
+                <option value="multi" selected="True">Multiple inputs</option>
+                <option value="single">Single input</option>
+            </param>
+            <when value="multi">
+                <repeat name="input_items" title="Input files, attributes and options" min="2">
+                    <param name="input" type="data" format="bam,bed,scidx" label="Run multigps on" help="Supported formats are bam, bed and scidx">
+                        <validator type="unspecified_build" />
+                    </param>
+                    <conditional name="label_cond">
+                        <param name="label" type="select" label="This experiment is">
+                            <option value="Signal" selected="True">Signal</option>
+                            <option value="Control">Control</option>
+                        </param>
+                        <when value="Signal">
+                            <param name="replicate_name" type="text" label="Replicate name" />
+                        </when>
+                        <when value="Control">
+                            <conditional name="replicate_name_cond">
+                                <param  name="specify_replicate_name" type="select" label="Specify replicate name?" help="Optional for control experiments.  If used, the control will only be used for the corresponding named signal replicate">
+                                    <option value="no" selected="True">No</option>
+                                    <option value="yes">Yes</option>
+                                </param>
+                                <when value="yes">
+                                    <param name="replicate_name" type="text" optional="True" label="Replicate name"/>
+                                </when>
+                                <when value="no" />
+                            </conditional>
+                        </when>
+                    </conditional>
+                    <param name="condition_name" type="text" label="Condition name" />
+                    <param name="experiment_type" type="select" label="Experiment type for this replicate">
+                        <option value="None" selected="True">Do not set</option>
+                        <option value="chipseq">ChIP-seq</option>
+                        <option value="chipexo">ChIP-exo</option>
+                    </param>
+                    <param  name="fixedreadcount" type="select" label="Use fixed per-base read count limit for this replicate?" help="Selecting No uses a global per-base limit that is estimated from a Poisson distribution.">
+                        <option value="None" selected="True">No</option>
+                        <option value="P">Yes</option>
+                    </param>
+                </repeat>
+            </when>
+            <when value="single">
+                <param name="expt" type="data" format="bam,bed,scidx" label="Run MultiGPS on">
+                    <validator type="unspecified_build" />
+                </param>
+                <param name="control" type="data" format="bam,bed,scidx" optional="True" label="Optional file containing reads from a control experiment" help="Must be same forat as the input above" />
+            </when>
+        </conditional>
         <!-- Advanced options -->
         <conditional name="advanced_options_cond">
             <param name="advanced_options" type="select" label="Advanced options">
@@ -282,7 +349,7 @@
                             <when value="cached">
                                 <param name="reference_genome" type="select" label="Using reference genome">
                                     <options from_data_table="all_fasta">
-                                        <filter type="data_meta" key="dbkey" ref="expt" column="1"/>
+                                        <!-- <filter type="data_meta" key="dbkey" ref="expt" column="1"/> does not yet work in a repeat...-->
                                     </options>
                                     <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
                                 </param>
@@ -290,7 +357,7 @@
                             <when value="history">
                                 <param name="reference_genome" type="data" format="fasta" label="Using reference genome">
                                     <options>
-                                        <filter type="data_meta" key="dbkey" ref="expt"/>
+                                        <!-- <filter type="data_meta" key="dbkey" ref="expt"/> does not yet work in a repeat...-->
                                     </options>
                                     <validator type="no_options" message="The current history does not include a fasta dataset with the build associated with the selected input file"/>
                                 </param>
@@ -358,26 +425,28 @@
         </conditional>
     </inputs>
     <outputs>
-        <data name="replicates_counts" format="tabular" label="${tool.name} replicates counts on ${on_string}"/>
-        <data name="all_events_table" format="tabular" label="${tool.name} all events table on ${on_string}"/>
-        <data name="experiment_events" format="tabular" label="${tool.name} experiment events on ${on_string}"/>
-        <data name="output_html" format="html" label="${tool.name} on ${on_string}"/>
+        <data name="output_bed" format="bed" label="${tool.name} (bed) on ${on_string}"/>
+        <data name="output_html" format="html" label="${tool.name} (html) on ${on_string}"/>
+        <data name="replicates_counts" format="tabular" label="${tool.name} (replicates counts) on ${on_string}"/>
+        <data name="all_events_table" format="tabular" label="${tool.name} (all events table) on ${on_string}"/>
     </outputs>
     <tests>
         <test>
+            <param name="single_or_multi_expt" value="single" />
             <param name="expt" value="expt_hg19.scidx" ftype="scidx" dbkey="hg19" />
-            <param name="advanced_options_cond" value="hide" />
+            <param name="advanced_options" value="hide" />
             <output name="output_html" file="hg19_output_html1.html" ftype="html" compare="contains"/>
-            <output name="experiment_events" file="hg19_experiment_events1.tabular" ftype="tabular"/>
+            <output name="output_bed" file="hg19_output_bed1.bed" ftype="bed"/>
             <output name="all_events_table" file="hg19_all_events_table1.tabular" ftype="tabular"/>
             <output name="replicates_counts" file="hg19_replicates_counts1.tabular" ftype="tabular"/>
         </test>
         <test>
+            <param name="single_or_multi_expt" value="single" />
             <param name="expt" value="expt_hg19.scidx" ftype="scidx" dbkey="hg19" />
-            <param name="ctrl" value="cntrl_hg19.scidx" ftype="scidx" dbkey="hg19" />
-            <param name="advanced_options_cond" value="display" />
+            <param name="control" value="cntrl_hg19.scidx" ftype="scidx" dbkey="hg19" />
+            <param name="advanced_options" value="display" />
             <output name="output_html" file="hg19_output_html2.html" ftype="html" compare="contains"/>
-            <output name="experiment_events" file="hg19_experiment_events2.tabular" ftype="tabular"/>
+            <output name="output_bed" file="hg19_output_bed2.bed" ftype="bed"/>
             <output name="all_events_table" file="hg19_all_events_table2.tabular" ftype="tabular"/>
             <output name="replicates_counts" file="hg19_replicates_counts2.tabular" ftype="tabular"/>
         </test>