-
How do I import a VCF file into tsinfer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.