Repository navigation
Update bcftools 1.25 - #8987
Update bcftools 1.25#8987mertydn wants to merge 33 commits into
Conversation
| --------------------- | ||
|
|
||
| Merges non-variant block records produced by haplotype callers (e.g. GATK HaplotypeCaller or DeepVariant) where an ``INFO/END`` tag is present. | ||
| Implies default rules ``-i QS:sum,MinDP:min,MIN_DP:min,I16:sum,IDV:max,IMF:max -M PL:max,AD:0``. |
There was a problem hiding this comment.
The --gvcf section of the bcftools man page lists the implied INFO rules as -i QS:sum,MinDP:min,I16:sum,IDV:max,IMF:max — there is no MIN_DP:min among them. As written, users may expect a MIN_DP rule that does not exist.
| Implies default rules ``-i QS:sum,MinDP:min,MIN_DP:min,I16:sum,IDV:max,IMF:max -M PL:max,AD:0``. | |
| Implies default rules ``-i QS:sum,MinDP:min,I16:sum,IDV:max,IMF:max -M PL:max,AD:0``. |
There was a problem hiding this comment.
Thanks for your comment. bcftools manual page appears to be outdated. Here is my reference : vcfmerge.c
Implementation in info_rules : vcfmerge.c#L444-L448
| The tool can operate in two primary comparison modes: | ||
|
|
||
| * **Cross-check within input dataset (default):** Performs all pairwise comparisons between samples in a single VCF/BCF file. | ||
| * **Against a reference genotypes dataset (``-g``):** Compares each sample from the query dataset against all or selected samples samples in a reference genotype dataset. |
There was a problem hiding this comment.
| * **Against a reference genotypes dataset (``-g``):** Compares each sample from the query dataset against all or selected samples samples in a reference genotype dataset. | |
| * **Against a reference genotypes dataset (``-g``):** Compares each sample from the query dataset against all or selected samples in a reference genotype dataset. |
| <macros> | ||
| <token name="@TOOL_VERSION@">1.24</token> | ||
| <token name="@VERSION_SUFFIX@">1</token> | ||
| <token name="@TOOL_VERSION@">1.25</token> |
There was a problem hiding this comment.
Question
This bump moves @TOOL_VERSION@ (and htslib/samtools) to 1.25 for every tool in the bcftools suite, but this PR only reworks gtcheck, merge and annotate is that correct?
There was a problem hiding this comment.
Yes, only gtcheck and merge will be refactored. i will just add the new parameters and kept the rest as is for all other tools
|
rebase is needed here |
Separate within-file cross-checking and reference genotype comparisons into explicit modes, and add FORMAT tag selection (--use).
Support discordance checking and finding distinctive sites, including sample filtering, pair selection, error probability, and top matches reporting.
…entation Add include/exclude expressions under restriction settings, and expand help documentation detailing comparison modes, analysis types, and output format.
…pand help - Move --no-index outside the merge condition so unindexed files can be merged with default merge settings. - Allow removing unobserved alleles even when merge mode is left as default. - Add -m exact multiallelic merge option. - Expand help documentation.
Allow reading annotation columns from a file (-C, --columns-file) in addition to comma-separated text.
…peat block for tag and method
…ploidy labels, and remove redundant macros
7a8d5cc to
6aea484
Compare
In macros.xml:
- Added a new macro 'macro_invert_masks' with a boolean checkbox ('invert_masks') that outputs '^' when enabled and nothing when disabled.
- Included 'macro_invert_masks' inside 'macro_mask_restrict' so users can invert mask regions or mask files in the UI.
- Updated the '@Mask@' command template to add the '^' prefix before both '--mask' and '--mask-file' values when 'invert_masks' is enabled.
- Fixed the '--mask-overlap' path in '@Mask@' from '$section.conditional_soft_filter.masks_overlap' to '$section.conditional_soft_filter.masks.masks_overlap' (checked with an 'if' guard), because 'masks_overlap' is defined inside the 'masks' conditional.
In bcftools_filter.xml:
- Added 'indel' to the 'SnpGap' help text and validator message.
- Added a test case for negating mask regions ('invert_masks="true"').
…and fix DPR label
- Added a 'check_ref_case' radio parameter to support allele letter-case handling in '-c/--check-ref' ('c' to match REF case to FASTA with ALT following the anchor case, 'C' to uppercase REF and ALT, or retain existing case by default), combined with 'check_ref' in the command line while preserving existing parameter behavior.
- Added the '--no-update' multi-select checkbox parameter (supporting 'AC' and 'AN' tags) under 'Other Options' so users can prevent recalculating these INFO tags from GT when alleles are modified.
- Added a test case covering '--check-ref wsC' and '--no-update AC,AN'.
…es-list - Updated the 'history' and 'entry' branches of the 'rename_samples' conditional to use '--samples-file' (-N) instead of the deprecated '--samples' flag for bcftools 1.25 compatibility. - Added a 'list' option to 'rename_samples' with a '--samples-list' (-n) text input parameter so users can rename samples directly with a comma-separated list. - Updated the tool help documentation and parameter descriptions accordingly.
…option
In macros.xml:
- Replaced the file-only 'macro_estimate_AF' input with a conditional supporting all samples ('-') or a samples file, plus a shared helper '__macro_estimate_AF_tag__' to select the FORMAT tag ('GT' or 'PL').
- Updated '@ESTIMATE_AF@' to emit '--estimate-AF <TAG>,-' or '--estimate-AF <TAG>,<FILE>'.
In bcftools_roh.xml:
- Removed the invalid '@sample@' and 'macro_sample' expansion ('--sample' causes an ambiguous option error alongside '--samples' and '--samples-file').
- Added a test case for '--estimate-AF GT,-'.
|
It's ready for your review. @wm75 @bgruening |
Summary
This PR continues the update of the
bcftoolssuite to version 1.25.Current Status & Roadmap
bcftools gtcheck: ✅ Completed — refactored to align with current upstream options.bcftools merge: ✅ Completed — refactored to align with current upstream options.Changes in
bcftools gtcheck1. Remove Deprecated Parameters
--all-sites,--query-sample,--target-sample, and--plot.--genotypescommand declarations.2. Structured Comparison Modes
comparison_modeconditional:-g): Checks sample identity against an external reference VCF/BCF dataset.--useFORMAT tag selection supportingPLandGT(single or paired tags).--homs-onlystrictly to the reference genotype comparison mode where it is applicable.3. Analysis Types & Advanced Options
analysis_typeconditional:qry:) and reference/target (gt:) prefixes via text list or tabular files (-s/-S).-p(comma-separated pairs) or-P(tabular pairs file).--n-matches(ranked by discordance score or HWE probability).--error-probability), HWE probability calculation control (--no-HWE-prob), and monoallelic reference site retention (--keep-refs).--distinctive-sites):4. Expression Filtering & Documentation
@INCLUDE@and@EXCLUDE@expression filtering under the restriction options.DCv2andDSrecords).Changes in
bcftools merge--info-rulesand--missing-rulesinto structured conditionals with repeatable tag/method rules and VCF tag regex validators.exactoption to-m(--merge) and expanded option descriptions.--no-indexparameter (all inputs are already indexed in@PREPARE_INPUT_FILES@).--no-versionto the Header Options section.-m,-g(--gvcf),-i(--info-rules), and-M(--missing-rules).Other Tools & Shared Macros
macros.xml: Bumped@TOOL_VERSION@(1.24→1.25),@VERSION_SUFFIX@(2→0),htslib/samtools(1.24→1.25), andmatplotlib(3.11.0→3.11.2); reworkedmacro_estimate_AF/@ESTIMATE_AF@into a 3-way conditional supportingGT/PLtag selection; addedmacro_invert_masks(^) and fixed--mask-overlapconditional path in@MASK@.bcftools annotate: Added--columns-file(-C) with test (test-data/annotate_columns.txt), broadenedheader_linesfiltering from^##INFOto^##(preserving##FILTER/##FORMATheaders), cleaned upheader_lines.strip(), and updated help docs.bcftools call: Addedgroup_samples_file(-G FILE) with test (test-data/mpileup.groups), updated--gvcfto accept comma-separated DP thresholds, fixed--ploidylabels (GRCh38/Y), and removed duplicatemacro_region_restrict/macro_samplesfromsec_file_format(already present insec_restrict).bcftools concat: Removed unsupported@TARGETS_HELP@and@EXPRESSIONS_HELP@sections from help.bcftools consensus: Fixed brokenins_cutom→ins_customparameter name andsubtitutedtypo.bcftools convert: Fixed duplicated--keep-duplicatesflag emission inbcftools_convert_from_vcf.xmland description typo (VCF/BCFk→VCF/BCF) inbcftools_convert_to_vcf.xml.bcftools csq: Added--format(cds_position,exon,exon_position) and--allow(mif,mig,cds-oop,ref-mm) options with test coverage.bcftools filter: Added mask negation test (invert_masks) and updatedSnpGaphelp/validator message to includeindel.bcftools mpileup: Updated-Q/--min-BQdefault (13→1), removed duplicateopen_seq_error_probabilityparameter, and fixedDRP→DPRoption label.bcftools norm: Addedcheck_ref_case(c/C) and--no-update(AC/AN) options with test coverage.bcftools reheader: Migrated--samples→--samples-file(-N) and added--samples-list(-n) with regex validation and comma-whitespace trimming.bcftools roh: Removed invalid@SAMPLE@/macro_sampleand added test coverage for--estimate-AF.bcftools view: Fixed swapped short-flag labels ((-k)/(-n)and(-h)/(-H)).Verification & Testing
planemo lintpasses with 0 errors/warnings.planemo testpasses cleanly.FOR CONTRIBUTOR:
[tool update guide][tool-update-guide])