view fermikit_run_calling.xml @ 1:ed056d243455 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/fermikit commit ab4afb50e6c991cc2e784a93a0c7a75329eac88c
author iuc
date Mon, 27 Jun 2022 11:22:33 +0000
parents 44519e762f16
children
line wrap: on
line source

<tool id="fermikit_variants" name="fermikit-variants" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>call variants from genome-aligned contigs</description>
    <macros>
        <token name="@TOOL_VERSION@">0.14.dev1</token>
        <token name="@VERSION_SUFFIX@">1</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">fermikit</requirement>
        <requirement type="package" version="0.6.5">sambamba</requirement>
    </requirements>
    <command detect_errors="aggressive"><![CDATA[
        #import re
        #set escaped_element_identifier = re.sub('[^\w\-\s]', '_', str($bam.element_identifier))
        
        #if $reference_genome.reference_genome_source == "reference"
            #set ref=$reference_genome.fasta_item.fields.path
        #else
            ln -s '$reference_genome.history_item' reference.fa &&
            #set ref="reference.fa"
        #end if        
        export ROOT=\$(dirname \$(type -P k8)) &&
        ln -f -s '$bam' '$escaped_element_identifier' &&
        htsbox pileup -cuf '$ref' '$escaped_element_identifier'  | gzip -1 > raw.vcf.gz &&
        k8 "\$ROOT"/hapdip.js deovlp raw.vcf.gz | k8 "\$ROOT"/hapdip.js anno | gzip -1 > tmp.vcf.gz 2> flt.vcf.log &&
        k8 "\$ROOT"/hapdip.js filter -q3 tmp.vcf.gz > flt.vcf 2>> flt.vcf.log &&
        htsbox abreak -bcuf '$ref' <(sambamba sort -n -o /dev/stdout '$escaped_element_identifier') > sv.vcf
     ]]></command>
     <inputs>
         <param name="bam" type="data" label="aligned contigs" help="To generate aligned contigs align fermi2 contigs with BWA mem options -B9 -O16 -L5" format="bam"/>
         <conditional name="reference_genome" label="Reference genome to call variants against">
             <param name="reference_genome_source" type="select">
                 <option value="reference">Use a built-in genome to call variants</option>
                 <option value="history">Use a genome from history to call variants</option>
             </param>
             <when value="history">
                <param format="fasta" label="Select a reference genome" name="history_item" type="data" />
            </when>
            <when value="reference">
                <param label="Select a reference genome" name="fasta_item" type="select">
                    <options from_data_table="all_fasta">
                        <filter column="2" type="sort_by"/>
                    </options>
                </param>
            </when>
         </conditional>
    </inputs>
    <outputs>
        <data name="structural_variants" format="vcf" label="fermikit SV on ${on_string}" from_work_dir="sv.vcf"/>
        <data name="snps_indels" format="vcf" label="fermikit SNPs and short INDELs on ${on_string}" from_work_dir="flt.vcf"/>
    </outputs>
    <tests>
        <test>
            <param name="reference_genome_source" value="history"/>
            <param name="history_item" value="small.fa.gz" ftype="fasta"/>
            <param name="bam" value="aligned_contigs.bam"/>
            <output name="structural_variants" file="sv.vcf" lines_diff="2"/>
            <output name="snps_indels" file="flt.vcf" lines_diff="2"/>
        </test>
    </tests>
    <help><![CDATA[

FermiKit is a de novo assembly based variant calling pipeline for deep Illumina
resequencing data. This galaxy wrapper can be used to call variants from contigs
generated by fermi2 that have subsequently been aligned to a reference genome
using bwa (options -B9 -O16 -L5 or -x intractg).

]]></help> <citations> <citation
type="doi">10.1093/bioinformatics/btv440</citation> </citations> </tool>