Skip to content

moved stats functions to stats.rst - #271

Closed
petrelharp wants to merge 2 commits into
masterfrom
statdoc
Closed

petrelharp wants to merge 2 commits into
masterfrom
statdoc

Conversation

@petrelharp

Copy link
Copy Markdown
Contributor

Here's the sphinx magic to move that over. Other things that we could maybe do now:

  1. I deprecated pairwise_diversity but should probably move that over to stats.rst also?
  2. I also think we should move genealogical_nearest_neighbors and mean_descendants over to stats.rst; perhaps in a separate section? There's definately overlap between the topics; maybe the page gets called something like "Statistics and other genealogical descriptors"?
  3. mean_descendants could be easily implemented as a node statistic, and we'd have use for the corresponding site and branch statistic, also. Maybe the most natural is that mode="site", windows="sites", polarised=True gives the derived allele frequency at each site. Given this, maybe a better name is descendant_frequency or just frequency?

@codecov

codecov Bot commented Jul 26, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #271 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #271   +/-   ##
======================================
  Coverage    85.8%   85.8%           
======================================
  Files          19      19           
  Lines       14068   14068           
  Branches     2736    2736           
======================================
  Hits        12071   12071           
  Misses       1043    1043           
  Partials      954     954
Flag Coverage Δ
#c_tests 86.72% <ø> (ø) ⬆️
#python_c_tests 89.93% <ø> (ø) ⬆️
#python_tests 99.17% <ø> (ø) ⬆️
Impacted Files Coverage Δ
python/tskit/trees.py 98.58% <ø> (ø) ⬆️

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 7f24d6a...1e0fbbd. Read the comment docs.

@petrelharp

Copy link
Copy Markdown
Contributor Author

Hm: we could actually implement mean_descendants using segregating_sites(..., mode="node", polarised=True) if we had the polarised option.

@petrelharp

Copy link
Copy Markdown
Contributor Author

Ping @hyanwong @gtsambos about where to discuss genealogical summaries (perhaps in stats.rst?).

@jeromekelleher

Copy link
Copy Markdown
Member

I'm not sure I agree with completely removing the stats from the docs from the TreeSequence docs @petrelharp - they are still methods of the tree sequence, and people might expect to be able to search for them there.

Have you seen my alternative proposal for reorganising the stats docs here in #254? This tries to categorise the stats and gives links back to the technical documentation. I think this is good because it gives a high-level overview of what's available, and how they relate to each other.

@jeromekelleher

Copy link
Copy Markdown
Member

Hm: we could actually implement mean_descendants using segregating_sites(..., mode="node", polarised=True) if we had the polarised option.

I'm fine with deprecating or even removing mean_descendants --- I don't think anyone is using it outside the BDI, and we should move over to the node based stats. It probably hasn't been included in a released version of tskit, so there's not much harm in removing it I think.

@petrelharp

Copy link
Copy Markdown
Contributor Author

Have you seen my alternative proposal for reorganising the stats docs here in #254?

Whoops; sorry - missed that. It'd be nice to organize the many TreeSequence methods according to type, but maybe that's something that can be done in a cheatsheet-type page. Ok, I like that better.

deprecating or even removing mean_descendants

I think we should definately keep the functionality! Just make it a node stat and rename it.

@petrelharp

Copy link
Copy Markdown
Contributor Author

Ok, I'll move my changes over to #254 and open a new issue for mean_descendants.

@jeromekelleher

Copy link
Copy Markdown
Member

Shall we close this PR then?

@petrelharp petrelharp closed this Jul 30, 2019
@jeromekelleher
jeromekelleher deleted the statdoc branch July 30, 2019 20:04
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.

2 participants