Commit 51acc0d5 by Eric Coissac

Latest version of the manuscript

parent a2e8ddea
library(vegan)
library(ROBITools)
library(ProcMod)
litere_col_clean <- readRDS("litere_col_clean.rds")
litere_col_clean <- metabarcoding.data(reads = litere_col_clean$reads,
......@@ -27,7 +28,27 @@ litere_euk_clean <- metabarcoding.data(reads = litere_euk_clean$reads,
# Remove rare motus
litere_col_norare <- litere_col_clean[,apply(decostand(litere_col_clean$reads,method = "total"),MARGIN = 2,max) >= 0.01]
litere_euk_norare <- litere_euk_clean[,apply(decostand(litere_euk_clean$reads,method = "total"),MARGIN = 2,max) >= 0.01]
litere_ins_norare <- litere_ins_clean[,apply(decostand(litere_ins_clean$reads,method = "total"),MARGIN = 2,max) >= 0.01]
litere_bac_norare <- litere_bac_clean[,apply(decostand(litere_bac_clean$reads,method = "total"),MARGIN = 2,max) >= 0.01]
litere_col_norare <- litere_col_clean[,apply(decostand(litere_col_clean$reads,method = "total"),MARGIN = 2,max) >= 0.001]
litere_euk_norare <- litere_euk_clean[,apply(decostand(litere_euk_clean$reads,method = "total"),MARGIN = 2,max) >= 0.001]
litere_ins_norare <- litere_ins_clean[,apply(decostand(litere_ins_clean$reads,method = "total"),MARGIN = 2,max) >= 0.001]
litere_bac_norare <- litere_bac_clean[,apply(decostand(litere_bac_clean$reads,method = "total"),MARGIN = 2,max) >= 0.001]
litere_euk_classes <- lapply(levels(litere_euk_norare$motus$class_name),
function(x) litere_euk_norare[,which(litere_euk_norare$motus$class_name == x)])
names(litere_euk_classes)=levels(litere_euk_norare$motus$class_name)
litere_euk_classes <- litere_euk_classes[! sapply(litere_euk_classes, is.numeric)]
litere_euk_classes.diverse = litere_euk_classes[sapply(litere_euk_classes,ncol) >=30]
litere_euk_dist <- lapply(litere_euk_classes.diverse,
function(metabar)
vegdist(decostand(metabar@reads,"hellinger"),"euclidean"))
litere_euk_dist <- as.procmod.frame(litere_euk_dist)
litere_euk_cor <- corls(litere_euk_dist)
ilitere_euk_cor <- solve(litere_euk_cor)
litere_euk_cor.partial = ilitere_euk_cor/sqrt(diag(ilitere_euk_cor) %*% t(diag(ilitere_euk_cor)))
plot(hclust(as.dist(1- ilitere_euk_cor.partial^2)))
......@@ -96,4 +96,10 @@ Sz{\'e}kely, G.~J., Rizzo, M.~L., and Bakirov, N.~K. (2007).
\newblock Measuring and testing dependence by correlation of distances.
\newblock {\em Ann. Stat.}, {\bf 35}(6), 2769--2794.
\bibitem[Theil {\em et~al.}(1958)Theil, Cramer, Moerman, and
Russchen]{Theil:58:00}
Theil, H., Cramer, J.~S., Moerman, H., and Russchen, A. (1958).
\newblock {\em Economic forecasts and policy\/}, page 213.
\newblock North-Holland Publishing Company, Amsterdam.
\end{thebibliography}
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment