Skip to content
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

clarification to keep_intervals docs #889

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

petrelharp
Copy link
Contributor

@petrelharp petrelharp commented Oct 1, 2020

On the msprime mailing list, @mnavascues rightly asks:

I am using SLiM and pyslim+msprime (for recapitation) for simulating
whole human genomes. I want to apply msprime independently to smaller
chuncks of genome (e.g. chromosome arms) and wanted to use
keep_interval() as suggested by Peter Ralph
(https://groups.google.com/forum/#!topic/slim-discuss/UIwmOPuv9Ww).

However, I am not sure I am doing it right, the resulting tree sequence
seems to be of the same size of the original sequence:

 >>> import msprime
 >>> tree_sequence = msprime.simulate(sample_size=6, length=50e3, Ne=1000)
 >>> tree_sequence.sequence_length
50000.0
 >>> tree_sequence.keep_intervals(np.array([[0,10]])).sequence_length
50000.0

Shouldn't this give me a sequence length of 10?

But, no: this is something that we discussed. Hopefully, this change should clear up this confusion?

@petrelharp
Copy link
Contributor Author

How's this look, @mnavascues?

@codecov
Copy link

codecov bot commented Oct 1, 2020

Codecov Report

Merging #889 into main will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #889   +/-   ##
=======================================
  Coverage   93.52%   93.52%           
=======================================
  Files          25       25           
  Lines       19932    19932           
  Branches      789      789           
=======================================
  Hits        18641    18641           
  Misses       1259     1259           
  Partials       32       32           
Impacted Files Coverage Δ
python/tskit/trees.py 98.13% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 686a105...d9f72d0. Read the comment docs.

@mnavascues
Copy link

How's this look, @mnavascues?

Looks good to me. Thanks!

@jeromekelleher jeromekelleher added the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Oct 1, 2020
@AdminBot-tskit AdminBot-tskit force-pushed the keep_intervals_clarification branch from fc15514 to d9f72d0 Compare October 1, 2020 17:25
@mergify mergify bot merged commit 2eb57bb into tskit-dev:main Oct 1, 2020
@mergify mergify bot removed the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants