view kallisto_pseudo.xml @ 7:ce5d418183c5 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/kallisto/ commit f173f58bc695c22364685c2ffbb9f3e95708f00f
author iuc
date Mon, 05 Jun 2023 22:06:13 +0000
parents a157781cddd7
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="kallisto_pseudo" name="Kallisto pseudo" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05">
    <description>run pseudoalignment on RNA-Seq transcripts</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <xrefs>
        <xref type="bio.tools">kallisto</xref>
    </xrefs>

    <expand macro="requirements" />
    <command detect_errors="exit_code">
        <![CDATA[
        #if $reference_transcriptome.reference_transcriptome_source == "history":
            ln -s '$reference_transcriptome.reference' reference.fa &&
            kallisto index reference.fa -i reference.kallisto &&
            #set index_path = 'reference.kallisto'
        #else:
            #set index_path = $reference_transcriptome.index.fields.path
        #end if
        kallisto pseudo -i '$index_path'
            --threads \${GALAXY_SLOTS:-1}
            -o .

            #if str($single_paired.single_paired_selector) == 'single':
                --single --fragment-length $single_paired.fragment_length
                --sd $single_paired.sd '$single_paired.reads'
            #else:
                #if str($single_paired.collection.collection_selector) == 'collection':
                    '$single_paired.collection.reads.forward'
                    '$single_paired.collection.reads.reverse'
                #else:
                    #if str($single_paired.collection.fastq_umi.umi) == 'yes':
                        --batch '$batch' --umi
                    #else:
                        '$single_paired.collection.fastq_umi.forward'
                        '$single_paired.collection.fastq_umi.reverse'
                    #end if
                #end if
            #end if
            && if [ -f run_info.json ] ; then cat run_info.json ; fi &&
            mkdir outputs &&
            if [ -f matrix.ec ] ; then mv matrix.ec outputs/Matrix.ec ; fi &&
            if [ -f matrix.tcc.mtx ] ; then mv matrix.tcc.mtx outputs/Matrix.tabular ; fi &&
            if [ -f matrix.cells ] ; then mv matrix.cells outputs/Matrix.cells ; fi &&
            if [ -f pseudoalignments.tsv ] ; then mv pseudoalignments.tsv outputs/Pseudoalignments.tabular ; fi &&
            if [ -f pseudoalignments.ec ] ; then mv pseudoalignments.ec outputs/Pseudoalignments.ec ; fi
        ]]>
    </command>
    <configfiles>
        <configfile name="batch">
