diff trinity.xml @ 20:171b827eadf2 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/trinity commit 9dcdb5348f7439d0ce1e44ed23ad226beb4ae6d4
author iuc
date Thu, 14 Jun 2018 03:11:11 -0400
parents cee61b3fcf78
children c9cfec002f71
line wrap: on
line diff
--- a/trinity.xml	Mon Jan 22 11:26:29 2018 -0500
+++ b/trinity.xml	Thu Jun 14 03:11:11 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="trinity" name="Trinity" version="@WRAPPER_VERSION@.2">
+<tool id="trinity" name="Trinity" version="@WRAPPER_VERSION@">
     <description>de novo assembly of RNA-Seq data</description>
     <macros>
         <import>macros.xml</import>
@@ -22,48 +22,66 @@
         #end if
         Trinity --no_version_check
 
-        ## Inputs.
-        #if $inputs.paired_or_single == "paired":
-
-            --left ${ ','.join(['"%s"' % x for x in $inputs.left_input]) }
-
-            --right ${ ','.join(['"%s"' % x for x in $inputs.right_input]) }
+        ## Inputs
+        #if $pool.pool_mode == "Yes":
+            #if str($pool.inputs.paired_or_single) == "single":
+                --single ${ ','.join(['"%s"' % x for x in $pool.inputs.input]) }
+                #if $pool.inputs.input[0].is_of_type('fasta'):
+                    --seqType fa
+                #else:
+                    --seqType fq
+                #end if
 
-            #if $inputs.left_input[0].is_of_type('fasta'):
-                --seqType fa
-            #else:
-                --seqType fq
-            #end if
+                #if $pool.inputs.strand.is_strand_specific:
+                    --SS_lib_type $pool.inputs.strand.library_type
+                #end if
+            #elif str($pool.inputs.paired_or_single) == "paired":
+                --left ${ ','.join(['"%s"' % x for x in $pool.inputs.left_input]) }
 
-            @COMMAND_PAIRED_STRAND_JACCARD@
-
-        #elif $inputs.paired_or_single == "paired_collection"
-            --left ${ ','.join(['"%s"' % x.forward for x in $inputs.pair_input]) }
-
-            --right ${ ','.join(['"%s"' % x.reverse for x in $inputs.pair_input]) }
+                --right ${ ','.join(['"%s"' % x for x in $pool.inputs.right_input]) }
 
-            #if $inputs.pair_input[0].forward.is_of_type('fasta'):
-                --seqType fa
-            #else:
-                --seqType fq
+                #if $pool.inputs.left_input[0].is_of_type('fasta'):
+                    --seqType fa
+                #else:
+                    --seqType fq
+                #end if
+                @COMMAND_PAIRED_STRAND_JACCARD@
+            #elif str($pool.inputs.paired_or_single) == "paired_collection":
+                --left ${ ','.join(['"%s"' % x.forward for x in $pool.inputs.pair_input]) }
+                --right ${ ','.join(['"%s"' % x.reverse for x in $pool.inputs.pair_input]) }
+                #if $pool.inputs.pair_input[0].forward.is_of_type('fasta'):
+                    --seqType fa
+                #else:
+                    --seqType fq
+                #end if
+                @COMMAND_PAIRED_STRAND_JACCARD@
             #end if
-
-            @COMMAND_PAIRED_STRAND_JACCARD@
+        #elif $pool.pool_mode == "No":
+            #if $pool.inputs.paired_or_single == "unmerged_paired_collection":
+                --left $pool.inputs.pair_input.forward
 
-        #else:
-            --single ${ ','.join(['"%s"' % x for x in $inputs.input]) }
+                --right $pool.inputs.pair_input.reverse
 
-            #if $inputs.input[0].is_of_type('fasta'):
-                --seqType fa
-            #else:
-                --seqType fq
-            #end if
+                #if $pool.inputs.pair_input.forward.is_of_type('fasta'):
+                    --seqType fa
+                #else:
+                    --seqType fq
+                #end if
+                @COMMAND_PAIRED_STRAND_JACCARD@
+            #elif $pool.inputs.paired_or_single == "unmerged_single_collection":
+                --single $pool.inputs.input
 
-            #if $inputs.strand.is_strand_specific:
-                --SS_lib_type $inputs.strand.library_type
+                #if  $pool.inputs.input.is_of_type('fasta'):
+                    --seqType fa
+                #else:
+                    --seqType fq
+                #end if
+
+                #if $pool.inputs.strand.is_strand_specific:
+                    --SS_lib_type $pool.inputs.strand.library_type
+                #end if
             #end if
         #end if
-
         $norm
 
         ## Additional parameters.
