view fastq.info.xml @ 8:25f02dced96c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 4c950508328589b5215b6c96868659a03f9dead8"
author iuc
date Tue, 08 Dec 2020 13:59:37 +0000
parents 1aa945e00ef2
children 22da6f6c5be8
line wrap: on
line source

<tool profile="16.07" id="mothur_fastq_info" name="Fastq.info" version="@WRAPPER_VERSION@.0">
    <description>Convert fastq to fasta and quality</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

## create symlinks to input datasets
ln -s '$fastq' fastq.dat &&
#if $oligo.add == "yes":
    ln -s '$oligo.oligos' oligo.oligos.dat &&
#end if

echo 'fastq.info(
    fastq=fastq.dat,
    pacbio=$pacbio,
    format=$format
    #if $oligo.add == "yes":
        ,oligos=oligo.oligos.dat
        ,bdiffs=$oligo.bdiffs
        ,pdiffs=$oligo.pdiffs
        ,tdiffs=$oligo.tdiffs
        ,ldiffs=$oligo.ldiffs
        ,sdiffs=$oligo.sdiffs
    #end if
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
## rename some outputs
#if $oligo.add == "yes":
    && mv fastq.scrap.fasta scrap.fasta
    && mv fastq.scrap.qual scrap.qual
#end if
    ]]></command>
    <inputs>
        <param argument="fastq" type="data" format="fastq" label="fastq - Fastq Sequence file"/>
        <param argument="pacbio" type="boolean" truevalue="true" falsevalue="false" checked="false"
            label="pacbio - if set to true, quality scores of 0 will results in a corresponding base of N"/>
        <param argument="format" type="select" label="format of sequence">
            <option value="sanger" selected="true">sanger</option>
            <option value="solexa">solexa</option>
            <option value="illumina">illumina</option>
            <option value="illumina1.8+">illumina1.8+</option>
        </param>
        <conditional name="oligo">
            <param name="add" type="select" label="Use oligos file?"
                help="a file that contain the sequences of the forward and reverse primers and barcodes and their sample identifier.
                Each line of the oligos file can start with the key words &quot;forward&quot;, &quot;reverse&quot;, and &quot;barcode&quot;
                or it can start with a &quot;#&quot; to tell mothur to ignore that line of the oligos file.">
                <option value="no">no</option>
                <option value="yes">yes</option>
            </param>
            <when value="yes">
                <param argument="oligos" type="data" format="mothur.oligos" label="oligos - barcodes and primers"/>
                <param argument="bdiffs" type="integer" value="0" min="0" label="bdiffs - number of differences to allow in the barcode (must be > 0; default 0)"/>
                <param argument="pdiffs" type="integer" value="0" min="0" label="pdiffs - number of differences to allow in the primer (must be > 0; default 0)"/>
                <param argument="tdiffs" type="integer" value="0" min="0" label="tdiffs - total number of differences to allow in primer and barcode (must be > 0; default 0)"/>
                <param argument="ldiffs" type="integer" value="0" min="0" label="ldiffs - total number of differences to allow in linker sequence (must be > 0; default 0)"/>
                <param argument="sdiffs" type="integer" value="0" min="0" label="sdiffs - total number of differences to allow in spacer sequence (must be > 0; default 0)"/>
            </when>
            <when value="no"/>
        </conditional>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="fasta_out" format="fasta" from_work_dir="fastq*.fasta" label="${tool.name} on ${on_string}: fasta"/>
        <data name="qfile_out" format="qual454" from_work_dir="fastq*.qual" label="${tool.name} on ${on_string}: qual"/>
        <data name="fastq_scrap_out" format="fastq" from_work_dir="fastq*.scrap.fastq" label="${tool.name} on ${on_string}: fastq scrap">
            <filter>oligos</filter>
        </data>
        <data name="fasta_scrap_out" format="fasta" from_work_dir="scrap.fasta" label="${tool.name} on ${on_string}: fasta scrap">
            <filter>oligos</filter>
        </data>
        <data name="qfile_scrap_out" format="qual454" from_work_dir="scrap.qual" label="${tool.name} on ${on_string}: qual scrap">
            <filter>oligos</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="fastq" value="Mock_S280_L001_R1_001_small.fastq"/>
            <param name="pacbio" value="false"/>
            <param name="format" value="sanger"/>
            <param name="oligo|add" value="no"/>
            <output name="fasta_out" ftype="fasta">
                <assert_contents>
                    <expand macro="test-fasta-format"/>
                    <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
                </assert_contents>
            </output>
            <output name="qfile_out">
                <assert_contents>
                    <expand macro="test-qfile-format"/>
                    <has_text text="M00967_43_000000000-A3JHG_1_1101_4525_7317"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="fastq" value="Mock_S280_L001_R1_001_small.fastq"/>
            <param name="pacbio" value="false"/>
            <param name="format" value="sanger"/>
            <param name="oligo|add" value="yes"/>
            <param name="oligos" value="GQY1XT001.oligos"/>
            <param name="bdiffs" value="1"/>
            <param name="pdiffs" value="3"/>
            <param name="tdiffs" value="3"/>
            <param name="ldiffs" value="3"/>
            <param name="sdiffs" value="7"/>
            <output name="fasta_out" ftype="fasta">
                <assert_contents>
                    <expand macro="test-fasta-format"/>
                </assert_contents>
            </output>
            <output name="qfile_out" ftype="qual454">
                <assert_contents>
                    <expand macro="test-qfile-format"/>
                    <has_text text="M00967_43_000000000-A3JHG_1_1101_4525_7317"/>
                </assert_contents>
            </output>
            <output name="fastq_scrap_out" ftype="fastq">
                <assert_contents>
                    <expand macro="test-fastq-format"/>
                    <has_text text="@M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
                </assert_contents>
            </output>
            <output name="fasta_scrap_out" ftype="fasta">
                <assert_contents>
                    <expand macro="test-fasta-format"/>
                </assert_contents>
            </output>
            <output name="qfile_scrap_out" ftype="qual454">
                <assert_contents>
                    <expand macro="test-qfile-format"/>
                    <has_text text="M00967_43_000000000-A3JHG_1_1101_4525_7317"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="fastq" value="Mock_S280_L001_R1_001_small.fastq"/>
            <param name="pacbio" value="false"/>
            <param name="format" value="sanger"/>
            <param name="oligo|add" value="yes"/>
            <param name="oligos" value="HMPv5-v3_1368-1369.oligos"/>
            <param name="bdiffs" value="1"/>
            <param name="pdiffs" value="3"/>
            <param name="tdiffs" value="3"/>
            <param name="ldiffs" value="3"/>
            <param name="sdiffs" value="7"/>
            <output name="fasta_out">
                <assert_contents>
                    <expand macro="test-fasta-format"/>
                </assert_contents>
            </output>
            <output name="qfile_out">
                <assert_contents>
                    <expand macro="test-qfile-format"/>
                    <has_text text="M00967_43_000000000-A3JHG_1_1101_4525_7317"/>
                </assert_contents>
            </output>
            <output name="fastq_scrap_out">
                <assert_contents>
                    <expand macro="test-fastq-format"/>
                    <has_text text="@M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
                </assert_contents>
            </output>
            <output name="fasta_scrap_out">
                <assert_contents>
                    <expand macro="test-fasta-format"/>
                </assert_contents>
            </output>
            <output name="qfile_scrap_out">
                <assert_contents>
                    <expand macro="test-qfile-format"/>
                    <has_text text="M00967_43_000000000-A3JHG_1_1101_4525_7317"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The fastq.info_ command reads a fastq file and creates a fasta and quality file.


.. _fastq.info: https://www.mothur.org/wiki/Fastq.info

    ]]></help>
    <expand macro="citations"/>
</tool>