Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ba966e0
Updating tools/bcftools from version 1.24 to 1.25
Nov 16, 2026
f5e7b37
bcftools_gtcheck: remove deprecated and unsupported options
mertydn Nov 20, 2026
d28808f
bcftools_gtcheck: refactor comparison mode and add use tag selection
mertydn Nov 20, 2026
66f07e4
bcftools_gtcheck: add analysis type conditional and discordance options
mertydn Nov 20, 2026
0e805f5
bcftools_gtcheck: add include/exclude filtering and enrich help docum…
mertydn Nov 20, 2026
1da5af8
bcftools_merge: fix --no-index emission, add exact merge mode, and ex…
mertydn Nov 21, 2026
1e712e8
bcftools_annotate: add --columns-file option
mertydn Nov 21, 2026
cd6490c
bcftools_annotate: fix header_lines filtering to preserve all VCF hea…
mertydn Nov 21, 2026
0fee3e3
bcftools_annotate: update help documentation
mertydn Nov 21, 2026
7533ea0
bcftools_stats: pin tectonic to 0.16.9 to prevent container panic
mertydn Nov 21, 2026
0d93e59
bcftools_merge: remove --no-index param
mertydn Nov 23, 2026
1b53c2b
bcftools_merge: reorder options and move no-version to header section
mertydn Nov 23, 2026
04bc305
bcftools_merge: refactor info-rules into dropdown conditional with re…
mertydn Nov 23, 2026
deee6ba
bcftools_merge: simplify option labels, reorder inputs, and expand he…
mertydn Nov 23, 2026
4ed9c52
bcftools_merge: add VCF tag validators, refactor missing-rules, and i…
mertydn Nov 23, 2026
1f1ce4c
bcftools_call: support group-samples file, multi-threshold gvcf, fix …
mertydn Nov 23, 2026
ba6d732
bcftools_concat: remove unused targets help macro
mertydn Nov 23, 2026
4f76991
bcftools_consensus: fix param name ins_custom and fix typo in snv_cus…
mertydn Nov 23, 2026
291b228
bcftools_convert: fix keep-duplicates command duplication and fix des…
mertydn Nov 23, 2026
9387c34
bcftools_csq: add --format and --allow options with documentation and…
mertydn Nov 23, 2026
6aea484
bcftools_gtcheck: fix doubled word
mertydn Nov 23, 2026
1a5d423
bcftools_filter: add mask negate option and update SnpGap help
mertydn Nov 27, 2026
e8f1d38
bcftools_mpileup: update min-BQ default, remove duplicate open-prob, …
mertydn Nov 27, 2026
f2f6232
bcftools_norm: add check-ref letter-case handling and --no-update option
mertydn Nov 27, 2026
d921985
bcftools_reheader: switch --samples to --samples-file and add --sampl…
mertydn Nov 27, 2026
b34cd83
bcftools_roh: update --estimate-AF macro and remove invalid --sample …
mertydn Nov 27, 2026
9e62a6a
bcftools_view: fix swapped short-flag labels for known/novel and head…
mertydn Nov 27, 2026
25934e8
bcftools_merge: fix linting error
mertydn Nov 27, 2026
04a6e82
bcftools_gtcheck: extract --pairs macro and add validator
mertydn Nov 27, 2026
2b1f507
bcftools_gtcheck: enforce >0 distinctive-sites fraction
mertydn Nov 27, 2026
85a7b03
bcftools_gtcheck: document -s gt:- in cross-check help
mertydn Nov 27, 2026
2cf01e1
bcftools_reheader: validate and trim --samples-list
mertydn Nov 27, 2026
e1adf8e
bcftools_concat: remove unused expressions help macro
mertydn Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 69 additions & 5 deletions tools/bcftools/bcftools_annotate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#set $annotation_hdr = $section.annofile.header_file
#elif $section.annofile.header_lines:
#set $annotation_hdr = 'annotation.hdr'
grep '^\#\#INFO' '${hdr_file}' > $annotation_hdr &&
grep '^\#\#' '${hdr_file}' > $annotation_hdr &&
#end if
#end if
#set $section = $sec_restrict
Expand All @@ -50,7 +50,11 @@ bcftools @EXECUTABLE@
@PREPARE_REGIONS_FILE@

