Replies: 2 comments
-
Hi @ksamuk 👋 The easiest way to add a monomorphic site is to just add a site that doesn't have any mutations, e.g.: ts = msprime.sim_ancestry(3, random_seed=1, sequence_length=100)
tables = ts.dump_tables()
tables.sites.add_row(position=20, ancestral_state="A")
ts = tables.tree_sequence()
print(ts.as_vcf()) gives
(This just has a monomorphic site for simplicity, but you'd probably want to add one to a simulation with some other mutations.) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Fantastic, thank you @jeromekelleher! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Apologies if this was answered elsewhere, but is it currently possible for write_vcf() to output a VCF that includes invariant/monomorphic sites? Any suggestions would be greatly appreciated and thanks for creating/maintaining this amazing software!
Beta Was this translation helpful? Give feedback.
All reactions