view bwameth.xml @ 2:2e4674c16615 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tools/bwameth commit 10747839851e862ba0200061e1c99d68e009fb18
author iuc
date Sun, 12 Mar 2017 04:11:22 -0400
parents 404fae08ea31
children a6ea26c1f225
line wrap: on
line source

<tool id="bwameth" name="bwameth" version="0.2.0.2">
    <description>Fast and accurate aligner of BS-Seq reads.</description>
    <requirements>
        <requirement type="package" version="1.2">samtools</requirement>
        <requirement type="package" version="0.2.0">bwameth</requirement>
    </requirements>
    <version_command>bwameth.py --version</version_command>
    <command detect_errors="aggressive">
<![CDATA[
    #if $referenceSource.source != "indexed":
        mkdir index_dir &&
        ln -s '$referenceSource.reference' index_dir/genome.fa &&
        bwameth.py index index_dir/genome.fa &&
        #set index="index_dir/genome.fa"
    #else
        #set index=$referenceSource.index.fields.path
    #end if

    bwameth.py
        -t "\${GALAXY_SLOTS:-4}"
        --reference "${index}"

    #if str($readGroup).strip() != "":
        --read-group "${readGroup}"
    #end if

    #if $single_or_paired.single_or_paired_opts == 'single':
        $single_or_paired.input_singles
    #elif $single_or_paired.single_or_paired_opts == 'paired':
        $single_or_paired.input_mate1 $single_or_paired.input_mate2
    #else:
        $single_or_paired.input_mate1.forward $single_or_paired.input_mate1.reverse
    #end if
    | samtools view -u - | samtools sort -@ "\${GALAXY_SLOTS:-4}" -T tmp -O bam -o output.bam -
]]>
    </command>
    <inputs>
        <conditional name="referenceSource">
            <param name="source" type="select" label="Select a genome reference from your history or a built-in index?">
                <option value="history" selected="True">Use one from the history</option>
                <option value="indexed">Use a built-in index</option>
            </param>
            <when value="history">
                <param name="reference" type="data" format="fasta" label="Select a genome" help="in FASTA format" />
            </when>
            <when value="indexed">
                <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact your Galaxy admin">
                    <options from_data_table="bwameth_indexes">
                        <filter type="sort_by" column="2"/>
                        <validator type="no_options" message="No indexes are available for the selected input dataset"/>
                    </options>
                </param>
            </when>
        </conditional>

        <conditional name="single_or_paired">
            <param name="single_or_paired_opts" type="select" label="Is this library mate-paired?">
                <option value="single">Single-end</option>
                <option value="paired">Paired-end</option>
                <option value="paired_collection">Paired-end Dataset Collection</option>
            </param>
            <when value="single">
                <param name="input_singles" type="data" format="fastqsanger" label="FASTQ" help="FASTQ file." />
            </when>
            <when value="paired">
                <param name="input_mate1" type="data" format="fastqsanger" label="First read in pair" help="FASTQ file." />
                <param name="input_mate2" type="data" format="fastqsanger" label="Second read in pair" help="FASTQ file." />
            </when>
            <when value="paired_collection">
                <param name="input_mate1" type="data_collection" collection_type="paired" format="fastqsanger" label="FASTQ paired dataset" help="Must have a fastqsanger datatype." />
            </when>
        </conditional>
        <param name="readGroup" type="text" value="" label="Read group" help="If desired, you can manually add read group information to the resulting BAM file. To do so, you MUST manually specify the entire string, such as '@RG\tID:foo\tSM:bar'">
            <sanitizer sanitize="False"/>
        </param>
    </inputs>
    <outputs>
        <data name="output" format="bam" from_work_dir="output.bam" label="${tool.name} on ${on_string}" />
    </outputs>
    <tests>
        <test>
            <param name="referenceSource" value="history" />
            <param name="reference" value="ref.fa.gz" />
            <param name="single_or_paired_opts" value="paired" />
            <param name="input_mate1" value="t_R1.fastq.gz" />
            <param name="input_mate2" value="t_R2.fastq.gz" />
            <output file="output.bam" ftype="bam" name="output" lines_diff="2"/>
        </test>
        <test>
            <param name="referenceSource" value="history" />
            <param name="reference" value="ref.fa.gz" />
            <param name="single_or_paired_opts" value="paired_collection" />
            <param name="input_mate1">
                <collection type="paired">
                    <element name="forward" value="t_R1.fastq.gz" />
                    <element name="reverse" value="t_R2.fastq.gz" />
                </collection>
            </param>
            <output file="output.bam" ftype="bam" name="output" lines_diff="2"/>
        </test>
    </tests>
    <help>
<![CDATA[

**What it does**

BWA-meth performs alignment of reads in a bisulfite-sequencing experiment (e.g., RRBS or WGBS) to a genome. The methodology employed for this is similar to bismark, where both the reads and the reference genome are *in silico* converted prior to alignment. Methylation extraction on the resulting BAM file can be done with the PileOMeth tool.
]]>
    </help>
    <citations>
        <citation type="bibtex">@misc{1401.1129,
        Author = {Brent S. Pedersen and Kenneth Eyring and Subhajyoti De and Ivana V. Yang and David A. Schwartz},
        Title = {Fast and accurate alignment of long bisulfite-seq reads},
        Year = {2014},
        Eprint = {arXiv:1401.1129},
        }</citation>
    </citations>
</tool>