Learning Sparse Log-Ratios for Compositional Data.
codacore
Update: CoDaCoRe is now live on CRAN
A self-contained, up-to-date implementation of CoDaCoRe, in the R programming language, by the original authors.
The CoDaCoRe guide contains a detailed tutorial on installation, usage and functionality.
Note this repository is under active development. If you would like to use CoDaCoRe on your dataset, and have any questions regarding the installation, usage, implementation, or model itself, do not hesitate to contact [email protected]. Some previously asked questions are available on the Issues page. Contributions, fixes, and feature requests are also welcome - please create an issue, submit a pull request, or email me.
Quick-start: how to install and run CoDaCoRe
- We can install CoDaCoRe by running (further details in the guide):
install.packages('codacore')
- To fit codacore on some data and check the results (further details in the guide:
library("codacore")
help(codacore) # if in doubt, check documentation
data("Crohn") # load some data and apply codacore
x <- Crohn[, -ncol(Crohn)] + 1
y <- Crohn[, ncol(Crohn)]
model = codacore(
x, # compositional input, e.g., HTS count data
y, # response variable, typically a 0/1 binary indicator
logRatioType = "balances", # can use "amalgamations" instead, or abbreviations "B" and "A"
lambda = 1 # regularization strength (default corresponds to 1SE rule)
)
print(model)
plot(model)
Reference
Gordon-Rodriguez, Elliott, Thomas P. Quinn, and John P. Cunningham. "Learning sparse log-ratios for high-throughput sequencing data." Bioinformatics 38.1 (2022): 157-163. [link]
Quinn, Thomas P., Elliott Gordon-Rodriguez, and Ionas Erb. "A critique of differential abundance analysis, and advocacy for an alternative." arXiv preprint arXiv:2104.07266 (2021). [link]
Acknowledgements
Thanks for your contributions to codacore!
- Marcus Fedarko
- Gregor Seyer
- Nick Youngblut
- Antonio Garrido Fernandez.