view 10x_bamtofastq.xml @ 1:f71fd828c126 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/10x_bamtofastq commit 60c20816923303efe1185c76f38a5b9a6fb8ce1c
author bgruening
date Thu, 12 May 2022 16:54:20 +0000
parents 110076d77197
children
line wrap: on
line source

<tool id="10x_bamtofastq" name="Convert a 10X BAM file to FASTQ" version="1.4.1">
    <requirements>
        <requirement type="package" version="1.4.1">10x_bamtofastq</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        bamtofastq --nthreads "\${GALAXY_SLOTS:-4}" --reads-per-fastq 10000000000
        #if $convert.reads == 'subset':
            --locus $convert.locus
        #end if
        $produced_from
        $tenx_bam
        outdir &&
        cd outdir; for i in */*.fastq.gz;do mv \$i \${i/\//_};done
    ]]></command>
    <inputs>
        <param format="bam" name="tenx_bam" type="data" label="10X Genomics BAM file to convert to FASTQ"/>
        <conditional name="convert">
            <param name="reads" type="select" label="Read pairs to convert?">
                <option value="all">Complete BAM file</option>
                <option value="subset">Only a subset of BAM file</option>
            </param>
            <when value="all" />
            <when value="subset">
                <param name="locus" type="text" value=""
                    label="Only include read pairs mapping to a locus."
                    help="The format is chr:start-end, for example &quot;chr1:14300-125000&quot;.">
                    <sanitizer>
                        <valid initial="string.letters,string.digits">
                            <add value=":"/>
                            <add value="-"/>
                         </valid>
                    </sanitizer>
                </param>
            </when>
        </conditional>
        <param name="sort" type="boolean" label="Skip unpaired or duplicated reads instead of throwing an error?" checked="False" falsevalue="" truevalue="--relaxed"/>
        <param name="produced_from" type="select" label="BAM file produced from">
            <option value="">Long Ranger v2.1+ and Cell Ranger v1.2+</option>
            <option value="--gemcode">GemCode data (Longranger 1.0 - 1.3)</option>
            <option value="--lr20">Longranger 2.0</option>
            <option value="--cr11">Cell Ranger 1.0-1.1</option>
        </param>
    </inputs>
    <outputs>
        <collection name="fastq_collection" type="list" label="10x FASTQs from ${on_string}">
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.fastq\.gz" directory="outdir" format="fastqsanger.gz"/>
        </collection>
    </outputs>

    <tests>
        <test>
            <param name="tenx_bam" value="A10.sub.bam"/>
            <output_collection name="fastq_collection" type="list" count="3">
                <element name="A10_MissingLibrary_1_CB54YACXX_bamtofastq_S1_L007_I1_001" file="bamtofastq_S1_L007_I1_001.fastq.gz"/>
                <element name="A10_MissingLibrary_1_CB54YACXX_bamtofastq_S1_L007_R1_001" file="bamtofastq_S1_L007_R1_001.fastq.gz"/>
                <element name="A10_MissingLibrary_1_CB54YACXX_bamtofastq_S1_L007_R2_001" file="bamtofastq_S1_L007_R2_001.fastq.gz"/>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[
        10x Genomics BAM to FASTQ converter
    ]]></help>
    <citations>
        <citation type="bibtex">
            @misc{github10xbamtofastq,
            author = {},
            year = {2022},
            title = {10x bamtofastq},
            publisher = {Github},
            journal = {Github repository},
            url = {https://github.com/10XGenomics/bamtofastq},
        }</citation>
    </citations>
</tool>