Re: Help with Diversity_Stats.R package

96 views
Skip to first unread message

Sam Westreich

unread,
Jun 12, 2020, 4:52:18 PM6/12/20
to Anirudha Dixit, SAMSA bioinformatics group
Hi Anirudha,

I don't have a built script for doing evenness with another method, but it looks like it would be fairly straightforward to implement in R, such as using this package: https://www.rdocumentation.org/packages/asbio/versions/0.2-1/topics/evenness

You'd just take the diversity_stats.R script and run this evenness() function on the data table that's produced - although you may need to transpose the data table, as I believe it's organized by default with the species in rows, rather than in columns as is needed for this evaluation of Pielou's evenness.

If you do add this as an option, you're welcome to submit a pull request to merge this into SAMSA2 so that it's available for others!

Best,
Sam

On Wed, Jun 10, 2020 at 6:27 AM Anirudha Dixit <dixit.a...@gmail.com> wrote:
Hi,
I have been using the SAMSA2 pipeline for sometime now and it has been working great. 
Is there a way to change the default index parameter in the diversity stats calculations to something like Pielou’s evenness? 
I understand that Shannon does take into account the evenness when calculating alpha diversity but just wondering if I can get the evenness information from some other method.
Thank you.

--
You received this message because you are subscribed to the Google Groups "SAMSA bioinformatics group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to samsa-bioinformatic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/samsa-bioinformatics-group/a05f7aa1-0c37-42e0-83c1-9269b1271d20o%40googlegroups.com.


--
Sam Westreich
Microbiome Scientist, DNAnexus, 

Anirudha Dixit

unread,
Jun 12, 2020, 7:28:13 PM6/12/20
to SAMSA bioinformatics group
Hi Sam,
Thank you for responding and suggesting a work around. 

I was able to make it work with what the vegan package suggested.

## Species richness (S) and Pielou's evenness (J):
S <- specnumber(BCI) ## rowSums(BCI > 0) does the same... 
J <- H/log(S)

I will definitely submit a pull request to update this. Appreciated.

On Friday, June 12, 2020 at 4:52:18 PM UTC-4, S. Westreich (creator) wrote:
Hi Anirudha,

I don't have a built script for doing evenness with another method, but it looks like it would be fairly straightforward to implement in R, such as using this package: https://www.rdocumentation.org/packages/asbio/versions/0.2-1/topics/evenness

You'd just take the diversity_stats.R script and run this evenness() function on the data table that's produced - although you may need to transpose the data table, as I believe it's organized by default with the species in rows, rather than in columns as is needed for this evaluation of Pielou's evenness.

If you do add this as an option, you're welcome to submit a pull request to merge this into SAMSA2 so that it's available for others!

Best,
Sam

On Wed, Jun 10, 2020 at 6:27 AM Anirudha Dixit <dixit....@gmail.com> wrote:
Hi,
I have been using the SAMSA2 pipeline for sometime now and it has been working great. 
Is there a way to change the default index parameter in the diversity stats calculations to something like Pielou’s evenness? 
I understand that Shannon does take into account the evenness when calculating alpha diversity but just wondering if I can get the evenness information from some other method.
Thank you.

--
You received this message because you are subscribed to the Google Groups "SAMSA bioinformatics group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to samsa-bioinformatics-group+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages