Mercurial > repos > iuc > vardict_java
diff vardict.xml @ 0:2975b29bcaa1 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vardict commit 8a561c35737f2bdef39842ce7f297a286380bf36"
author | iuc |
---|---|
date | Tue, 25 Aug 2020 05:41:19 -0400 |
parents | |
children | 5f756651a1bc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vardict.xml Tue Aug 25 05:41:19 2020 -0400 @@ -0,0 +1,176 @@ +<tool id="vardict_java" name="VarDict" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> + <description>calls SNVs and indels for tumor-normal pairs</description> + <macros> + <import>macros.xml</import> + </macros> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">vardict-java</requirement> + <requirement type="package" version="5.0.1">gawk</requirement> + <requirement type="package" version="1.10">samtools</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + #if $select_mode.mode == "paired" + ln -s '$select_mode.normal' ./normal.bam && + ln -s '$select_mode.normal.metadata.bam_index' ./normal.bam.bai && + #end if + ln -s '$select_mode.tumor' ./tumor.bam && + ln -s '$select_mode.tumor.metadata.bam_index' ./tumor.bam.bai && + + ## INDEX REFERENCE FASTA FILE IF FROM HISTORY + #if $reference_source.reference_source_selector == "history": + ln -s '$reference_source.ref_file' ./ref.fa && + samtools faidx ./ref.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for vardict' >&2 && + #else if $reference_source.reference_source_selector == "cached" + ln -s '$reference_source.ref_file.fields.path' ./ref.fa && + ln -s '${reference_source.ref_file.fields.path}.fai' ./ref.fa.fai && + #end if + + ## build BED file from chromosome list + #if $interval_file: + grep -w -f '$interval_file' ./ref.fa.fai > ./chromosomes.fa.fai && + #else + ln -s ./ref.fa.fai ./chromosomes.fa.fai && + #end if + awk 'BEGIN {FS=OFS="\t"} {print $1, "1", $2}' ./chromosomes.fa.fai > ./regions.bed && + + vardict-java + #if $select_mode.mode == "paired" + -b "./tumor.bam|./normal.bam" + -N 'Tumor' + #else + -b "./tumor.bam" + -N 'Sample' + #end if + -G ./ref.fa + -z + -th \${GALAXY_SLOTS:-1} + + -f '$advancedsettings.f' + -k '$advancedsettings.k' + -r '$advancedsettings.r' + -B '$advancedsettings.B' + -Q '$advancedsettings.Q' + -q '$advancedsettings.q' + -m '$advancedsettings.m' + -T '$advancedsettings.T' + -X '$advancedsettings.X' + -P '$advancedsettings.P' + -o '$advancedsettings.o' + -O '$advancedsettings.O' + -V '$advancedsettings.V' + + ## construct VFC table + -c 1 -S 2 -E 3 -g 4 + ./regions.bed + + ## postprocessing + #if $select_mode.mode == "paired" + | testsomatic.R + | var2vcf_paired.pl + -N 'Tumor|Normal' + #else + | teststrandbias.R + | var2vcf_valid.pl + -N 'Sample' + -E + #end if + -f '$advancedsettings.f' + + > '$all_variants' && + + ## Filter for PASS variants + awk 'BEGIN {FS=OFS="\t"} substr(\$0, 1, 1) == "#" {print \$0; next} \$7 == "PASS" {print \$0}' '$all_variants' > '$passed_variants' + ]]></command> + <inputs> + <conditional name="select_mode"> + <param name="mode" type="select" label="Choose run mode"> + <option value="single">Single sample mode</option> + <option value="paired" selected="True">Paired variant calling</option> + </param> + <when value="single"> + <expand macro="input_default" /> + </when> + <when value="paired"> + <param name="normal" type="data" format="bam" label="Normal file" /> + <expand macro="input_default" /> + </when> + </conditional> + <section name="advancedsettings" title="Advanced Settings" expanded="False"> + <param argument="-f" type="float" min="0.0" max="1.0" value="0.01" label="Minimum variant allele fraction" /> + <param argument="-k" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Indicate whether to perform local realignment" /> + <param argument="-r" type="integer" min="0" value="2" label="Minimum number of reads supporting the variant" /> + <param argument="-B" type="integer" min="0" value="2" label="Minimum number of reads for determining strand bias" /> + <param argument="-Q" type="integer" min="0" value="1" label="Minimum mapping quality for reads to be considered" /> + <param argument="-m" type="integer" value="8" label="Maximum number of mismatches before a read is no longer considered (gaps are not counted as mismatches)" /> + <param argument="-T" type="integer" value="0" label="Maximum number of bases considered from 5' end (default: 0, no trimming)" /> + <param argument="-X" type="integer" value="3" label="Maximum number of extended based after indel to look for mismatches" /> + <param argument="-P" type="integer" value="5" label="Maximum average read position for a variant to be considered." /> + <param argument="-q" type="integer" value="25" label="Minimum phred score for a base to be considered a good call" /> + <param argument="-o" type="float" value="1.5" label="Minimum quality ratio [(good_quality_reads)/(bad_quality_reads+0.5)] (based on definition of a good call; see previous option)" /> + <param argument="-O" type="float" min="0" value="0" label="Minimum average mapping quality" /> + <param argument="-V" type="float" min="0.0" max="1.0" value="0.05" label="Maximum allowed variant allele fraction in the normal sample" /> + </section> + <expand macro="ref_select" /> + </inputs> + <outputs> + <data name="all_variants" format="vcf" label="VarDict SNVs and Indels (All)" /> + <data name="passed_variants" format="vcf" label="VarDict SNVs and Indels (Passed)" /> + </outputs> + <tests> + <test expect_num_outputs="2"> + <conditional name="select_mode"> + <param name="mode" value="paired" /> + <param name="normal" ftype="bam" value="normal.bam" /> + <param name="tumor" ftype="bam" value="tumor.bam" /> + </conditional> + <conditional name="reference_source"> + <param name="reference_source_selector" value="history"/> + <param name="ref_file" ftype="fasta" value="genome.fasta" /> + </conditional> + <output name="all_variants" file="all_variants_paired.vcf" /> + <output name="passed_variants" file="passed_variants_paired.vcf" /> + </test> + <test expect_num_outputs="2"> + <conditional name="select_mode"> + <param name="mode" value="paired" /> + <param name="normal" ftype="bam" value="normal.bam" /> + <param name="tumor" ftype="bam" value="tumor.bam" /> + </conditional> + <conditional name="reference_source"> + <param name="reference_source_selector" value="cached"/> + <param name="ref_file" value="test_buildid"/> + </conditional> + <output name="all_variants" file="all_variants_paired.vcf" /> + <output name="passed_variants" file="passed_variants_paired.vcf" /> + </test> + <test expect_num_outputs="2"> + <conditional name="select_mode"> + <param name="mode" value="single" /> + <param name="tumor" ftype="bam" value="tumor.bam" /> + </conditional> + <conditional name="reference_source"> + <param name="reference_source_selector" value="cached"/> + <param name="ref_file" value="test_buildid"/> + </conditional> + <output name="all_variants" file="all_variants_single.vcf" /> + <output name="passed_variants" file="passed_variants_single.vcf" /> + </test> + </tests> + <help> + <![CDATA[ +VarDict +======= + +VarDict is a sensitive variant caller for both single and paired sample variant calling from BAM files. +VarDict implements several novel features such as amplicon bias aware variant calling from targeted sequencing experiments, +rescue of long indels by realigning bwa soft clipped reads and better scalability than many other Java based variant callers. + +For more information see the VarDict documentation_. + +.. _documentation: https://github.com/AstraZeneca-NGS/VarDictJava + ]]> + </help> + <citations> + <citation type="doi">10.1093/nar/gkw227</citation> + </citations> +</tool>