#set $section = $sec_annofile
@COLUMNS@
#if $section.columns_file:
--columns-file '$section.columns_file'
#else:
@COLUMNS@
#end if
#if $annotation_file:
--annotations '${annotation_file}'
#end if
Expand Down Expand Up @@ -109,13 +113,15 @@ ${section.keep_sites}
<configfiles>
<configfile name="hdr_file"><![CDATA[#slurp
#if $sec_annofile.annofile.anno_fmt == 'tab' and str($sec_annofile.annofile.header_lines) != '':
$sec_annofile.annofile.header_lines.__str__.strip()#slurp
$sec_annofile.annofile.header_lines.strip()
#end if]]></configfile>
</configfiles>
<inputs>
<expand macro="macro_input" />
<section name="sec_annofile" expanded="false" title="Add Annotations">
<expand macro="macro_columns" />
<param argument="--columns-file" type="data" format="tabular,txt" optional="true" label="Columns file"
help="Read column names from a file (one name per row, with optional merge logic). Can be used instead of comma-separated columns above." />
<conditional name="annofile">
<param name="anno_fmt" type="select" label="Annotations File">
<option value="none">None</option>
Expand Down Expand Up @@ -447,15 +453,73 @@ $sec_annofile.annofile.header_lines.__str__.strip()#slurp
<has_text text="--merge-logic 'T_INT:sum'" />
</assert_command>
</test>
<test>
<param name="input_file" ftype="vcf" value="annotate.vcf" />
<section name="sec_annofile">
<conditional name="annofile">
<param name="anno_fmt" value="tab" />
<param name="annotations" value="annotate.tab" />
<param name="header_file" value="annotate.hdr" />
</conditional>
<param name="columns_file" value="annotate_columns.txt" />
</section>
<param name="output_type" value="v" />
<output name="output_file">
<assert_contents>
<has_text text="snp_3000150" />
<has_text_matching expression="1\t3000150\tsnp_3000150\tC\tT\t999\tPASS\t.*T_INT=1,2" />
<has_text text="T_FLOAT=1e-10,2e-10" />
<has_text text="indel_3062915" />
</assert_contents>
</output>
<assert_command>
<has_text text="--columns-file" />
</assert_command>
</test>
<test>
<param name="input_file" ftype="vcf" value="annotate.vcf" />
<section name="sec_annofile">
<conditional name="annofile">
<param name="anno_fmt" value="tab" />
<param name="annotations" value="annotate.tab" />
<param name="header_lines" value="##INFO=&lt;ID=T_INT,Number=.,Type=Integer,Description=&quot;Test INT&quot;&gt;&#10;##INFO=&lt;ID=T_FLOAT,Number=.,Type=Float,Description=&quot;Test FLOAT&quot;&gt;&#10;##FILTER=&lt;ID=CustomFilter,Description=&quot;Custom filter test&quot;&gt;" />
</conditional>
<param name="columns" value="CHROM,POS,REF,ALT,ID,QUAL,INFO/T_INT,INFO/T_FLOAT,INDEL" />
</section>
<param name="output_type" value="v" />
<output name="output_file">
<assert_contents>
<has_text text="snp_3000150" />
<has_text text="CustomFilter" />
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
==================================
bcftools @EXECUTABLE@
==================================

Annotate and edit VCF/BCF files.
Annotate and edit VCF/BCF files. This tool allows adding annotations from external VCF/BCF or tab-delimited/BED files, removing unwanted fields, setting or updating variant IDs, and renaming chromosomes or annotation tags.

Annotation Sources
------------------

* **VCF/BCF files (``-a``):** Transfers existing ID, QUAL, FILTER, INFO, and FORMAT fields from a secondary VCF/BCF file.
* **Tab-delimited / BED files (``-a``):** Imports arbitrary annotations from a tabix-indexed table. Tab-delimited files use 1-based coordinates (CHROM, POS or FROM, TO), while BED files use 0-based half-open intervals. Header lines (``-h``) must be provided for newly introduced tags.

Key Capabilities
----------------

* **Column specifications:** Define columns to import directly or via a columns file (``-C``), with optional per-tag merge logic.
* **Overlap controls:** Handle multi-region overlaps with customizable merge logic (``-l``) and minimum overlap thresholds (``--min-overlap``).
* **ID & site manipulation:** Assign custom IDs on the fly (``--set-id``), flag matching sites (``--mark-sites``), or selectively strip tags (``--remove``).
* **Tag & sequence renaming:** Rename contigs (``--rename-chrs``) or INFO/FORMAT/FILTER tags (``--rename-annots``) using translation mappings.

Examples
--------

Examples:
::

# Remove three fields
bcftools annotate -x ID,INFO/DP,FORMAT/DP file.vcf.gz
Expand Down
52 changes: 43 additions & 9 deletions tools/bcftools/bcftools_call.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ bcftools @EXECUTABLE@
#set $section = $sec_consensus_variant_calling.variant_calling
#if $section.method == 'multiallelic':
-m
#if str($section.gvcf):
--gvcf $section.gvcf
#if str($section.gvcf).strip():
--gvcf '$section.gvcf'
#end if
#if str($section.prior_freqs):
--prior-freqs '$section.prior_freqs'
Expand Down Expand Up @@ -88,7 +88,11 @@ bcftools @EXECUTABLE@

## Input/output section
#set $section = $sec_input_output
${section.group_samples}
#if $section.group_samples_file:
--group-samples '$section.group_samples_file'
#else:
${section.group_samples}
#end if
#if $section.group_samples_tag:
--group-samples-tag '${section.group_samples_tag}'
#end if
Expand Down Expand Up @@ -162,7 +166,9 @@ For example: --prior-freqs REF_AN,REF_AC
<validator type="regex" message="The INFO tags (separated by a comma), e.g. AN,AC">^(\w+,\w+)?$</validator>
</param>
<param argument="--prior" type="float" value="1.1e-3" optional="true" label="Prior" help="Expected substitution rate"/>
<param argument="--gvcf" type="integer" optional="true" label="Output also gVCF blocks of homozygous REF calls" help="The parameter value is the minimum per-sample depth required to include a site in the non-variant block"/>
<param argument="--gvcf" type="text" value="" optional="true" label="Output also gVCF blocks of homozygous REF calls" help="Group non-variant sites into gVCF blocks by minimum per-sample DP. Either a single integer threshold or a comma-separated list of thresholds (e.g. 5,15)">
<validator type="regex" message="An integer or comma-separated list of integers">^([0-9]+(,[0-9]+)*)?$</validator>
</param>
</when>
<when value="consensus">
<conditional name="genotypes">
Expand All @@ -183,17 +189,16 @@ For example: --prior-freqs REF_AN,REF_AC
<section name="sec_file_format" expanded="false" title="File format Options">
<param argument="--ploidy" type="select" optional="true" label="Select predefined ploidy">
<option value="GRCh37">GRCh37 - Human Genome reference assembly GRCh37 / hg19</option>
<option value="GRCh38">GRCh37 - Human Genome reference assembly GRCh38 / hg38</option>
<option value="GRCh38">GRCh38 - Human Genome reference assembly GRCh38 / hg38</option>
<option value="X">X - Treat male samples as haploid and female as diploid regardless of the chromosome name</option>
<option value="Y">Y - Treat male samples as haploid and female as no-copy, regardless of the chromosome name"</option>
<option value="Y">Y - Treat male samples as haploid and female as no-copy, regardless of the chromosome name</option>
<option value="1">1 - Treat all samples as haploid</option>
</param>
<param argument="--ploidy-file" type="data" format="tabular" optional="true" label="Ploidy file" help="Space/tab-delimited list of CHROM,FROM,TO,SEX,PLOIDY"/>
<expand macro="macro_region_restrict"/>
<expand macro="macro_samples"/>
</section>
<section name="sec_input_output" expanded="false" title="Input/output Options">
<param 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 argument="--group-samples" type="boolean" truevalue="--group-samples -" falsevalue="" label="Single Sample Calling" help="Group samples by population for single-sample calling (-G -)"/>
<param name="group_samples_file" type="data" format="tabular" optional="true" label="Group samples by population file" help="Group samples by population using a two-column tab-delimited file ('sample\tgroup') (-G FILE). Requires FORMAT/QS or other Number=R,Type=Integer tag such as FORMAT/AD. If specified, this takes precedence over Single Sample Calling."/>
<param argument="--group-samples-tag" type="text" value="" optional="true" label="Group Samples Tag" help="The tag to use with -G, by default FORMAT/QS and FORMAT/AD are checked automatically"/>
<param 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 argument="--keep-unseen-allele" type="boolean" truevalue="--keep-unseen-allele" falsevalue="" label="Keep unseen allele" help="Keep the unobserved allele &lt;*&gt; or &lt;NON_REF&gt;"/>
Expand Down Expand Up @@ -427,6 +432,35 @@ For example: --prior-freqs REF_AN,REF_AC
<has_text text="--no-version"/>
</assert_command>
</test>
<!-- Test group_samples_file option -->
<test>
<param name="input_file" ftype="vcf" value="mpileup.AD.vcf"/>
<section name="sec_consensus_variant_calling">
<conditional name="variant_calling">
<param name="method" value="multiallelic"/>
</conditional>
</section>
<param name="output_type" value="v"/>
<section name="sec_input_output">
<param name="group_samples_file" value="mpileup.groups"/>
<param name="group_samples_tag" value="AD"/>
<param name="keep_unseen_allele" value="true"/>
</section>
<section name="sec_general">
<param name="no_version" value="true"/>
</section>
<output name="output_file">
<assert_contents>
<has_text text="DP=1"/>
</assert_contents>
</output>
<assert_command>
<has_text text="--group-samples '"/>
<has_text text="--group-samples-tag 'AD'"/>
<has_text text="--keep-unseen-allele"/>
<has_text text="--no-version"/>
</assert_command>
</test>
</tests>
<help><![CDATA[
==================================
Expand Down
2 changes: 0 additions & 2 deletions tools/bcftools/bcftools_concat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,6 @@ Option Interdependencies:


@REGIONS_HELP@
@TARGETS_HELP@
@EXPRESSIONS_HELP@

@BCFTOOLS_MANPAGE@#@EXECUTABLE@

Expand Down
4 changes: 2 additions & 2 deletions tools/bcftools/bcftools_consensus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ $masking_options.snvs.mark_snv
<when value="--mark-ins uc" />
<when value="--mark-ins lc" />
<when value="--mark-ins">
<param name="ins_cutom" type="text" optional="false" label="Character to use instead of an inserted base">
<param name="ins_custom" type="text" optional="false" label="Character to use instead of an inserted base">
<validator type="empty_field"/>
</param>
</when>
Expand All @@ -217,7 +217,7 @@ $masking_options.snvs.mark_snv
<when value="--mark-snv uc" />
<when value="--mark-snv lc" />
<when value="--mark-snv">
<param name="snv_custom" type="text" optional="false" label="Character to use instead of a subtituted base">
<param name="snv_custom" type="text" optional="false" label="Character to use instead of a substituted base">
<validator type="empty_field"/>
</param>
</when>
Expand Down
2 changes: 1 addition & 1 deletion tools/bcftools/bcftools_convert_from_vcf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $convert.vcf_ids $convert.haploid2diploid
@SAMPLE_SEX@

#if $keep_duplicates
--keep-duplicates $keep_duplicates
$keep_duplicates
#end if

## VCF input section
Expand Down
2 changes: 1 addition & 1 deletion tools/bcftools/bcftools_convert_to_vcf.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<tool name="bcftools @EXECUTABLE@ to vcf" id="bcftools_@EXECUTABLE@_to_vcf" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>Converts other formats to VCF/BCFk</description>
<description>Converts other formats to VCF/BCF</description>
<macros>
<token name="@EXECUTABLE@">convert</token>
<import>macros.xml</import>
Expand Down
60 changes: 60 additions & 0 deletions tools/bcftools/bcftools_csq.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,18 @@ $sec_csq_opts.local_csq
#if $sec_csq_opts.greedy
--greedy '$sec_csq_opts.greedy'
#end if
#if $sec_csq_opts.csq_format:
--format '$sec_csq_opts.csq_format'
#end if

## GFF options section
$sec_gff_opts.force
#if str($sec_gff_opts.unify_chr_names)
--unify-chr-names '$sec_gff_opts.unify_chr_names'
#end if
#if $sec_gff_opts.allow:
--allow '$sec_gff_opts.allow'
#end if

## Subset section
#set $section = $sec_subset
Expand Down Expand Up @@ -129,10 +135,34 @@ $sec_gff_opts.force
<option value="0">0: No</option>
<option value="1">1: Yes</option>
</param>
<param argument="--format" name="csq_format" type="select" multiple="true" display="checkboxes" optional="true" label="Additional fields to output">
<help><![CDATA[
Additional fields to output (all coordinates are 1-based):
- <strong>cds_position</strong>: Position in the coding sequence and CDS length.
- <strong>exon</strong>: Exon number and the number of exons in the transcript.
- <strong>exon_position</strong>: Position within the exon and exon length.
]]></help>
<option value="cds_position">cds_position</option>
<option value="exon">exon</option>
<option value="exon_position">exon_position</option>
</param>
</section>
<section name="sec_gff_opts" expanded="true" title="GFF Options">
<param argument="--force" type="boolean" truevalue="--force" falsevalue="" checked="false" label="Run even if some sanity checks fail" />
<param argument="--unify-chr-names" type="text" value="" optional="true" label="Unify chromosome naming by stripping a prefix in VCF,GFF,fasta, respectively" help="e.g., 'chr,Chr,-' trims 'chr' in VCF and 'Chr' in GFF, fasta is unchanged" />
<param argument="--allow" type="select" multiple="true" display="checkboxes" optional="true" label="Sanity checks to bypass">
<help><![CDATA[
Run even if these sanity checks fail:
- <strong>mif</strong>: Skip records without FASTA reference (missing-in-FASTA).
- <strong>mig</strong>: Skip contigs without GFF annotations (missing-in-GFF).
- <strong>cds-oop</strong>: Skip transcripts with phase errors (CDS-out-of-phase).
- <strong>ref-mm</strong>: Skip records with REF mismatch in VCF and FASTA (ref-mismatch).
]]></help>
<option value="mif">mif</option>
<option value="mig">mig</option>
<option value="cds-oop">cds-oop</option>
<option value="ref-mm">ref-mm</option>
</param>
</section>
<section name="sec_restrict" expanded="false" title="Restrict to">
<expand macro="macro_region_restrict"/>
Expand Down Expand Up @@ -246,6 +276,36 @@ $sec_gff_opts.force
<has_text text="--regions-overlap"/>
</assert_command>
</test>
<!-- Test format and allow options -->
<test>
<param name="input_file" ftype="vcf" value="csq.vcf"/>
<section name="sec_required">
<expand macro="test_using_reference" select_from="cached" ref="csq"/>
</section>
<section name="sec_required">
<param name="gff_annot" ftype="gff3" value="csq.gff3"/>
</section>
<param name="output_type" value="v"/>
<section name="sec_csq_opts">
<param name="csq_format" value="cds_position,exon"/>
</section>
<section name="sec_gff_opts">
<param name="allow" value="mif,mig"/>
</section>
<section name="sec_general">
<param name="no_version" value="true"/>
</section>
<output name="output_file">
<assert_contents>
<has_text text="BCSQ"/>
</assert_contents>
</output>
<assert_command>
<has_text text="--format 'cds_position,exon'"/>
<has_text text="--allow 'mif,mig'"/>
<has_text text="--no-version"/>
</assert_command>
</test>
</tests>
<help><![CDATA[
=====================================
Expand Down
Loading