tskit icon indicating copy to clipboard operation
tskit copied to clipboard

Missing data error is reported when trees converted to vcf file

Open Liangyy1902 opened this issue 2 years ago • 2 comments

Hi, When I try to convert a tree file to a vcf file, I get some error message as following. How do I solve this problem? ##############Error message Traceback (most recent call last): File "/public1/home/sc60567/.conda/envs/msprime/lib/python3.8/site-packages/tskit/trees.py", line 5331, in write_vcf writer.write(output) File "/public1/home/sc60567/.conda/envs/msprime/lib/python3.8/site-packages/tskit/vcf.py", line 185, in write raise ValueError( ValueError: Missing data is not currently supported. Please open an issue on GitHub if this limitation affects you. ##############the script ** import msprime, tskit, pyslim ts1 = tskit.load("slim_10001.trees") ts1 = ts1.simplify() ts = msprime.sim_mutations(ts1, rate=6.75e-6, random_seed=1) with open("test.vcf", "w") as vcf_file: ts.write_vcf(vcf_file) **

Liangyy1902 avatar May 06 '23 13:05 Liangyy1902