view 10x_bamtofastq.xml @ 0:110076d77197 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/10x_bamtofastq commit 339363f6c9d817bc2c35997b4dfdd3ca99a37055
author bgruening
date Tue, 10 May 2022 12:02:15 +0000
parents
children f71fd828c126
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 &&
        mv outdir/*/*.fastq.gz outdir
    ]]></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="bamtofastq_S1_L007_I1_001" file="bamtofastq_S1_L007_I1_001.fastq.gz"/>
                <element name="bamtofastq_S1_L007_R1_001" file="bamtofastq_S1_L007_R1_001.fastq.gz"/>
                <element name="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>