ASV_outliers: remove ASV outliers using observed distribution

View source: R/ASV_outliers.r

ASV_outliersR Documentation

remove ASV outliers using observed distribution

Description

Recognize and remove ASV outliers according to selected variables

Usage

ASV_outliers(x, by, n_var = 1)

Arguments

x

The community table with Taxon reads counts

by

A list with variables used to produce the threshold

n_var

A number, minimum number of variables that should be below threshold to declare outliers default = 1.

Details

This function will detect outlier ASVs and divide the data.frame into outliers and not outliers accordingly. The threshold will be assigned by the lower wisker of the boxplot (1.5x interquartile variation). Variables used to produced the treshhold a free configurable, but query coverage, percent identity and query length are meaningful. User can define how many of the selected variables should be below the hreshold for the ASV to be declared as outlier. Default is 1, which correspond to combine the variables using an 'or' logical operator.

Value

Two data.frames containing outliers and non outliers.

keep

data.frame with non outlier ASVs (above the treshold)

outliers

data.frame with outlier ASVs (below the treshold)

thresholds

Table with thresholds used

AVS_tm

Table with thresholds matrix per ASV

Author(s)

Pedro Martinez Arbizu

See Also

boxplot

Examples

ASV_outliers(x=deepMeio[,9:27],by=data.frame(deepMeio$qcovs,deepMeio$length,deepMeio$pident),n_var=1)





pmartinezarbizu/dada2pp documentation built on Feb. 7, 2024, 7:01 a.m.