dist_pos_control {MiscMetabar} | R Documentation |
Calculate ecological distance among positive controls vs distance for all samples
Description
Compute distance among positive controls, i.e. samples which are duplicated to test for variation, for example in (i) a step in the sampling, (ii) a step in the extraction, (iii) a step in the sequencing.
Usage
dist_pos_control(physeq, samples_names, method = "bray")
Arguments
physeq |
(required): a |
samples_names |
(required) a vector of names for samples with positives controls of the same samples having the same name |
method |
(default: "bray") a method to calculate
the distance, parsed to |
Value
A list of two data-frames with (i) the distance among positive controls and (ii) the distance among all samples
Author(s)
Adrien Taudière
Examples
data("enterotype")
sam_name_factice <- gsub("TS1_V2", "TS10_V2", sample_names(enterotype))
res_dist_cont <- dist_pos_control(enterotype, sam_name_factice)
hist(unlist(res_dist_cont$distAllSamples))
abline(
v = mean(unlist(res_dist_cont$dist_controlontrolSamples), na.rm = TRUE),
col = "red", lwd = 3
)
[Package MiscMetabar version 0.9.1 Index]