Mercurial > repos > iuc > bcftools_call
changeset 17:22637b1a55bf draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit db275932cbb485cb44ae91e0b421d6f57698db49
| author | iuc | 
|---|---|
| date | Tue, 20 Sep 2022 13:00:06 +0000 | 
| parents | c37b684e7f4e | 
| children | 544cb432072b | 
| files | bcftools_call.xml macros.xml test-data/mpileup.AD.vcf test-data/summary.pdf | 
| diffstat | 4 files changed, 4260 insertions(+), 9 deletions(-) [+] | 
line wrap: on
 line diff
--- a/bcftools_call.xml Sat Jul 23 13:59:41 2022 +0000 +++ b/bcftools_call.xml Tue Sep 20 13:00:06 2022 +0000 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@"> +<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description>SNP/indel variant calling from VCF/BCF</description> <macros> <token name="@EXECUTABLE@">call</token> @@ -93,6 +93,7 @@ ## Input/output section #set $section = $sec_input_output +${section.group_samples} ${section.keep_alts} #if $section.format_fields: --format-fields '${section.format_fields}' @@ -103,6 +104,10 @@ #end if ${section.variants_only} +#if $section.output_tags + --annotate $section.output_tags +#end if + @OUTPUT_TYPE@ @THREADS@ @@ -184,6 +189,7 @@ <expand macro="macro_samples" /> </section> <section name="sec_input_output" expanded="false" title="Input/output Options"> + <param name="group_samples" argument="--group-samples" type="boolean" truevalue="--group-samples -" falsevalue="" label="Single Sample Calling" help="Group samples by population for single-sample calling (-G - is the only option implemented so far)" /> <param name="keep_alts" argument="--keep-alts" type="boolean" truevalue="--keep-alts" falsevalue="" label="Keep alts" help="Output all alternate alleles present in the alignments even if they do not appear in any of the genotypes" /> <param name="format_fields" argument="--format-fields" type="text" value="" optional="true" label="Comma-separated list of FORMAT fields to output for each sample" help="Currently GQ and GP fields are supported" > @@ -195,6 +201,11 @@ <option value="snps">snps</option> </param> <param name="variants_only" argument="--variants-only" type="boolean" truevalue="--variants-only" falsevalue="" label="Output variant sites only" /> + <expand macro="macro_output_tags"> + <option value="INFO/PV4">INFO/PV4: P-values for strand bias, baseQ bias, mapQ bias and tail</option> + <option value="FORMAT/GQ">FORMAT/GQ: Phred-scaled genotype quality</option> + <option value="FORMAT/GP">FORMAT/GP: Phred-scaled genotype posterior probabilities</option> + </expand> </section> <expand macro="macro_select_output_type" /> </inputs> @@ -249,6 +260,58 @@ </assert_contents> </output> </test> + <!-- Test annotate --> + <test> + <param name="input_file" ftype="vcf" value="mpileup.X.vcf" /> + <param name="method" value="consensus" /> + <param name="output_type" value="v" /> + <param name="ploidy_file" value="mpileup.ploidy" /> + <section name="sec_input_output"> + <param name="output_tags" value="INFO/PV4"/> + </section> + <output name="output_file"> + <assert_contents> + <has_text text="DP4=2,4,8,11" /> + <has_text text="PV4=1,1,1,1" /> + </assert_contents> + </output> + <assert_command> + <has_text text="--annotate" /> + </assert_command> + </test> + <!-- Test region overlap--> + <test> + <param name="input_file" ftype="vcf" value="mpileup.vcf" /> + <param name="method" value="multiallelic" /> + <param name="variants_only" value="true" /> + <param name="output_type" value="v" /> + <section name="sec_restrict"> + <param name="regions_overlap" value="1"/> + </section> + <output name="output_file"> + <assert_contents> + <has_text text="DP4=2,4,8,11;MQ=49" /> + </assert_contents> + </output> + <assert_command> + <has_text text="--regions-overlap" /> + </assert_command> + </test> + <!-- Test group samples option--> + <test> + <param name="input_file" ftype="vcf" value="mpileup.AD.vcf" /> + <param name="method" value="multiallelic" /> + <param name="output_type" value="v" /> + <section name="sec_input_output"> + <param name="group_samples" value="true" /> + </section> + <output name="output_file"> + <assert_contents> + <has_text text="bcftools_callCommand=call -m --prior 0.0011 --group-samples - " /> + <has_text text="DP=1;ADF=1;ADR=0;DPR=1;MQ0F=0;AN=2;DP4=1,0,0,0;MQ=37" /> + </assert_contents> + </output> + </test> </tests> <help><![CDATA[ ==================================
--- a/macros.xml Sat Jul 23 13:59:41 2022 +0000 +++ b/macros.xml Tue Sep 20 13:00:06 2022 +0000 @@ -1,5 +1,7 @@ <macros> - <token name="@TOOL_VERSION@">1.10</token> + <token name="@TOOL_VERSION@">1.15.1</token> + <token name="@VERSION_SUFFIX@">0</token> + <token name="@PROFILE@">20.01</token> <xml name="bio_tools"> <xrefs> <xref type="bio.tools">bcftools</xref> @@ -8,15 +10,15 @@ <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">bcftools</requirement> - <requirement type="package" version="1.10">htslib</requirement> + <requirement type="package" version="1.15.1">htslib</requirement> <yield /> </requirements> </xml> <xml name="samtools_requirement"> - <requirement type="package" version="1.10">samtools</requirement> + <requirement type="package" version="1.15.1">samtools</requirement> </xml> <xml name="matplotlib_requirement"> - <requirement type="package" version="3.4.3">matplotlib</requirement> + <requirement type="package" version="3.5.3">matplotlib</requirement> </xml> <xml name="version_command"> <version_command>bcftools 2>&1 | grep 'Version:'</version_command> @@ -39,6 +41,10 @@ ]]> </token> <xml name="macro_input"> + <!-- + REQUIRES https://github.com/galaxyproject/galaxy/pull/14605/files + <param name="input_files" type="data" format="vcf,vcf.gz,vcf_bgzip,bcf" label="Other VCF/BCF Datasets" multiple="True" /> + --> <param name="input_file" type="data" format="vcf,vcf_bgzip,bcf" label="VCF/BCF Data" /> </xml> <token name="@PREPARE_INPUT_FILE@"> @@ -48,6 +54,7 @@ #if $input_file.is_of_type('vcf') bgzip -c '$input_file' > $input_vcf && bcftools index $input_vcf && +##elif $input_file.is_of_type('vcf_bgzip') or $input_file.is_of_type('vcf.gz') #elif $input_file.is_of_type('vcf_bgzip') ln -s '$input_file' $input_vcf && #if $input_file.metadata.tabix_index: @@ -71,6 +78,10 @@ </token> <xml name="macro_inputs"> + <!-- + REQUIRES https://github.com/galaxyproject/galaxy/pull/14605/files + <param name="input_files" type="data" format="vcf,vcf.gz,vcf_bgzip,bcf" label="Other VCF/BCF Datasets" multiple="True" /> + --> <param name="input_files" type="data" format="vcf,vcf_bgzip,bcf" label="Other VCF/BCF Datasets" multiple="True" /> </xml> <token name="@PREPARE_INPUT_FILES@"> @@ -83,7 +94,8 @@ #if $input_file.is_of_type('vcf') bgzip -c '$input_file' > $input_vcf && bcftools index $input_vcf && - #elif $input_file.is_of_type('vcf_bgzip') + ##elif $input_file.is_of_type('vcf_bgzip') or $input_file.is_of_type('vcf.gz') -> REQUIRES https://github.com/galaxyproject/galaxy/pull/14605 + #elif $input_file.is_of_type('vcf_bgzip') or $input_file.is_of_type('vcf.gz') ln -s '$input_file' $input_vcf && #if $input_file.metadata.tabix_index: ln -s '${input_file.metadata.tabix_index}' ${input_vcf}.tbi && @@ -318,6 +330,11 @@ <yield /> </when> </conditional> + <param argument="--@TYPE@s-overlap" type="select" optional="true" label="@LABEL_TYPE@ overlap" help="Include if POS in the region (0), record overlaps (1), variant overlaps (2)"> + <option value="0">0: POS in the region</option> + <option value="1">1: Record overlaps</option> + <option value="2">2: Variant overlaps</option> + </param> </xml> <token name="@PARSE_INTERVALS@"> @@ -337,6 +354,28 @@ ]]> </token> + <token name="@MASK@"> +<![CDATA[ +#if $section.conditional_soft_filter.selector == 'enabled' and $section.conditional_soft_filter.soft_filter + #if $section.conditional_soft_filter.masks.masks_src == 'regions': + #set $intervals = $section.conditional_soft_filter.masks.masks + @PARSE_INTERVALS@ + --mask '$intervals_spec' + #elif $section.conditional_soft_filter.masks.masks_src == 'masks_file' and $section.conditional_soft_filter.masks.masks_file: + #if $masks_path is not None: + --mask-file '$masks_path' + #else: + --mask-file '$section.conditional_soft_filter.masks.masks_file' + #end if + #end if + #if $section.conditional_soft_filter.masks_overlap + --mask-overlap $section.conditional_soft_filter.masks_overlap + #end if +#end if + +]]> + </token> + <token name="@REGIONS@"> <![CDATA[ #if $section.regions.regions_src == 'regions': @@ -350,6 +389,10 @@ --regions-file '$section.regions.regions_file' #end if #end if +#if $section.regions_overlap + --regions-overlap $section.regions_overlap +#end if + ]]> </token> @@ -364,6 +407,9 @@ #elif $section.targets.targets_src == 'targets_file' and $section.targets.targets_file: --targets-file "${section.targets.invert_targets_file}${section.targets.targets_file}" #end if +#if $section.targets_overlap + --targets-overlap $section.targets_overlap +#end if ]]> </token> @@ -410,8 +456,8 @@ <xml name="macro_samples"> <param argument="--samples" type="text" value="" optional="true" label="Samples" - help="Comma separated list of samples to annotate (or exclude)"> - <validator type="regex" message="">^(\w+(,\w+)*)?$</validator> + help="Comma-separated list of samples to annotate (or exclude) or - to include all samples"> + <validator type="regex" message="Comma-separated list of samples or - to include all samples">^(-|\w+(,\w+)*)?$</validator> </param> <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples" help="Inverts the query/filtering applied by Samples (adds "^" prefix to exclude)" /> @@ -476,7 +522,7 @@ <xml name="macro_columns"> <param name="columns" type="text" value="" optional="true" label="Columns" help="List of columns in the annotation file, e.g. CHROM,POS,REF,ALT,-,INFO/TAG. See man page for details"> - <validator type="regex" message="COLUMN names separated by commas">^([^,]+(,[^,]+)*)?$</validator> + <validator type="regex" message="COLUMN names separated by commas">^([^,]+(,[^,]+)*)?$</validator> </param> </xml> <token name="@COLUMNS@"> @@ -496,7 +542,18 @@ ${section.vcf_ids} </token> +<xml name="macro_output_tags"> + <param name="output_tags" argument="--annotate" type="select" optional="true" multiple="True" display="checkboxes" label="Optional tags to output" help="--annotate"> + <yield /> + </param> +</xml> + +<xml name="macro_overlap" token_argument="" token_label=""> +</xml> + + <token name="@OUTPUT_HELP@"> + <