Commit 0393da18 by Eric Coissac

Initial commit of the project

parents
Package: MetabarSchool
Type: Package
Title: A Tutorial package on Biodiversity indices and metabarcoding
Version: 1.0
Date: 2019-01-31
Author: Eric Coissac
Maintainer: Eric Coissac <eric.coissac@metabarcoding.org>
Description: More about what it does (maybe more than one line)
License: What license is it under?
exportPattern("^[[:alpha:]]+")
#' @author Eric Coissac
#' @export
H.q = function(x,q=1) {
sum(x * log.q(1/x,q),na.rm = TRUE)
}
#' @author Eric Coissac
#' @export
D.q = function(x,q=1) {
exp.q(H.q(x,q),q)
}
#' @author Eric Coissac
#' @export
H.spectrum = function(x,q=1) {
sapply(q,function(Q) H.q(x,Q))
}
#' @author Eric Coissac
#' @export
D.spectrum = function(x,q=1) {
sapply(q,function(Q) D.q(x,Q))
}
#' @importFrom Rdpack reprompt
#'
NULL
#' Generalized logaritmic function.
#'
#' \deqn{x \longmapsto 1 : \log(x) \approx x-1}
#'
#'
#' @references
#' \insertRef{Tsallis:94:00}{ROBITools2}
#'
#'
#' @author Eric Coissac
#' @export
log.q = function(x,q=1) {
if (q==1)
log(x)
else (x^(1-q)-1)/(1-q)
}
#' Generalized exponential function.
#'
#'
#' @references
#' \insertRef{Tsallis:94:00}{ROBITools2}
#'
#' @author Eric Coissac
#' @export
exp.q = function(x,q=1,base=exp(1)) {
if (q==1)
exp(x)
else
(1 + (1-q)*x)^(1/(1-q))
}
#' @export
mode <- function(x) {
d <- density(x)
d$x[which.max(d$y)]
}
#' @export
tag_bad_pcr = function(samples,counts,plot = TRUE) {
counts = decostand(counts,method = "hellinger")
bc = aggregate(counts,
by=list(factor(as.character(samples))),
mean)
bc.name = as.character(bc[,1])
bc = bc[-1]
rownames(bc)=bc.name
bc = bc[as.character(samples),]
d = sqrt(rowSums((counts - bc)^2))
names(d) = as.character(samples)
d.m = mode(d)
d.sd = sqrt(sum((d[d <= d.m] - d.m)^2)/sum(d <= d.m))
d.max = aggregate(d,
by = list(factor(as.character(samples))),
max)
d.max.names = d.max[,1]
d.max = d.max[,2]
names(d.max) = d.max.names
d.max = d.max[as.character(samples)]
d.len = aggregate(d,
by = list(factor(as.character(samples))),
length)
d.len.names = d.len[,1]
d.len = d.len[,2]
names(d.len) = d.len.names
d.len = d.len[as.character(samples)]
keep = ((d < d.m + (d.sd*2)) | d!=d.max) & d.len > 1
selection = data.frame(samples = as.character(samples),
distance= d,
maximum = d.max,
repeats = d.len,
keep = keep,
stringsAsFactors = FALSE)
rownames(selection)=rownames(counts)
attributes(selection)$dist.mode = d.m
attributes(selection)$dist.sd = d.sd
if (plot) {
hist(d)
abline(v=d.m,lty=2,col="green")
abline(v=d.m + (d.sd*2),lty=2,col="red")
}
return(selection)
}
site_id point_id Latitude Longitude Code.Petit.Plateau Site Habitat Material Replicate Control Control_type
H20_Al_r1 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme litter r1 sample NA
H20_Al_r2 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme litter r2 sample NA
H20_Al_r3 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme litter r3 sample NA
H20_Al_r4 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme litter r4 sample NA
H20_As_r1 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme soil r1 sample NA
H20_As_r2 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme soil r2 sample NA
H20_As_r3 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme soil r3 sample NA
H20_As_r4 H20 H20-A 4.083099 -52.682203 70-310 Petit Plateau Terra firme soil r4 sample NA
H20_Bl_r1 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme litter r1 sample NA
H20_Bl_r2 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme litter r2 sample NA
H20_Bl_r3 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme litter r3 sample NA
H20_Bl_r4 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme litter r4 sample NA
H20_Bs_r1 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme soil r1 sample NA
H20_Bs_r2 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme soil r2 sample NA
H20_Bs_r3 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme soil r3 sample NA
H20_Bs_r4 H20 H20-B 4.083029 -52.682266 70-330 Petit Plateau Terra firme soil r4 sample NA
H20_Cl_r1 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme litter r1 sample NA
H20_Cl_r2 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme litter r2 sample NA
H20_Cl_r3 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme litter r3 sample NA
H20_Cl_r4 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme litter r4 sample NA
H20_Cs_r1 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme soil r1 sample NA
H20_Cs_r2 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme soil r2 sample NA
H20_Cs_r3 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme soil r3 sample NA
H20_Cs_r4 H20 H20-C 4.082965 -52.620778 70-350 Petit Plateau Terra firme soil r4 sample NA
H20_Dl_r1 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme litter r1 sample NA
H20_Dl_r2 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme litter r2 sample NA
H20_Dl_r3 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme litter r3 sample NA
H20_Dl_r4 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme litter r4 sample NA
H20_Ds_r1 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme soil r1 sample NA
H20_Ds_r2 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme soil r2 sample NA
H20_Ds_r3 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme soil r3 sample NA
H20_Ds_r4 H20 H20-D 4.082857 -52.681856 70-370 Petit Plateau Terra firme soil r4 sample NA
H20_El_r1 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme litter r1 sample NA
H20_El_r2 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme litter r2 sample NA
H20_El_r3 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme litter r3 sample NA
H20_El_r4 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme litter r4 sample NA
H20_Es_r1 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme soil r1 sample NA
H20_Es_r2 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme soil r2 sample NA
H20_Es_r3 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme soil r3 sample NA
H20_Es_r4 H20 H20-E 4.082839 -52.681775 50-370 Petit Plateau Terra firme soil r4 sample NA
H20_Fl_r1 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme litter r1 sample NA
H20_Fl_r2 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme litter r2 sample NA
H20_Fl_r3 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme litter r3 sample NA
H20_Fl_r4 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme litter r4 sample NA
H20_Fs_r1 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme soil r1 sample NA
H20_Fs_r2 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme soil r2 sample NA
H20_Fs_r3 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme soil r3 sample NA
H20_Fs_r4 H20 H20-F 4.08304 -52.618758 50-350 Petit Plateau Terra firme soil r4 sample NA
H20_Gl_r1 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme litter r1 sample NA
H20_Gl_r2 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme litter r2 sample NA
H20_Gl_r3 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme litter r3 sample NA
H20_Gl_r4 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme litter r4 sample NA
H20_Gs_r1 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme soil r1 sample NA
H20_Gs_r2 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme soil r2 sample NA
H20_Gs_r3 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme soil r3 sample NA
H20_Gs_r4 H20 H20-G 4.083078 -52.681965 50-330 Petit Plateau Terra firme soil r4 sample NA
H20_Hl_r1 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme litter r1 sample NA
H20_Hl_r2 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme litter r2 sample NA
H20_Hl_r3 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme litter r3 sample NA
H20_Hl_r4 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme litter r4 sample NA
H20_Hs_r1 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme soil r1 sample NA
H20_Hs_r2 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme soil r2 sample NA
H20_Hs_r3 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme soil r3 sample NA
H20_Hs_r4 H20 H20-H 4.031718 -52.682164 50-310 Petit Plateau Terra firme soil r4 sample NA
H20_Il_r1 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme litter r1 sample NA
H20_Il_r2 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme litter r2 sample NA
H20_Il_r3 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme litter r3 sample NA
H20_Il_r4 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme litter r4 sample NA
H20_Is_r1 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme soil r1 sample NA
H20_Is_r2 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme soil r2 sample NA
H20_Is_r3 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme soil r3 sample NA
H20_Is_r4 H20 H20-I 4.083272 -52.682151 30-310 Petit Plateau Terra firme soil r4 sample NA
H20_Jl_r1 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme litter r1 sample NA
H20_Jl_r2 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme litter r2 sample NA
H20_Jl_r3 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme litter r3 sample NA
H20_Jl_r4 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme litter r4 sample NA
H20_Js_r1 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme soil r1 sample NA
H20_Js_r2 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme soil r2 sample NA
H20_Js_r3 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme soil r3 sample NA
H20_Js_r4 H20 H20-J 4.083411 -52.682034 30-330 Petit Plateau Terra firme soil r4 sample NA
H20_Kl_r1 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme litter r1 sample NA
H20_Kl_r2 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme litter r2 sample NA
H20_Kl_r3 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme litter r3 sample NA
H20_Kl_r4 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme litter r4 sample NA
H20_Ks_r1 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme soil r1 sample NA
H20_Ks_r2 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme soil r2 sample NA
H20_Ks_r3 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme soil r3 sample NA
H20_Ks_r4 H20 H20-K 4.08325 -52.681894 30-350 Petit Plateau Terra firme soil r4 sample NA
H20_Ll_r1 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme litter r1 sample NA
H20_Ll_r2 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme litter r2 sample NA
H20_Ll_r3 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme litter r3 sample NA
H20_Ll_r4 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme litter r4 sample NA
H20_Ls_r1 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme soil r1 sample NA
H20_Ls_r2 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme soil r2 sample NA
H20_Ls_r3 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme soil r3 sample NA
H20_Ls_r4 H20 H20-L 4.083155 -52.681725 30-370 Petit Plateau Terra firme soil r4 sample NA
H20_Ml_r1 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme litter r1 sample NA
H20_Ml_r2 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme litter r2 sample NA
H20_Ml_r3 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme litter r3 sample NA
H20_Ml_r4 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme litter r4 sample NA
H20_Ms_r1 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme soil r1 sample NA
H20_Ms_r2 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme soil r2 sample NA
H20_Ms_r3 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme soil r3 sample NA
H20_Ms_r4 H20 H20-M 4.083161 -52.681634 10-370 Petit Plateau Terra firme soil r4 sample NA
H20_Nl_r1 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme litter r1 sample NA
H20_Nl_r2 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme litter r2 sample NA
H20_Nl_r3 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme litter r3 sample NA
H20_Nl_r4 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme litter r4 sample NA
H20_Ns_r1 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme soil r1 sample NA
H20_Ns_r2 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme soil r2 sample NA
H20_Ns_r3 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme soil r3 sample NA
H20_Ns_r4 H20 H20-N 4.083266 -52.681616 10-350 Petit Plateau Terra firme soil r4 sample NA
H20_Ol_r1 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme litter r1 sample NA
H20_Ol_r2 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme litter r2 sample NA
H20_Ol_r3 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme litter r3 sample NA
H20_Ol_r4 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme litter r4 sample NA
H20_Os_r1 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme soil r1 sample NA
H20_Os_r2 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme soil r2 sample NA
H20_Os_r3 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme soil r3 sample NA
H20_Os_r4 H20 H20-O 4.083373 -52.681861 10-330 Petit Plateau Terra firme soil r4 sample NA
H20_Pl_r1 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme litter r1 sample NA
H20_Pl_r2 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme litter r2 sample NA
H20_Pl_r3 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme litter r3 sample NA
H20_Pl_r4 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme litter r4 sample NA
H20_Ps_r1 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme soil r1 sample NA
H20_Ps_r2 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme soil r2 sample NA
H20_Ps_r3 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme soil r3 sample NA
H20_Ps_r4 H20 H20-P 4.083477 -52.682032 10-310 Petit Plateau Terra firme soil r4 sample NA
MAN_Al_r1 MAN MAN-A 5.407813 -53.64559 NA Mana White sands litter r1 sample NA
MAN_Al_r2 MAN MAN-A 5.407813 -53.64559 NA Mana White sands litter r2 sample NA
MAN_Al_r3 MAN MAN-A 5.407813 -53.64559 NA Mana White sands litter r3 sample NA
MAN_Al_r4 MAN MAN-A 5.407813 -53.64559 NA Mana White sands litter r4 sample NA
MAN_As_r1 MAN MAN-A 5.407813 -53.64559 NA Mana White sands soil r1 sample NA
MAN_As_r2 MAN MAN-A 5.407813 -53.64559 NA Mana White sands soil r2 sample NA
MAN_As_r3 MAN MAN-A 5.407813 -53.64559 NA Mana White sands soil r3 sample NA
MAN_As_r4 MAN MAN-A 5.407813 -53.64559 NA Mana White sands soil r4 sample NA
MAN_Bl_r1 MAN MAN-B 5.077534 -53.645498 NA Mana White sands litter r1 sample NA
MAN_Bl_r2 MAN MAN-B 5.077534 -53.645498 NA Mana White sands litter r2 sample NA
MAN_Bl_r3 MAN MAN-B 5.077534 -53.645498 NA Mana White sands litter r3 sample NA
MAN_Bl_r4 MAN MAN-B 5.077534 -53.645498 NA Mana White sands litter r4 sample NA
MAN_Bs_r1 MAN MAN-B 5.077534 -53.645498 NA Mana White sands soil r1 sample NA
MAN_Bs_r2 MAN MAN-B 5.077534 -53.645498 NA Mana White sands soil r2 sample NA
MAN_Bs_r3 MAN MAN-B 5.077534 -53.645498 NA Mana White sands soil r3 sample NA
MAN_Bs_r4 MAN MAN-B 5.077534 -53.645498 NA Mana White sands soil r4 sample NA
MAN_Cl_r1 MAN MAN-C 5.407747 -53.645317 NA Mana White sands litter r1 sample NA
MAN_Cl_r2 MAN MAN-C 5.407747 -53.645317 NA Mana White sands litter r2 sample NA
MAN_Cl_r3 MAN MAN-C 5.407747 -53.645317 NA Mana White sands litter r3 sample NA
MAN_Cl_r4 MAN MAN-C 5.407747 -53.645317 NA Mana White sands litter r4 sample NA
MAN_Cs_r1 MAN MAN-C 5.407747 -53.645317 NA Mana White sands soil r1 sample NA
MAN_Cs_r2 MAN MAN-C 5.407747 -53.645317 NA Mana White sands soil r2 sample NA
MAN_Cs_r3 MAN MAN-C 5.407747 -53.645317 NA Mana White sands soil r3 sample NA
MAN_Cs_r4 MAN MAN-C 5.407747 -53.645317 NA Mana White sands soil r4 sample NA
MAN_Dl_r1 MAN MAN-D 5.407685 -53.645156 NA Mana White sands litter r1 sample NA
MAN_Dl_r2 MAN MAN-D 5.407685 -53.645156 NA Mana White sands litter r2 sample NA
MAN_Dl_r3 MAN MAN-D 5.407685 -53.645156 NA Mana White sands litter r3 sample NA
MAN_Dl_r4 MAN MAN-D 5.407685 -53.645156 NA Mana White sands litter r4 sample NA
MAN_Ds_r1 MAN MAN-D 5.407685 -53.645156 NA Mana White sands soil r1 sample NA
MAN_Ds_r2 MAN MAN-D 5.407685 -53.645156 NA Mana White sands soil r2 sample NA
MAN_Ds_r3 MAN MAN-D 5.407685 -53.645156 NA Mana White sands soil r3 sample NA
MAN_Ds_r4 MAN MAN-D 5.407685 -53.645156 NA Mana White sands soil r4 sample NA
MAN_El_r1 MAN MAN-E 5.407929 -53.64497 NA Mana White sands litter r1 sample NA
MAN_El_r2 MAN MAN-E 5.407929 -53.64497 NA Mana White sands litter r2 sample NA
MAN_El_r3 MAN MAN-E 5.407929 -53.64497 NA Mana White sands litter r3 sample NA
MAN_El_r4 MAN MAN-E 5.407929 -53.64497 NA Mana White sands litter r4 sample NA
MAN_Es_r1 MAN MAN-E 5.407929 -53.64497 NA Mana White sands soil r1 sample NA
MAN_Es_r2 MAN MAN-E 5.407929 -53.64497 NA Mana White sands soil r2 sample NA
MAN_Es_r3 MAN MAN-E 5.407929 -53.64497 NA Mana White sands soil r3 sample NA
MAN_Es_r4 MAN MAN-E 5.407929 -53.64497 NA Mana White sands soil r4 sample NA
MAN_Fl_r1 MAN MAN-F 5.408024 -53.645137 NA Mana White sands litter r1 sample NA
MAN_Fl_r2 MAN MAN-F 5.408024 -53.645137 NA Mana White sands litter r2 sample NA
MAN_Fl_r3 MAN MAN-F 5.408024 -53.645137 NA Mana White sands litter r3 sample NA
MAN_Fl_r4 MAN MAN-F 5.408024 -53.645137 NA Mana White sands litter r4 sample NA
MAN_Fs_r1 MAN MAN-F 5.408024 -53.645137 NA Mana White sands soil r1 sample NA
MAN_Fs_r2 MAN MAN-F 5.408024 -53.645137 NA Mana White sands soil r2 sample NA
MAN_Fs_r3 MAN MAN-F 5.408024 -53.645137 NA Mana White sands soil r3 sample NA
MAN_Fs_r4 MAN MAN-F 5.408024 -53.645137 NA Mana White sands soil r4 sample NA
MAN_Gl_r1 MAN MAN-G 5.408052 -53.645306 NA Mana White sands litter r1 sample NA
MAN_Gl_r2 MAN MAN-G 5.408052 -53.645306 NA Mana White sands litter r2 sample NA
MAN_Gl_r3 MAN MAN-G 5.408052 -53.645306 NA Mana White sands litter r3 sample NA
MAN_Gl_r4 MAN MAN-G 5.408052 -53.645306 NA Mana White sands litter r4 sample NA
MAN_Gs_r1 MAN MAN-G 5.408052 -53.645306 NA Mana White sands soil r1 sample NA
MAN_Gs_r2 MAN MAN-G 5.408052 -53.645306 NA Mana White sands soil r2 sample NA
MAN_Gs_r3 MAN MAN-G 5.408052 -53.645306 NA Mana White sands soil r3 sample NA
MAN_Gs_r4 MAN MAN-G 5.408052 -53.645306 NA Mana White sands soil r4 sample NA
MAN_Hl_r1 MAN MAN-H 5.40807 -53.645468 NA Mana White sands litter r1 sample NA
MAN_Hl_r2 MAN MAN-H 5.40807 -53.645468 NA Mana White sands litter r2 sample NA
MAN_Hl_r3 MAN MAN-H 5.40807 -53.645468 NA Mana White sands litter r3 sample NA
MAN_Hl_r4 MAN MAN-H 5.40807 -53.645468 NA Mana White sands litter r4 sample NA
MAN_Hs_r1 MAN MAN-H 5.40807 -53.645468 NA Mana White sands soil r1 sample NA
MAN_Hs_r2 MAN MAN-H 5.40807 -53.645468 NA Mana White sands soil r2 sample NA
MAN_Hs_r3 MAN MAN-H 5.40807 -53.645468 NA Mana White sands soil r3 sample NA
MAN_Hs_r4 MAN MAN-H 5.40807 -53.645468 NA Mana White sands soil r4 sample NA
MAN_Il_r1 MAN MAN-I 5.407884 -53.645575 NA Mana White sands litter r1 sample NA
MAN_Il_r2 MAN MAN-I 5.407884 -53.645575 NA Mana White sands litter r2 sample NA
MAN_Il_r3 MAN MAN-I 5.407884 -53.645575 NA Mana White sands litter r3 sample NA
MAN_Il_r4 MAN MAN-I 5.407884 -53.645575 NA Mana White sands litter r4 sample NA
MAN_Is_r1 MAN MAN-I 5.407884 -53.645575 NA Mana White sands soil r1 sample NA
MAN_Is_r2 MAN MAN-I 5.407884 -53.645575 NA Mana White sands soil r2 sample NA
MAN_Is_r3 MAN MAN-I 5.407884 -53.645575 NA Mana White sands soil r3 sample NA
MAN_Is_r4 MAN MAN-I 5.407884 -53.645575 NA Mana White sands soil r4 sample NA
MAN_Jl_r1 MAN MAN-J 5.407581 -53.645494 NA Mana White sands litter r1 sample NA
MAN_Jl_r2 MAN MAN-J 5.407581 -53.645494 NA Mana White sands litter r2 sample NA
MAN_Jl_r3 MAN MAN-J 5.407581 -53.645494 NA Mana White sands litter r3 sample NA
MAN_Jl_r4 MAN MAN-J 5.407581 -53.645494 NA Mana White sands litter r4 sample NA
MAN_Js_r1 MAN MAN-J 5.407581 -53.645494 NA Mana White sands soil r1 sample NA
MAN_Js_r2 MAN MAN-J 5.407581 -53.645494 NA Mana White sands soil r2 sample NA
MAN_Js_r3 MAN MAN-J 5.407581 -53.645494 NA Mana White sands soil r3 sample NA
MAN_Js_r4 MAN MAN-J 5.407581 -53.645494 NA Mana White sands soil r4 sample NA
MAN_Kl_r1 MAN MAN-K 5.407512 -53.645234 NA Mana White sands litter r1 sample NA
MAN_Kl_r2 MAN MAN-K 5.407512 -53.645234 NA Mana White sands litter r2 sample NA
MAN_Kl_r3 MAN MAN-K 5.407512 -53.645234 NA Mana White sands litter r3 sample NA
MAN_Kl_r4 MAN MAN-K 5.407512 -53.645234 NA Mana White sands litter r4 sample NA
MAN_Ks_r1 MAN MAN-K 5.407512 -53.645234 NA Mana White sands soil r1 sample NA
MAN_Ks_r2 MAN MAN-K 5.407512 -53.645234 NA Mana White sands soil r2 sample NA
MAN_Ks_r3 MAN MAN-K 5.407512 -53.645234 NA Mana White sands soil r3 sample NA
MAN_Ks_r4 MAN MAN-K 5.407512 -53.645234 NA Mana White sands soil r4 sample NA
MAN_Ll_r1 MAN MAN-L 5.407444 -53.64503 NA Mana White sands litter r1 sample NA
MAN_Ll_r2 MAN MAN-L 5.407444 -53.64503 NA Mana White sands litter r2 sample NA
MAN_Ll_r3 MAN MAN-L 5.407444 -53.64503 NA Mana White sands litter r3 sample NA
MAN_Ll_r4 MAN MAN-L 5.407444 -53.64503 NA Mana White sands litter r4 sample NA
MAN_Ls_r1 MAN MAN-L 5.407444 -53.64503 NA Mana White sands soil r1 sample NA
MAN_Ls_r2 MAN MAN-L 5.407444 -53.64503 NA Mana White sands soil r2 sample NA
MAN_Ls_r3 MAN MAN-L 5.407444 -53.64503 NA Mana White sands soil r3 sample NA
MAN_Ls_r4 MAN MAN-L 5.407444 -53.64503 NA Mana White sands soil r4 sample NA
MAN_Ml_r1 MAN MAN-M 5.407247 -53.645045 NA Mana White sands litter r1 sample NA
MAN_Ml_r2 MAN MAN-M 5.407247 -53.645045 NA Mana White sands litter r2 sample NA
MAN_Ml_r3 MAN MAN-M 5.407247 -53.645045 NA Mana White sands litter r3 sample NA
MAN_Ml_r4 MAN MAN-M 5.407247 -53.645045 NA Mana White sands litter r4 sample NA
MAN_Ms_r1 MAN MAN-M 5.407247 -53.645045 NA Mana White sands soil r1 sample NA
MAN_Ms_r2 MAN MAN-M 5.407247 -53.645045 NA Mana White sands soil r2 sample NA
MAN_Ms_r3 MAN MAN-M 5.407247 -53.645045 NA Mana White sands soil r3 sample NA
MAN_Ms_r4 MAN MAN-M 5.407247 -53.645045 NA Mana White sands soil r4 sample NA
MAN_Nl_r1 MAN MAN-N 5.407318 -53.645405 NA Mana White sands litter r1 sample NA
MAN_Nl_r2 MAN MAN-N 5.407318 -53.645405 NA Mana White sands litter r2 sample NA
MAN_Nl_r3 MAN MAN-N 5.407318 -53.645405 NA Mana White sands litter r3 sample NA
MAN_Nl_r4 MAN MAN-N 5.407318 -53.645405 NA Mana White sands litter r4 sample NA
MAN_Ns_r1 MAN MAN-N 5.407318 -53.645405 NA Mana White sands soil r1 sample NA
MAN_Ns_r2 MAN MAN-N 5.407318 -53.645405 NA Mana White sands soil r2 sample NA
MAN_Ns_r3 MAN MAN-N 5.407318 -53.645405 NA Mana White sands soil r3 sample NA
MAN_Ns_r4 MAN MAN-N 5.407318 -53.645405 NA Mana White sands soil r4 sample NA
MAN_Ol_r1 MAN MAN-O 5.407461 -53.645487 NA Mana White sands litter r1 sample NA
MAN_Ol_r2 MAN MAN-O 5.407461 -53.645487 NA Mana White sands litter r2 sample NA
MAN_Ol_r3 MAN MAN-O 5.407461 -53.645487 NA Mana White sands litter r3 sample NA
MAN_Ol_r4 MAN MAN-O 5.407461 -53.645487 NA Mana White sands litter r4 sample NA
MAN_Os_r1 MAN MAN-O 5.407461 -53.645487 NA Mana White sands soil r1 sample NA
MAN_Os_r2 MAN MAN-O 5.407461 -53.645487 NA Mana White sands soil r2 sample NA
MAN_Os_r3 MAN MAN-O 5.407461 -53.645487 NA Mana White sands soil r3 sample NA
MAN_Os_r4 MAN MAN-O 5.407461 -53.645487 NA Mana White sands soil r4 sample NA
MAN_Pl_r1 MAN MAN-P 5.40749 -53.645723 NA Mana White sands litter r1 sample NA
MAN_Pl_r2 MAN MAN-P 5.40749 -53.645723 NA Mana White sands litter r2 sample NA
MAN_Pl_r3 MAN MAN-P 5.40749 -53.645723 NA Mana White sands litter r3 sample NA
MAN_Pl_r4 MAN MAN-P 5.40749 -53.645723 NA Mana White sands litter r4 sample NA
MAN_Ps_r1 MAN MAN-P 5.40749 -53.645723 NA Mana White sands soil r1 sample NA
MAN_Ps_r2 MAN MAN-P 5.40749 -53.645723 NA Mana White sands soil r2 sample NA
MAN_Ps_r3 MAN MAN-P 5.40749 -53.645723 NA Mana White sands soil r3 sample NA
MAN_Ps_r4 MAN MAN-P 5.40749 -53.645723 NA Mana White sands soil r4 sample NA
H20_Ql_r1 H20 H20-Q NA NA NA Petit Plateau Terra firme litter r1 negative Extraction
H20_Ql_r2 H20 H20-Q NA NA NA Petit Plateau Terra firme litter r2 negative Extraction
H20_Ql_r3 H20 H20-Q NA NA NA Petit Plateau Terra firme litter r3 negative Extraction
H20_Ql_r4 H20 H20-Q NA NA NA Petit Plateau Terra firme litter r4 negative Extraction
H20_Qs_r1 H20 H20-Q NA NA NA Petit Plateau Terra firme soil r1 negative Extraction
H20_Qs_r2 H20 H20-Q NA NA NA Petit Plateau Terra firme soil r2 negative Extraction
H20_Qs_r3 H20 H20-Q NA NA NA Petit Plateau Terra firme soil r3 negative Extraction
H20_Qs_r4 H20 H20-Q NA NA NA Petit Plateau Terra firme soil r4 negative Extraction
MAN_Ql_r1 MAN MAN-A NA NA NA Mana White sands litter r1 negative Extraction
MAN_Ql_r2 MAN MAN-A NA NA NA Mana White sands litter r2 negative Extraction
MAN_Ql_r3 MAN MAN-A NA NA NA Mana White sands litter r3 negative Extraction
MAN_Ql_r4 MAN MAN-A NA NA NA Mana White sands litter r4 negative Extraction
MAN_Qs_r1 MAN MAN-A NA NA NA Mana White sands soil r1 negative Extraction
MAN_Qs_r2 MAN MAN-A NA NA NA Mana White sands soil r2 negative Extraction
MAN_Qs_r3 MAN MAN-A NA NA NA Mana White sands soil r3 negative Extraction
MAN_Qs_r4 MAN MAN-A NA NA NA Mana White sands soil r4 negative Extraction
cn_01_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_01_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_01_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_01_r4 NA NA NA NA NA NA NA NA r4 negative PCR
cn_02_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_02_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_02_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_02_r4 NA NA NA NA NA NA NA NA r4 negative PCR
cn_03_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_03_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_03_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_03_r4 NA NA NA NA NA NA NA NA r4 negative PCR
cn_04_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_04_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_04_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_04_r4 NA NA NA NA NA NA NA NA r4 negative PCR
cn_05_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_05_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_05_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_05_r4 NA NA NA NA NA NA NA NA r4 negative PCR
cn_06_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_06_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_06_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_06_r4 NA NA NA NA NA NA NA NA r4 negative PCR
cn_07_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_07_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_07_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_07_r4 NA NA NA NA NA NA NA NA r4 negative PCR
cn_08_r1 NA NA NA NA NA NA NA NA r1 negative PCR
cn_08_r2 NA NA NA NA NA NA NA NA r2 negative PCR
cn_08_r3 NA NA NA NA NA NA NA NA r3 negative PCR
cn_08_r4 NA NA NA NA NA NA NA NA r4 negative PCR
blk_01_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_01_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_01_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_01_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_02_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_02_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_02_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_02_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_03_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_03_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_03_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_03_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_04_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_04_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_04_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_04_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_05_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_05_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_05_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_05_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_06_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_06_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_06_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_06_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_07_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_07_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_07_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_07_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_08_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_08_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_08_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_08_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_09_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_09_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_09_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_09_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_10_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_10_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_10_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_10_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_11_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_11_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_11_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_11_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
blk_12_r1 NA NA NA NA NA NA NA NA r1 negative Library/Sequencing
blk_12_r2 NA NA NA NA NA NA NA NA r2 negative Library/Sequencing
blk_12_r3 NA NA NA NA NA NA NA NA r3 negative Library/Sequencing
blk_12_r4 NA NA NA NA NA NA NA NA r4 negative Library/Sequencing
cp_01_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_01_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_01_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_01_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
cp_02_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_02_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_02_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_02_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
cp_03_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_03_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_03_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_03_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
cp_04_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_04_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_04_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_04_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
cp_05_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_05_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_05_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_05_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
cp_06_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_06_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_06_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_06_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
cp_07_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_07_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_07_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_07_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
cp_08_r1 NA NA NA NA NA NA NA NA r1 positive Mock 16 plants
cp_08_r2 NA NA NA NA NA NA NA NA r2 positive Mock 16 plants
cp_08_r3 NA NA NA NA NA NA NA NA r3 positive Mock 16 plants
cp_08_r4 NA NA NA NA NA NA NA NA r4 positive Mock 16 plants
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
positive = read.delim("RawData/positifs.uniq.annotated.txt",
sep="\t",
header = TRUE)
columns = names(positive)
columns.info = c("id", "dilution", "species_name", "taxid", "true", "sequence")
columns.counts= columns[grep("^sample\\.",columns)]
positive.count = t(positive[,columns.counts])
motus = as.data.frame(positive[,columns.info])
positive.motus = data.frame(dilution = as.numeric(motus$dilution)/2,
species = as.character(motus$species_name),
taxid = as.integer(motus$taxid),
true = motus$true == "True"
)
samples.names = rownames(positive.count)
samples = t(simplify2array(strsplit(samples.names,split="_")))
# [,1] [,2] [,3] [,4] [,5] [,6]
# [1,] "sample.TM" "POS" "d16" "1" "a" "A1"
# [2,] "sample.TM" "POS" "d16" "1" "a" "B1"
# [3,] "sample.TM" "POS" "d16" "1" "b" "A2"
# [4,] "sample.TM" "POS" "d16" "1" "b" "B2"
# [5,] "sample.TM" "POS" "d16" "2" "a" "A1"
# [6,] "sample.TM" "POS" "d16" "2" "a" "B1"
samples = as.data.frame(samples[,3:6])
names(samples) = c("dilution","repeats","PCR","Plate")
positive.samples = data.frame(dilution = 32%/%as.integer(substr(as.character(samples$dilution),2,10)),
repeats = interaction(samples[,2:4],drop = TRUE)
)
rownames(positive.samples)= samples.names
rownames(positive.count) = samples.names
rownames(positive.motus) = positive$id
colnames(positive.count) = positive$id
plants.16 = positive.motus[positive.motus$true,][,c(2,3,1)]
plants.16 = plants.16[order(1/plants.16$dilution),]
plants.16$log10.dilution = - seq_len(nrow(plants.16)) / log(10)*log(2)
plants.16$dilution = 1/(2^seq_len(nrow(plants.16)))
usethis::use_data(positive.samples,overwrite = TRUE)
usethis::use_data(positive.motus,overwrite = TRUE)
usethis::use_data(positive.count,overwrite = TRUE)
usethis::use_data(plants.16,overwrite = TRUE)
positive.clean = read.delim("RawData/positifs.uniq.annotated.clean.txt",
sep="\t",
header = TRUE)
columns = names(positive.clean)
columns.info = c("id", "dilution", "species_name", "taxid", "true", "sequence")
columns.counts= columns[grep("^sample\\.",columns)]
positive.clean.count = t(positive.clean[,columns.counts])
motus.clean = as.data.frame(positive.clean[,columns.info])
positive.clean.motus = data.frame(dilution = as.numeric(motus.clean$dilution)/2,
species = as.character(motus.clean$species_name),
taxid = as.integer(motus.clean$taxid),
true = motus.clean$true == "True"
)
samples.names = rownames(positive.clean.count)
samples = t(simplify2array(strsplit(samples.names,split="_")))
samples = as.data.frame(samples[,3:6])
names(samples) = c("dilution","repeats","PCR","Plate")
positive.clean.samples = data.frame(dilution = 32%/%as.integer(substr(as.character(samples$dilution),2,10)),
repeats = interaction(samples[,2:4],drop = TRUE)
)
rownames(positive.clean.samples)= samples.names
rownames(positive.clean.count) = samples.names
rownames(positive.clean.motus) = positive.clean$id
colnames(positive.clean.count) = positive.clean$id
usethis::use_data(positive.clean.samples,overwrite = TRUE)
usethis::use_data(positive.clean.motus,overwrite = TRUE)
usethis::use_data(positive.clean.count,overwrite = TRUE)
#
# Litter/Soil dataset
#
guiana = read.delim("RawData/litiere_ins_cl97_agg_filt_tax.tab",
header = TRUE,
sep="\t")
columns = names(guiana)
columns.info = c("id","best_identity.order_filtered_embl_r136_noenv_INS",
"taxid",
"phylum_name","order_name","class_name","family_name","genus_name","species_name",
"sequence")
columns.counts= columns[grep("^sample\\.",columns)]
samples.names = gsub(pattern = "sample.",
replacement = "",
columns.counts)
guiana.count = t(guiana[,columns.counts])
motus = as.data.frame(guiana[,columns.info])
guiana.motus = data.frame(id = paste("EUK",sprintf("%06d",1:nrow(motus)),sep=""),
best_id = motus$best_identity.order_filtered_embl_r136_noenv_INS,
taxid = as.integer(motus$taxid),
species = factor(as.character(motus$species_name)),
genus = factor(as.character(motus$genus_name)),
family = factor(as.character(motus$family_name)),
class = factor(as.character(motus$class_name)),
order = factor(as.character(motus$order_name)),
phylum = factor(as.character(motus$phylum_name)),
sequence = as.character(motus$sequence),
stringsAsFactors = FALSE
)
samples = read.delim("RawData/Litiere_sample_list.txt",header=TRUE)
guiana.samples = samples[samples.names,]
guiana.samples$sample = as.factor(sub("_r.$","",samples.names))
rownames(guiana.count) = samples.names
colnames(guiana.count) = guiana.motus$id
rownames(guiana.motus) = guiana.motus$id
usethis::use_data(guiana.samples,overwrite = TRUE)
usethis::use_data(guiana.motus,overwrite = TRUE)
usethis::use_data(guiana.count,overwrite = TRUE)
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: ISO-8859-1
RnwWeave: knitr
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
File added
File added
File added
File added
File added
File added
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 2031 2071" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:1.41421;">
<g transform="matrix(1,0,0,1,-192,-982)">
<g id="Main-Plot">
<g>
<g id="Grille">
<g transform="matrix(1.1808,0,0,1,-75.4118,0)">