-
Notifications
You must be signed in to change notification settings - Fork 23
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
vignette! #48
vignette! #48
Conversation
we've kept the individuals in a dict, so that for instance | ||
`corners["topleft"]` is an array of all the individual IDs that are in the top left corner. | ||
The IDs of the ancient individuals we will work with are kept in the array `ancient`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey look you can make notes at specific locations. Like this one: here would be a good place to double-check that all the ancient
samples are from a while ago, like:
for i in corners["ancient"]:
ind = ts.individual(i)
assert(ind.time >= 500 and ind.time < 520)
docs/vignette_space.rst
Outdated
print(f"The tree sequence now has {ts.num_trees} trees," | ||
f" and {ts.num_mutations} mutations.") | ||
|
||
Note since :meth:`mutate <msprime.mutate>` is an msprime method, it does not return a pyslim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a `.. noteor
.. warning`` block here to make this stand out.
docs/vignette_space.rst
Outdated
We should check this: plot where these individuals lie | ||
relative to everyone else. | ||
The individuals locations are available in individual metadata, | ||
but to make things easier, it's also present in a `num_individuals x 2` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like N x 3 below?
I had a read through @petrelharp, looks excellent to me. This will really help people out. We've got to get VCF and metadata sorted out soon in tskit, the last bit really is unnecessarily awkward and confusing. |
omg, yes. |
looks great - very helpful. It may be useful to add a note that the rates in recapitate( ) and mutate( ) are per-timestep and not per-generation. This is also relevant around line 230-235 where you discuss keeping SLiM mutations, because the rates in SLiM and the rates applied by mutate( ) will be in different units. Also very much yes on the VCF output. |
docs/vignette_space.rst
Outdated
if ind_group[i] == "ancient" or ind_group[j] == "ancient": | ||
pair_colors[k] = 1 | ||
|
||
fig = plt.figure(figsize=(6, 6)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fig = plt.figure(figsize=(6, 6)) | |
fig = plt.figure(figsize=(6, 6),dpi=300) |
will make things a little prettier.
This looks great and I think will be super useful, especially to me! Agreed that the last chunk is a little complicated, so that it'd be nice to have some of it taken care of by write_vcf(), but I recognize that that's complicated. Thanks for putting the vignette together, and feel free to close #47 as you see fit. |
Here's a draft of the answer to @gbradburd's nice suggestion in #47. It'd be great if some other folks could read this over and give suggestions or make edits. In particular,
Any input, @gbradburd, @bhaller, @cjbattey? To view the html version of this, you should be able to do
make
in thedocs/
directory.