fastbiom
provides the fastest implementations of several alpha- and beta-diversity metrics for R, including phylogenetic metrics such as Faith’s PD and 5 variants of UniFrac. It is compatible with phyloseq, rbiom, and BioConductor objects. Zero dependencies, making it quick to install and ideal for package developers.
Installation
The latest stable version can be installed from CRAN.
install.packages('fastbiom')
The development version is available on GitHub.
install.packages('pak')
pak::pak('cmmr/fastbiom')
Usage
Calculate beta diverity
bray_curtis(ex_counts)
#> A B C
#> B 0.6428571
#> C 0.6129032 0.1034483
#> D 0.9230769 0.2500000 0.2592593
generalized_unifrac(ex_counts, tree = ex_tree, alpha = 0.5)
#> A B C
#> B 0.61036006
#> C 0.60260471 0.04873043
#> D 0.75764452 0.25262174 0.29851111
Documentation
The online manual for fastbiom
is available at https://cmmr.github.io/fastbiom/. It includes a getting started guide, articles that explore specific use cases, and reference pages for each function.
Automated tests
The following commands will check if fastbiom
passes the bundled testing suite.
install.packages('testthat')
testthat::test_check('fastbiom')
Community guidelines
Support
Bug reports, feature requests, and general questions can be submitted at https://github.com/cmmr/fastbiom/issues.