Differential abundance analysis at gene level
# Create a list of genes with sgRNA indices to use in fry test
# index argument
genesymbols <- yy.norm$genes[, 1]
genesymbollist <- list()
unq <- unique(genesymbols)
unq <- unq[!is.na(unq)]
for (i in unq) {
sel <- genesymbols == i & !is.na(genesymbols)
if (sum(sel) > 3)
genesymbollist[[i]] <- which(sel)
}
fry.res <- fry(yy.norm, index = genesymbollist, design, contrast = "groupToxA")
datatable(format(fry.res, format = "e", digits = 3))