FilterVcfForHmmIBD
FilterVcfForHmmIBD
- author
- Jonn Smith
- description
- Standalone filtration of a VCF/BCF for IBD analysis, runnable on its own or called by the HmmIBD workflow. Masks low-depth genotypes, (optionally) preserves original allele frequencies, recomputes AN/AC/AF, selects variant types / biallelic sites, and optionally thins to a variant cap. The filtered callset is emitted in the requested output_format: a compressed BCF (default), a bgzipped VCF, or the hmmibd-rs text genotype table (+ matching allele-frequency file).
- outputs
- {'filtered_bcf': 'Filtered, AN/AC/AF-recomputed callset as a compressed BCF (always produced)', 'filtered_bcf_index': 'CSI index for filtered_bcf', 'filtered_vcf': "Filtered callset as a bgzipped VCF; only when output_format='vcf'", 'filtered_vcf_index': "Tabix index for filtered_vcf; only when output_format='vcf'", 'sample_gt_table': "hmmIBD text genotype table; only when output_format='hmmibd_table'", 'sample_freq_table': "Matching bi-allelic allele-frequency file; only when output_format='hmmibd_table'"}
Inputs
Required
input_vcf(File, required): VCF/BCF to filter prior to IBD inference. (required)prefix(String, required): Basename / sample-set name for all outputs. (required)
Optional
convert_runtime_attr_override(RuntimeAttr?): Override runtime for the vcf/table conversion task. (default: none)filter_runtime_attr_override(RuntimeAttr?): Override runtime for the filtration task. (default: none)populations_file(File?): Optional sample-to-population file for per-population AN/AC/AF. (default: none)rename_annots_tsv(File?): Required when keep_original_af=true: old-namenew-name TSV. (default: none)
Defaults
biallelic_only(Boolean, default=true): Restrict to biallelic sites. (default: true)filter_extra_args(String, default=""): Additional args appended verbatim to the final bcftools view invocation. (default: empty)keep_original_af(Boolean, default=false): Preserve the original allele-frequency annotations (via rename_annots_tsv) before recomputing AN/AC/AF. (default: false)mask_gq0_genotypes(Boolean, default=false): Also set GQ0 genotypes to missing (beyond the DP < min_depth mask). Reproduces the GATK GQ0-hom-ref fix (issue #7792 / PR #8741) for VCFs from pre-4.6.0.0 GenotypeGVCFs or GnarlyGenotyper, where no-/low-confidence hom-refs are 0/0:GQ=0 instead of ./. — the DP mask alone misses GQ0 calls with DP >= min_depth. Conservative: drops all GQ0 hom-refs (use a GVCF cross-reference to keep well-covered ones). (default: false)max_variants(Int, default=0): Optional cap; when >0 the callset is thinned evenly to at most this many variants. (default: 0 = no limit)min_depth(Int, default=5): Genotypes with FORMAT/DP below this value are set to missing. (default: 5)output_format(String, default="bcf"): Format to emit: 'bcf' (default), 'vcf', or 'hmmibd_table' (hmmibd-rs text genotype + freq tables). The BCF is always produced; vcf/table are additional conversions of it.split_multiallelics(Boolean, default=true): Split multiallelics into biallelic records to recover SNP alleles. (default: true)variant_types(String, default="snps"): Which variant types to keep: 'snps', 'indels', or 'both'. (default: snps)
Outputs
filtered_bcf(File)filtered_bcf_index(File)filtered_vcf(File?)filtered_vcf_index(File?)sample_gt_table(File?)sample_freq_table(File?)
Dot Diagram
