Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Zhiwen-Owen-Jiang/MiRKATMC

The Microbiome Regression-based Kernel Association Test for multi-categorical (nominal or ordinal) data
https://github.com/Zhiwen-Owen-Jiang/MiRKATMC

Last synced: 11 days ago
JSON representation

The Microbiome Regression-based Kernel Association Test for multi-categorical (nominal or ordinal) data

Awesome Lists containing this project

README

        

# MiRKATMC
The Microbiome Regression-based Kernel Association Test for multi-categorical (nominal or ordinal) data

## Installation
```{r}
# install.packages("devtools") if you have not installed devtools
devtools::install_github("Zhiwen-Owen-Jiang/MiRKATMC")
```
## Usage
We also provided a shiny app which can be accessed at [shiny_MiRKATMC](https://zhiwen-owen-jiang.shinyapps.io/shiny_MiRKATMC/).
```{r}
library(MiRKATMC)

# let's first generate some data
set.seed(123)
test.data <- data.frame(outcome = as.factor(sample(4, 100, replace = TRUE)),
ID = gl(20, 5), time = rep(1:5, 20), age = rnorm(n = 100, mean = 30, sd = 5),
sex = rbinom(100, 1, 1/2))
D1 <- matrix(rbinom(10000, 2, 0.05), 100, 100)
K1 <- crossprod(D1) # kernel matrix
D2 <- matrix(rbinom(10000, 2, 0.1), 100, 100)
K2 <- crossprod(D2) # kernel matrix
K <- list(kernel1 = K1, kernel2 = K2)
K_no_name <- list(K1, K2)

# Then do the analysis
MiRKATMC(formula = outcome ~ age, random = NULL, data.type = 'nominal', Ks = K1, data = test.data)
MiRKATMC(formula = outcome ~ age, random = NULL, data.type = 'ordinal', Ks = K_no_name, data = test.data)
MiRKATMC(formula = outcome ~ age, random = ~ 1 | ID, data.type = 'nominal', Ks = K, data = test.data)
MiRKATMC(formula = outcome ~ age, random = ~ 1 + time | ID, data.type = 'ordinal', Ks = K_no_name, data = test.data)
```
## Getting help
Please email Owen Jiang .

## Citation
Jiang Z, He M, Chen J, Zhao N, Zhan X. MiRKAT-MC: A Distance-Based Microbiome Kernel Association Test With Multi-Categorical Outcomes. Front Genet. 2022 Apr 1;13:841764. doi: 10.3389/fgene.2022.841764.