Repository navigation
fix: ensure that selected AF and AN fields are written to the output vcf in find-sites - #173
johanneskoester wants to merge 4 commits into
Conversation
|
@brentp I did the latter in the second commit. I am not familiar with nim though and used Github Copilot to help with the change. |
There was a problem hiding this comment.
🟡 Changes recommended
When a record lacks the population-specific field selected by --AN-field, the output retains the original AN, silently reporting an unrelated allele count as the selected population’s value.
1 open issue
What changed in this PR
This PR updates find-sites to write the selected allele-count and allele-frequency fields under the canonical AN and AF names required by downstream somalier commands.
Changes:
- Add canonical INFO header definitions when custom field names are selected.
- Copy selected values into
ANandAFbefore writing records. - Preserve
ANandAFwhile removing other INFO fields.
| File | Description |
|---|---|
src/somalierpkg/findsites.nim |
Normalize selected INFO fields and update output field filtering. |
Review effort: Balanced
| if info.get(field_AN, ans) == Status.OK: | ||
| doAssert info.set("AN", ans) == Status.OK |
There was a problem hiding this comment.
@johanneskoester I think this is a small issue, but probably resolved with else info.delete("AN") likewise for AF
…d don't silently report the wrong (canonical) field
|
@brentp can you help me with the failing tests? |
|
yes, I'll take it from here. thanks! |
|
I merged this in #137 and tagged v0.3.7 thanks again! |

@brentp in addition, find-sites should however normalize their names to AF and AN, because downstream somalier commands require that.