joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
581 stars 187 forks source link

Additional metrics in estimate_richness #568

Open colinbrislawn opened 8 years ago

colinbrislawn commented 8 years ago

Hello Joey,

Thanks for developing this software. It serves as a great model for amplicon analysis and R software development.

A collaborator recently requested alpha diversity metrics of evenness. I added Pielou to compliment Shannon and SimpsonE to compliment InvSimpson. Are you interested in added evenness metrics?

If you are, I'm interested in contributing code. I'd love to hear your feedback.

Colin Brislawn

joey711 commented 8 years ago

Sounds great. If you contribute I will attempt to merge. I don't have a doc on contributing, but the unit test examples already included serve as a decent template. Also, if you simply provide working examples in the roxygen doc, especially with expected edge cases, I can make sure they get included.

let me know if you have any questions. I look forward to the pull request.

Cheers!

joey

colinbrislawn commented 8 years ago

Hello Joey,

When introducing new evenness metrics, I also changed the names of an existing one.

Current       New-name
Simpson       Simpson
InvSimpson    SimpsonD
              SimpsonE

Do you think I should rename InvSimpson or keep it as it is? (I could also keep both or change other names, etc)

colinbrislawn commented 8 years ago

Hello Joey,

Any advice on running the testthat scripts locally using a modified version of phyloseq? I'd rather test locally instead of pushing everything to travis.

joey711 commented 8 years ago

Yeah, I wouldn't change InvSimpson, as it might break users code, though I can see why you want to change it. Simply adding SimpsonE should be fine.

As for running testthat locally, all you need to do is install your version of the package, and then run the script. There are other options, too, as the standard R CMD check phyloseq bash terminal invocation will do the full package check including tests. testthat documentation probably enumerates the many ways you can run the test script, but testthat tests are also interactive, so you can simply run the new test modules that you are adding to verify that they behave as expected.

Hope that helps!

HSapers commented 8 years ago

Hi - I'm really interested in using the evenness statistics too - have these been integrated? Thanks!

ycl6 commented 6 years ago

It seems Pielou was not implemented yet?

colinbrislawn commented 6 years ago

I have implemented both Pielou and Simpson's Evenness in PR #575, but it has not yet been merged into the master branch of Phyloseq.

@joey711 or @spholmes let me know what I can do to get these two evenness metrics added. Are we missing unit tests or documentation?

colinbrislawn commented 4 years ago

Well this PR is definitely stale after 2 years! Hopefully I can refresh it...

Is there still interest in adding these two metrics? 🎼 For the first time in forever, I can work on this PR.

bstamps commented 4 years ago

Very much so, yes. If these could be added to the package that would be outstanding.