@@ -87,7 +105,6 @@
             #if $additional_params.guided.genome_guided_max_intron:
                 --genome_guided_max_intron $additional_params.guided.genome_guided_max_intron
             #end if
-
         #end if
 
         #if $additional_params.min_kmer_cov:
@@ -109,39 +126,71 @@
 
     ]]></command>
     <inputs>
-        <conditional name="inputs">
-            <param name="paired_or_single" type="select" label="Paired or Single-end data?">
-                <option value="single">Single-end</option>
-                <option value="paired" selected="true">Paired-end</option>
-                <option value="paired_collection">Paired-end collection</option>
+        <conditional name="pool">
+            <param name="pool_mode" type="select" label="Are you pooling sequence datasets?" help="" >
+                <option value="No">No</option>
+                <option value="Yes" selected="True">Yes</option>
             </param>
-            <when value="single">
-                <param name="input" argument="--single" type="data" format="fasta,fastqsanger" multiple="true" label="Single-end reads" help=""/>
-                <conditional name="strand">
-                    <param name="is_strand_specific" type="boolean" checked="false" label="Strand specific data"/>
-                    <when value="false">
+            <when value="Yes" >
+                <conditional name="inputs">
+                    <param name="paired_or_single" type="select" label="Paired or Single-end data?">
+                        <option value="single" selected="true">Single-end</option>
+                        <option value="paired">Paired-end</option>
+                        <option value="paired_collection">Paired-end collection</option>
+                    </param>
+                    <when value="single">
+                        <param name="input" argument="--single" type="data" format="fasta,fastqsanger" multiple="true" label="Single-end reads" help=""/>
+                        <conditional name="strand">
+                            <param name="is_strand_specific" type="boolean" checked="false" label="Strand specific data"/>
+                            <when value="false">
+                            </when>
+                            <when value="true">
+                                <param name="library_type" argument="--SS_lib_type" type="select" label="Strand-specific Library Type">
+                                    <option value="F">F</option>
+                                    <option value="R">R</option>
+                                </param>
+                            </when>
+                        </conditional>
                     </when>
-                    <when value="true">
-                        <param name="library_type" argument="--SS_lib_type" type="select" label="Strand-specific Library Type">
-                            <option value="F">F</option>
-                            <option value="R">R</option>
-                        </param>
+                    <when value="paired">
+                        <param name="left_input" argument="--left" type="data" format="fasta,fastqsanger" multiple="true" label="Left/Forward strand reads" />
+                        <param name="right_input" argument="--right" type="data" format="fasta,fastqsanger" multiple="true" label="Right/Reverse strand reads" />
+                        <expand macro="input_paired_strand_jaccard" />
+                    </when>
+                    <when value="paired_collection">
+                        <param name="pair_input" type="data_collection" collection_type="list:paired" format="fasta,fastqsanger" label="FASTA/FASTQ dataset collection with R1/R2 pair" help="Can be lists of pair dataset collection"/>
+                        <expand macro="input_paired_strand_jaccard" />
                     </when>
                 </conditional>
             </when>
-            <when value="paired">
-                <param name="left_input" argument="--left" type="data" format="fasta,fastqsanger" multiple="true" label="Left/Forward strand reads" />
-                <param name="right_input" argument="--right" type="data" format="fasta,fastqsanger" multiple="true" label="Right/Reverse strand reads" />
-                <expand macro="input_paired_strand_jaccard" />
-            </when>
-            <when value="paired_collection">
-                <param name="pair_input" type="data_collection" collection_type="list:paired" format="fasta,fastqsanger" label="FASTA/FASTQ dataset collection with R1/R2 pair" help="Can be lists of pair dataset collection"/>
-                <expand macro="input_paired_strand_jaccard" />
+            <when value="No">
+                <conditional name="inputs">
+                    <param name="paired_or_single" type="select" label="Paired or Single-end data?">
+                        <option value="unmerged_single_collection">Single-end</option>
+                        <option value="unmerged_paired_collection">Paired-end</option>
+                    </param>
+                    <when value="unmerged_single_collection">
+                        <param name="input" argument="--single" type="data" format="fasta,fastqsanger" label="Single-end reads" help="Elements of collection will NOT be merged"/>
+                        <conditional name="strand">
+                            <param name="is_strand_specific" type="boolean" checked="false" label="Strand specific data"/>
+                            <when value="false">
+                            </when>
+                            <when value="true">
+                                <param name="library_type" argument="--SS_lib_type" type="select" label="Strand-specific Library Type">
+                                    <option value="F">F</option>
+                                    <option value="R">R</option>
+                                </param>
+                            </when>
+                        </conditional>
+                    </when>
+                    <when value="unmerged_paired_collection">
+                        <param name="pair_input" type="data_collection" collection_type="paired" format="fasta,fastqsanger" label="FASTA/FASTQ dataset collection with R1/R2 pair" help="Pair dataset collection. The paired datasets will NOT be merged"/>
+                        <expand macro="input_paired_strand_jaccard" />
+                    </when>
+                </conditional>
             </when>
         </conditional>
