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

Add getAlpha #669

Merged
merged 16 commits into from
Jan 19, 2025
Merged

Add getAlpha #669

merged 16 commits into from
Jan 19, 2025

Conversation

TuomasBorman
Copy link
Contributor

Currently, we have only addAlpha function that adds values to colData. getAlpha function returns data.frame with the indices without adding them to colData

@TuomasBorman
Copy link
Contributor Author

This PR also simplifies the alpha diversity functions. Previously we combined different diversity functions to be used through addAlpha. We did minimal changes to get the functions working, however, that led to overhead and suboptimal solutions (internal function was calling other internal function that was calling other...). Moreover, ace index calculation was not even working correctly because of these suboptimal choices that were made previously.

@antagomir
Copy link
Member

Seems good, just one note that the original functions were splitted into informative categories (richness, evenness, diversity, dominance, rarity). It would be good to keep that information (what index belongs to what category) in the documentation at least.

@TuomasBorman
Copy link
Contributor Author

Yes, the documentation has this information

@TuomasBorman
Copy link
Contributor Author

TODO and things to answer:

  • Remove code that is not used anymore.
  • Investigate why the rarefaction fails (might be also that the old code was incorrect)

@TuomasBorman
Copy link
Contributor Author

TODO and things to answer:

* Remove code that is not used anymore.

* Investigate why the rarefaction fails (might be also that the old code was incorrect)
  • Unused code removed.
  • The old code was incorrect. Now rarefaction works as expected.

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 92.47312% with 7 lines in your changes missing coverage. Please review.

Project coverage is 69.28%. Comparing base (e4b7e97) to head (759191f).
Report is 6 commits behind head on devel.

Files with missing lines Patch % Lines
R/addAlpha.R 97.14% 2 Missing ⚠️
R/estimateEvenness.R 80.00% 2 Missing ⚠️
R/estimateDiversity.R 66.66% 1 Missing ⚠️
R/estimateDominance.R 66.66% 1 Missing ⚠️
R/estimateRichness.R 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #669      +/-   ##
==========================================
- Coverage   70.11%   69.28%   -0.83%     
==========================================
  Files          47       47              
  Lines        5778     5828      +50     
==========================================
- Hits         4051     4038      -13     
- Misses       1727     1790      +63     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TuomasBorman TuomasBorman merged commit 45b1d3e into devel Jan 19, 2025
3 of 5 checks passed
@TuomasBorman TuomasBorman deleted the getalpha branch January 19, 2025 17:33
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