view artic_minion.xml @ 1:20165d3a8fb1 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/artic commit 125ea4d98050db32bae4f722ef153305e8d48a94"
author iuc
date Wed, 10 Jun 2020 14:30:19 -0400
parents c411e2205442
children 376a706dda11
line wrap: on
line source

<tool id="artic_minion" name="ARTIC minion" version="1.1.2+galaxy0">
    <description>Build consensus sequence and call variants from amplicon-based nanopore sequence data</description>
    <requirements>
        <requirement type="package" version="1.1.2">artic</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        mkdir -p 'scheme/name/version' &&
        #if str( $primer_scheme_source.primer_scheme_source_selector ) == "tool_data_table":
          ln -s '${primer_scheme_source.primer_scheme_bedfile.fields.path}' 'scheme/name/version/name.scheme.bed' &&
        #else:
          ln -s '${primer_scheme_source.primer_scheme_bedfile}' 'scheme/name/version/name.scheme.bed' &&
        #end if
        #if str( $reference_source.reference_source_selector ) == "history":
          ln -s '${reference_source.reference}' 'scheme/name/version/name.reference.fasta' &&
          samtools faidx 'scheme/name/version/name.reference.fasta' &&
        #else:
          ln -s '${reference_source.reference.fields.path}' 'scheme/name/version/name.reference.fasta' &&
          samtools faidx 'scheme/name/version/name.reference.fasta' &&
        #end if
        artic minion
            --threads \${GALAXY_SLOTS:-1}
            --normalise '${normalise}'
            --read-file '${read_file}'
            --scheme-directory 'scheme'
            --medaka
            $bwa
            'name/version'
            '${read_file.element_identifier}'
    ]]></command>
    <inputs>
        <param argument="--read-file" type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" label="Input Read File"/>
        <param argument="--normalise" type="integer" min="1" value="200" max="2000" label="Coverage normalisation depth"/>
        <param argument="--bwa" type="boolean" truevalue="--bwa" falsevalue="" label="Use bwa aligner"/>
        <conditional name="primer_scheme_source">
            <param name="primer_scheme_source_selector" type="select" label="Select a primer scheme from your history or use one from a tool data table?"
                   help="Screening files must be stored in the 'primer_scheme_bedfiles' tool data table">
                <option value="tool_data_table">From tool data table</option>
                <option value="history">From history</option>
            </param>
            <when value="tool_data_table">
                <param name="primer_scheme_bedfile" type="select" format="tabular" label="Primer Scheme">
	            <options from_data_table="primer_scheme_bedfiles">
	                <validator type="no_options" message="No primer scheme .bed files are available" />
                    </options>
	        </param>
            </when>
            <when value="history">
                <param name="primer_scheme_bedfile" type="data" format="tabular" label="Primer Scheme" />
            </when>
        </conditional>
        <conditional name="reference_source">
            <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in reference?" >
                <option value="cached">Use a built-in reference</option>
                <option value="history">Use a reference from history</option>
            </param>
            <when value="cached">
                <param name="reference" type="select" label="Using reference genome" help="Select genome from the list">
                    <options from_data_table="all_fasta">
                        <filter type="sort_by" column="2" />
                        <validator type="no_options" message="No references are available" />
                    </options>
                </param>
            </when>
            <when value="history">
                <param name="reference" type="data" format="fasta" label="Use the following dataset as the reference sequence"
                       help="You can upload a FASTA sequence to the history and use it as reference" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="alignment_trimmed" format="bam" from_work_dir="*.trimmed.bam" label="${tool.name} on ${on_string}: trimmed alignment" />
        <data name="variants_tabular" format="tabular" from_work_dir="*.variants.tab" label="${tool.name} on ${on_string}: variants table" />
        <data name="variants_merged_vcf" format="vcf_bgzip" from_work_dir="*.merged.vcf.gz" label="${tool.name} on ${on_string}: variants merged" />
        <data name="variants_pass_vcf" format="vcf_bgzip" from_work_dir="*.pass.vcf.gz" label="${tool.name} on ${on_string}: variants pass" />
        <data name="variants_fail_vcf" format="vcf" from_work_dir="*.fail.vcf" label="${tool.name} on ${on_string}: variants fail" />
        <data name="consensus_fasta" format="fasta" from_work_dir="*.consensus.fasta" label="${tool.name} on ${on_string}: consensus sequence" />
        <data name="alignment_report" format="tabular" from_work_dir="*.alignreport.txt" label="${tool.name} on ${on_string}: alignment report" />
        <data name="coverage_mask" format="tabular" from_work_dir="*.coverage_mask.txt" label="${tool.name} on ${on_string}: coverage mask" />
        <data name="analysis_log" format="txt" from_work_dir="*.minion.log.txt" label="${tool.name} on ${on_string}: analysis log" />
    </outputs>
    <tests>
        <test>
            <param name="reference_source_selector" value="history" />
            <param name="read_file" value="SRR11410539_seqtk_sample_500_1.fastq" />
            <param name="reference" value="nCoV-2019.reference.fasta" />
            <param name="primer_scheme_source_selector" value="tool_data_table" />
            <param name="primer_scheme_bedfile" value="test_entry" />
            <output name="consensus_fasta" file="SRR11410539_seqtk_sample_500_1.fastq.consensus.fasta" />
        </test>
        <test>
            <param name="reference_source_selector" value="history" />
            <param name="read_file" value="SRR11410539_seqtk_sample_500_1.fastq" />
            <param name="reference" value="nCoV-2019.reference.fasta" />
            <param name="primer_scheme_source_selector" value="history" />
            <param name="primer_scheme_bedfile" value="nCoV-2019.scheme.V1.bed" />
            <output name="consensus_fasta" file="SRR11410539_seqtk_sample_500_1.fastq.consensus.fasta" />
        </test>
        <test>
            <param name="reference_source_selector" value="tool_data_table" />
            <param name="read_file" value="SRR11410539_seqtk_sample_500_1.fastq" />
            <param name="reference" value="test_entry" />
            <param name="primer_scheme_source_selector" value="tool_data_table" />
            <param name="primer_scheme_bedfile" value="test_entry" />
            <output name="consensus_fasta" file="SRR11410539_seqtk_sample_500_1.fastq.consensus.fasta" />
        </test>
    </tests>
    <help><![CDATA[
This tool aligns MinION reads that were generated from a tiling amplicon library against a viral reference sequence. 
It generates a consensus fasta file and a vcf variant file.

This tool is configured to use the experimental 'medaka' variant caller.
    ]]></help>
    <citations>
    </citations>
</tool>