-
         <param name="norm" type="boolean" argument="--normalize_reads" truevalue="--normalize_reads" falsevalue="" checked="true" label="Run in silico normalization of reads" help="Defaults to max. read coverage of 50."/>
-
         <section name="additional_params" title="Additional Options" expanded="False">
             <param name="min_contig_length" argument="--min_contig_length" type="integer" optional="true" value="200" min="1" label="Minimum Contig Length" help="All contigs shorter than this will be discarded"/>
 
@@ -167,9 +216,36 @@
     </inputs>
     <outputs>
         <data name="assembled_transcripts" format="fasta" label="${tool.name} on ${on_string}: Assembled Transcripts" from_work_dir="trinity_out_dir/Trinity.fasta"/>
+        <data name="gene_to_trans" format="tabular" label="${tool.name} on ${on_string}: Gene to transcripts map" from_work_dir="trinity_out_dir/Trinity.fasta.gene_trans_map"/>
     </outputs>
     <tests>
         <test>
+            <param name="pool_mode" value="No" />
+            <param name="paired_or_single" value="unmerged_paired_collection"/>
+            <param name="pair_input">
+                <collection type="paired">
+                            <element name="forward" value="reads.left.fq" ftype="fastqsanger" />
+                            <element name="reverse" value="reads.right.fq" ftype="fastqsanger"/>
+                </collection>
+            </param>
+            <param name="is_strand_specific" value="true"/>
+            <param name="norm" value="true"/>
+            <param name="library_type" value="RF"/>
+            <output name="assembled_transcripts" file="norm/Trinity_paired_unmerged_1.fasta" compare="sim_size" delta="500" />
+            <output name="gene_to_trans" file="norm/Trinity_paired_unmerged_1.map" compare="sim_size" />
+        </test>
+        <test>
+            <param name="pool_mode" value="No" />
+            <param name="paired_or_single" value="unmerged_single_collection"/>
+            <param name="input" value="reads.left.fq" ftype="fastqsanger"/>
+            <param name="is_strand_specific" value="true"/>
+            <param name="norm" value="false"/>
+            <param name="library_type" value="F"/>
+            <output name="assembled_transcripts" file="raw/Trinity_single_unmerged_1.fasta" compare="sim_size" delta="500" />
+            <output name="gene_to_trans" file="raw/Trinity_single_unmerged_1.map" compare="sim_size" />
+        </test>
+        <test>
+            <param name="pool_mode" value="Yes" />
             <param name="paired_or_single" value="paired"/>
             <param name="left_input" value="reads.left.fq" ftype="fastqsanger"/>
             <param name="right_input" value="reads.right.fq" ftype="fastqsanger"/>
@@ -177,8 +253,10 @@
             <param name="norm" value="false"/>
             <param name="library_type" value="RF"/>
             <output name="assembled_transcripts" file="raw/Trinity.fasta" compare="sim_size" delta="500" />
+            <output name="gene_to_trans" file="raw/Trinity.map" compare="sim_size" />
         </test>
         <test>
+            <param name="pool_mode" value="Yes" />
             <param name="paired_or_single" value="paired"/>
             <param name="left_input" value="reads.left.fq" ftype="fastqsanger"/>
             <param name="right_input" value="reads.right.fq" ftype="fastqsanger"/>
@@ -186,8 +264,10 @@
             <param name="norm" value="true"/>
             <param name="library_type" value="RF"/>
             <output name="assembled_transcripts" file="norm/Trinity.fasta" compare="sim_size" delta="500" />
+            <output name="gene_to_trans" file="norm/Trinity.map" compare="sim_size" />
         </test>
         <test>
+            <param name="pool_mode" value="Yes" />
             <param name="paired_or_single" value="paired_collection"/>
             <param name="pair_input">
                 <collection type="list:paired">
@@ -209,6 +289,7 @@
             <param name="norm" value="true"/>
             <param name="library_type" value="RF"/>
             <output name="assembled_transcripts" file="norm/Trinity.fasta" compare="sim_size" delta="500" />
+            <output name="gene_to_trans" file="norm/Trinity.map" compare="sim_size" />
         </test>
     </tests>
     <help>
@@ -216,6 +297,5 @@
 
 .. _Trinity: http://trinityrnaseq.github.io
     </help>
-
     <expand macro="citation" />
 </tool>