Skip to content

How to read in VCF files for use in tsinfer? #524

Answered by hyanwong
hyanwong asked this question in Q&A
Discussion options

You must be logged in to vote

Replying to my own question, there's code provided in the tutorial for reading VCF files, including reading in some of the metadata in the VCF (details further down that page). If you have a very large VCF file and it is taking a long time, then it is possible to read chunks of your VCF in parallel: see #277 (comment) for example code.

Note that in the longer term, we may be moving tsinfer to using sgkit as an import framework: when this happens this answer may become obsolete.

Also note that you if you are importing VCFs into tsinfer, you may wish to investigate how to infer ancestral states properly.

Replies: 1 comment

Comment options

hyanwong
May 25, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by hyanwong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant