Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with SVs: preserve INFO/END field after phase_common #72

Open
dtaliun opened this issue Nov 26, 2023 · 0 comments
Open

Working with SVs: preserve INFO/END field after phase_common #72

dtaliun opened this issue Nov 26, 2023 · 0 comments

Comments

@dtaliun
Copy link

dtaliun commented Nov 26, 2023

Hi,

Thank you for another amazing tool!

I don't have any critical issues to report, but I have a small feature request to keep the INFO/END field in the processed BCF files.

I was experimenting with adding SVs for phasing and ended up with the following observation.
The phase_common tool processes common SVs but drops the INFO/END field in the output BCF. Then, phase_rare uses the synced BCF reader from HTSlib to read two BCFs simultaneously: phased common SVs (i.e., output from phase_common) and all unphased SVs. However, without the INFO/END filed, the synced BCF reader treats SVs as different records even when their ID and POS fields match. As a result, phase_rare can't recognize that the SVs were already phased, which results in duplicated entries in the output and probably wrong estimates (see screenshots of unphased input and phased output after phase_rare).

The workaround for people who encountered the same issue is easy: add back the INFO/END to the BCF with common phased SVs before running phase_rare, e.g. using bcftools annotate -a [unphased BCF] -c INFO/END [phased common BCF] ... .

input
output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant