view align_and_estimate_abundance.xml @ 11:2e0e45063fad draft

Trying to fix a syntax error. Seems like the wrong python is being used.
author trinity_ctat
date Tue, 26 Sep 2017 22:56:18 -0400
parents 28f6d3b8e931
children a130d5b5f34b
line wrap: on
line source

<tool id="RSEM_abundance_estimation" name="align_and_estimate_abundance" version="2.0.0">

    <description>run RSEM to estimate transcript abundances</description>

    <requirements>
        <requirement type="package" version="2.7">python</requirement>
        <requirement type="package" version="2.4.0">trinity</requirement>
        <requirement type="package">bowtie2</requirement>
        <requirement type="package">samtools</requirement>
        <requirement type="package">rsem</requirement>
    </requirements>

    <command>
        <![CDATA[
        python trinityToolWrapper.py util/align_and_estimate_abundance.pl --transcripts $transcripts --est_method RSEM --aln_method bowtie --trinity_mode --prep_reference --output_dir  "subdir" 

        ## Inputs.
        #if str($inputs.paired_or_single) == "paired":
            --left $inputs.left_input --right $inputs.right_input
            #if  $inputs.left_input.ext == 'fa':
                --seqType fa
            #else:
                --seqType fq
            #end if
            #if str($inputs.library_type) != "None":
                --SS_lib_type $inputs.library_type
            #end if
            
        #else:
            --single $inputs.input
            #if  str($inputs.input.ext) == 'fa':
                --seqType fa
            #else:
                --seqType fq
            #end if
            #if str($inputs.library_type) != "None":
                --SS_lib_type $inputs.library_type
            #end if
        #end if
        ]]>

    </command>
    <inputs>
	    <param format="fasta" name="transcripts" type="data" label="Transcripts Fasta" help="Fasta sequences against which reads are aligned. This may be the Assembled Transcripts file from Trinity."  />

		<conditional name="inputs">
                    <param name="paired_or_single" type="select" label="Paired or Single-end data?">
                <option value="paired">Paired</option>
                <option value="single">Single</option>
            </param>
            <when value="paired">
                <param format="fasta,fastq" name="left_input" type="data" label="Left/Forward strand reads" help=""/>
                <param format="fasta,fastq" name="right_input" type="data" label="Right/Reverse strand reads" help=""/>
                <param name="library_type" type="select" label="Strand-specific Library Type">
                    <option value="None">None</option>
                    <option value="FR">FR</option>
                    <option value="RF">RF</option>
                </param>

            </when>
            <when value="single">
                <param format="fasta,fastq" name="input" type="data" label="Single-end reads" help=""/>
                <param name="library_type" type="select" label="Strand-specific Library Type">
                    <option value="None">None</option>
                    <option value="F">F</option>
                    <option value="R">R</option>
                </param>

            </when>
        </conditional>
    </inputs>

    <outputs>
        <data format="text" name="transcript_counts" label="${tool.name} on ${on_string}: Isoform Counts" from_work_dir="subdir/RSEM.isoforms.results"/>
	<data format="text" name="gene_counts" label="${tool.name} on ${on_string}: Gene counts" from_work_dir="subdir/RSEM.genes.results"/>
    </outputs>

    <tests>
	<test>
	    <param name="transcripts" value="reads.simPE.Trinity.fasta" />
	    <param name="paired_or_single" value="paired" />
            <param name="left_input" value="reads.left.simPE.fq" />
            <param name="right_input" value="reads.right.simPE.fq" />
            <param name="library_type" value="None" />

	    <output name="transcript_counts" >
                <assert_contents>
                    <has_line_matching expression=".+" />
                    <has_line line="transcript_id&#009;gene_id&#009;length&#009;effective_length&#009;expected_count&#009;TPM&#009;FPKM&#009;IsoPct" />
                </assert_contents>
            </output>

	    <output name="gene_counts" >
                <assert_contents>
                    <has_line_matching expression=".+" />
                    <has_line line="gene_id&#009;transcript_id(s)&#009;length&#009;effective_length&#009;expected_count&#009;TPM&#009;FPKM" />
                </assert_contents>
            </output>
        </test>
	<test>
	    <param name="transcripts" value="Sp.Trinity.fasta" />
	    <param name="paired_or_single" value="paired" />
            <param name="left_input" value="Sp_ds.left.fq" />
            <param name="right_input" value="Sp_ds.right.fq" />
            <param name="library_type" value="None" />

	    <output name="transcript_counts" >
                <assert_contents>
                    <has_line_matching expression=".+" />
                    <has_line line="transcript_id&#009;gene_id&#009;length&#009;effective_length&#009;expected_count&#009;TPM&#009;FPKM&#009;IsoPct" />
                </assert_contents>
            </output>

	    <output name="gene_counts" >
                <assert_contents>
                    <has_line_matching expression=".+" />
                    <has_line line="gene_id&#009;transcript_id(s)&#009;length&#009;effective_length&#009;expected_count&#009;TPM&#009;FPKM" />
                </assert_contents>
            </output>
        </test>
	<test>
	    <param name="transcripts" value="Sp.Trinity.fasta" />
	    <param name="paired_or_single" value="paired" />
            <param name="left_input" value="Sp_hs.left.fq" />
            <param name="right_input" value="Sp_hs.right.fq" />
            <param name="library_type" value="None" />

	    <output name="transcript_counts" >
                <assert_contents>
                    <has_line_matching expression=".+" />
                    <has_line line="transcript_id&#009;gene_id&#009;length&#009;effective_length&#009;expected_count&#009;TPM&#009;FPKM&#009;IsoPct" />
                </assert_contents>
            </output>

	    <output name="gene_counts" >
                <assert_contents>
                    <has_line_matching expression=".+" />
                    <has_line line="gene_id&#009;transcript_id(s)&#009;length&#009;effective_length&#009;expected_count&#009;TPM&#009;FPKM" />
                </assert_contents>
            </output>
        </test>
    </tests>

    <help>      
.. class:: infomark

Use RSEM to generate transcript quantification for genes and isoforms.

To learn more about RSEM read their paper_ or visit their website_.

If you are following the Trinity RNA-seq protocol please go here_ for a galaxy tool walk through or the Nature Protocols publication_ .

.. _paper: http://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-12-323
.. _publication: http://www.nature.com/nprot/journal/v8/n8/full/nprot.2013.084.html
.. _website: http://deweylab.biostat.wisc.edu/rsem/README.html
.. _here: https://github.com/trinityrnaseq/GalaxyTrinityProtocol/wiki
    </help>

    <citations>
        <citation type="doi">10.1038/nbt.1883</citation>
    </citations>

</tool>