emBALVI

The goal of emBALVI is to …

Installation

You can install the development version of emBALVI like so:

# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?

Example

This is a basic example which shows you how to solve a common problem:

library(emBALVI)
data(phenotypes_potatoyield)
data(snp_NN_10_hmp)
# Prepare genotype
hmp <- as.data.frame(t(snp_NN_10_hmp),stringsAsFactors = FALSE)
colnames(hmp) <- hmp[1, ]
hmp <- hmp[-1, ]
hmp$Taxa <- rownames(hmp)
snp_matrix <- hmp[, -ncol(hmp)]
rownames(snp_matrix) <- hmp$Taxa
X <- convert_to_dosage(snp_matrix)
G <- buildGRM(X)
pheno <- phenotypes_potatoyield
Y <- pheno$y
B <- model.matrix(~1, pheno)

results <- emBALVI(Y, X, B, G, max_iter = 5)
plot_manhattan(results)
qq_plot <- plot_qq(results)
print(qq_plot)
head(results)