<![CDATA[
#if str($single_paired.single_paired_selector) == 'single':
cell1	$single_paired.reads
#else:
#if str($single_paired.collection.collection_selector) == 'collection':
cell1	$single_paired.collection.reads.forward $single_paired.collection.reads.reverse
#else:
cell1	$single_paired.collection.fastq_umi.forward $single_paired.collection.fastq_umi.reverse
#end if
#end if
]]>
        </configfile>
    </configfiles>
    <inputs>
        <expand macro="reference_input" />
        <conditional name="single_paired">
            <param name="single_paired_selector" type="select" label="Single-end or paired reads">
                <option value="single" selected="true">Single-end</option>
                <option value="paired">Paired</option>
            </param>
            <when value="single">
                <param name="reads" type="data" format="fastq,fastq.gz" multiple="True" label="Reads in FASTQ format" />
                <param argument="--fragment-length" type="integer" value="200" label="Average fragment length" />
                <param argument="--sd" type="integer" value="20" label="Estimated standard deviation of fragment length" />
            </when>
            <when value="paired">
                <conditional name="collection">
                    <param name="collection_selector" type="select" label="Collection or individual datasets">
                        <option value="datasets" selected="true">Individual files</option>
                        <option value="collection">Pair or list of pairs</option>
                    </param>
                    <when value="datasets">
                        <conditional name="fastq_umi">
                            <param name="umi" type="select" label="Pseudoalignment uses UMIs">
                                <option value="no" selected="true">Paired FASTQ</option>
                                <option value="yes">UMI</option>
                            </param>
                            <when value="yes">
                                <param name="forward" type="data" format="tabular" multiple="True" label="UMI file" />
                                <param name="reverse" type="data" format="fastq,fastq.gz" multiple="True" label="FASTQ reads" />
                            </when>
                            <when value="no">
                                <param name="forward" type="data" format="fastq,fastq.gz" multiple="True" label="Forward reads" />
                                <param name="reverse" type="data" format="fastq,fastq.gz" multiple="True" label="Reverse reads" />
                            </when>
                        </conditional>
                    </when>
                    <when value="collection">
                        <param name="reads" type="data_collection" format="fastq,fastq.gz" collection_type="paired" label="Collection of reads" />
                    </when>
                </conditional>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="tabular" name="sample">
            <discover_datasets pattern="(?P&lt;designation&gt;.+)" directory="outputs" ext="tabular" visible="true" />
        </data>
    </outputs>
    <tests>
        <test>
            <param name="reference_transcriptome_source" value="history" />
            <param name="reference" ftype="fasta" value="mm10_chrM.fa" />
            <param name="single_paired_selector" value="paired" />
            <param name="collection_selector" value="datasets" />
            <param name="umi" value="yes" />
            <param name="forward" ftype="tabular" value="mm10_chrM.umi" />
            <param name="reverse" ftype="fastq.gz" value="mm10_chrM-1.r.fq.gz" />
            <output name="sample">
                <discovered_dataset designation="Matrix.tabular" file="kallisto_pseudo_out1.tab" ftype="tabular" />
                <discovered_dataset designation="Matrix.ec" file="kallisto_pseudo_out1.ec" ftype="tabular" />
                <discovered_dataset designation="Matrix.cells" file="kallisto_pseudo_out1.cells" ftype="tabular" />
            </output>
        </test>
        <test>
            <param name="reference_transcriptome_source" value="history" />
            <param name="reference" ftype="fasta" value="mm10_chrM.fa" />
            <param name="single_paired_selector" value="paired" />
            <param name="collection_selector" value="collection" />
            <param name="umi" value="no" />
            <param name="reads">
                <collection type="paired">
                    <element name="forward" value="mm10_chrM-1.f.fq.gz" ftype="fastq.gz"/>
                    <element name="reverse" value="mm10_chrM-1.r.fq.gz" ftype="fastq.gz"/>
                </collection>
            </param>
            <output name="sample">
                <discovered_dataset designation="Pseudoalignments.tabular" file="kallisto_pseudo_out2.tab" ftype="tabular" />
                <discovered_dataset designation="Pseudoalignments.ec" file="kallisto_pseudo_out2.ec" ftype="tabular" />
            </output>
        </test>
        <test>
            <param name="reference_transcriptome_source" value="history" />
            <param name="reference" ftype="fasta" value="mm10_chrM.fa" />
            <param name="single_paired_selector" value="single" />
            <param name="collection_selector" value="collection" />
            <param name="reads" ftype="fastq.gz" value="mm10_chrM-1.f.fq.gz" />
            <output name="sample">
                <discovered_dataset designation="Pseudoalignments.tabular" file="kallisto_pseudo_out3.tab" ftype="tabular" />
                <discovered_dataset designation="Pseudoalignments.ec" file="kallisto_pseudo_out3.ec" ftype="tabular" />
            </output>
        </test>
        <test>
            <param name="reference_transcriptome_source" value="history" />
            <param name="reference" ftype="fasta" value="felCat8_chrM.fa" />
            <param name="single_paired_selector" value="paired" />
            <param name="collection_selector" value="datasets" />
            <param name="umi" value="no" />
            <param name="forward" ftype="fastq" value="felCat8_chrM_F.fq" />
            <param name="reverse" ftype="fastq" value="felCat8_chrM_R.fq" />
            <output name="sample">
                <discovered_dataset designation="Pseudoalignments.tabular" file="kallisto_pseudo_out4.tab" ftype="tabular" />
                <discovered_dataset designation="Pseudoalignments.ec" file="kallisto_pseudo_out4.ec" ftype="tabular" />
            </output>
        </test>
        <test>
            <param name="reference_transcriptome_source" value="cached" />
            <param name="single_paired_selector" value="paired" />
            <param name="collection_selector" value="datasets" />
            <param name="umi" value="yes" />
            <param name="forward" ftype="tabular" dbkey="sacCer2" value="sacCer2_chrM.umi" />
            <param name="reverse" ftype="fastq" dbkey="sacCer2" value="sacCer2_chrM_R.fq.gz" />
            <output name="sample">
                <discovered_dataset designation="Matrix.tabular" file="kallisto_pseudo_out6.tab" ftype="tabular" />
                <discovered_dataset designation="Matrix.ec" file="kallisto_pseudo_out6.ec" ftype="tabular" />
                <discovered_dataset designation="Matrix.cells" file="kallisto_pseudo_out6.cells" ftype="tabular" />
            </output>
        </test>
    </tests>
    <help>
 <![CDATA[
 `kallisto <https://pachterlab.github.io/kallisto/manual>`__ is a program for quantifying abundances of transcripts from RNA-Seq data, or more generally of target sequences using high-throughput sequencing reads. It is based on the novel idea of pseudoalignment for rapidly determining the compatibility of reads with targets, without the need for alignment.
 ]]>
     </help>
    <expand macro="citations" />
</tool>