mecfs_bio.build_system.task.genome_reference_harmonization.options
Options for genome-reference harmonization, validated at construction.
Classes:
-
GenomeReferenceHarmonizationOptions–min_checkable_snvs, min_checkable_indels: a table is trusted only if it has at least
GenomeReferenceHarmonizationOptions
min_checkable_snvs, min_checkable_indels: a table is trusted only if it has at least this many checkable SNVs (non-palindromic) and indels, all consistent with NEA as the reference allele. palindrome_maf_threshold, panel_maf_threshold: an untrusted palindromic SNV is resolved by frequency only when both its summary-statistic MAF and its panel MAF are at most these (gwaslab's defaults). palindrome_max_af_distance: an untrusted palindromic SNV is resolved only if, after the strand decision, its EAF is within this distance of the panel AF. Beyond 0.1, panels often contradict each other's strand call; see experiments/claude/gnomad_af_reference/palindrome_distance_vs_panel_disagreement.md. indel_max_af_distance, indel_min_af_margin: stringent rules for untrusted ambiguous indels. A reading is chosen only if its predicted EAF is within the distance and beats the other reading by at least the margin. max_suspicious_indel_fraction: a table is trusted only if at most this fraction of its checkable ambiguous indels (both orientations on the FASTA, with EAF and a panel record) are suspicious -- their EAF matches the complement of the opposite orientation's panel frequency, evidence the source is not perfectly reference-aligned. The suspicion test uses the same indel_max_af_distance and indel_min_af_margin. min_checkable_ambiguous_indels: the suspicious-fraction test is applied only when at least this many checkable ambiguous indels exist; below it the signal is too sparse to judge and does not affect trust. keep_unresolved_palindromes: keep untrusted palindromic SNVs whose strand cannot be resolved, instead of dropping them. Never applies to indels. excluded_chromosomes: gwaslab chromosome codes whose rows are dropped (MT by default, since UCSC hg19 chrM is not rCRS). extra_column_rules: flip rules for dataset-specific columns. max_gather_bytes: memory budget for one reference-gather slice.
Attributes:
-
excluded_chromosomes(tuple[int, ...]) – -
extra_column_rules(tuple[ExtraColumnRule, ...]) – -
indel_max_af_distance(float) – -
indel_min_af_margin(float) – -
keep_unresolved_palindromes(bool) – -
max_gather_bytes(int) – -
max_suspicious_indel_fraction(float) – -
min_checkable_ambiguous_indels(int) – -
min_checkable_indels(int) – -
min_checkable_snvs(int) – -
palindrome_maf_threshold(float) – -
palindrome_max_af_distance(float) – -
panel_maf_threshold(float) –