Taxa filtering

조건1 - 5% of the profiles exhibited an abundance of at least 1%

taxa2 <- prop.table(as.matrix(taxa), margin = 1)
ttaxa <- as.data.frame(t(taxa2))

for (i in 1:1851) {
  ttaxa[,i] <- ifelse(ttaxa[,i] >= 0.01, 1, 0)
}

ttaxa$rowMean <- rowMeans(ttaxa)
summary(ttaxa$rowMean)

ttaxa <- ttaxa[ttaxa$rowMean >= 0.05, ]

row.names(ttaxa) -> a

taxa3 <- subset(taxa, select = a)

조건2 - at least 15% of profiles exhibited an abundance of at least 0.1%

ttaxa <- as.data.frame(t(taxa3))
for (i in 1:1851) {
  ttaxa[,i] <- ifelse(ttaxa[,i] >= 0.001, 1, 0)
}

ttaxa$rowMean <- rowMeans(ttaxa)
summary(ttaxa$rowMean)

ttaxa <- ttaxa[ttaxa$rowMean >= 0.15, ]

row.names(ttaxa) -> a

taxa3 <- subset(taxa, select = a)

Log transformation

Cytokine log tranformation

for (i in 1:27){
  cyto[,i] <- log(cyto[,i])
}

Taxa table log transformation