Removes all OTUs that are not found with a higher relative abundance than the set threshold in percent in at least one sample.

filter_otus(data, filter_otus = 0)

filter_species(data, filter_otus = 0)

Arguments

data

(required) Data list as loaded with amp_load.

filter_otus

Remove low abundant OTU's across all samples below this threshold in percent. (default: 0)

Value

An ampvis2 object

Examples

data("AalborgWWTPs")
AalborgWWTPs
#> ampvis2 object with 5 elements. 
#> Summary of OTU table:
#>      Samples         OTUs  Total#Reads    Min#Reads    Max#Reads Median#Reads 
#>           67         9430      2045128        17772        44326        31209 
#>    Avg#Reads 
#>      30524.3 
#> 
#> Assigned taxonomy:
#>      Kingdom       Phylum        Class        Order       Family        Genus 
#>   9430(100%) 9215(97.72%) 8282(87.83%) 7644(81.06%) 6746(71.54%) 5228(55.44%) 
#>      Species 
#>    23(0.24%) 
#> 
#> Metadata variables: 5 
#>  SampleID, Plant, Date, Year, Period
filtered <- filter_otus(AalborgWWTPs, filter_otus = 0.1)
#> 8628 OTUs not present in more than 0.1% relative abundance in any sample have been filtered 
#> Before: 9430 OTUs
#> After: 802 OTUs
filtered
#> ampvis2 object with 5 elements. 
#> Summary of OTU table:
#>      Samples         OTUs  Total#Reads    Min#Reads    Max#Reads Median#Reads 
#>           67          802      1763002        15601        38237        26515 
#>    Avg#Reads 
#>     26313.46 
#> 
#> Assigned taxonomy:
#>     Kingdom      Phylum       Class       Order      Family       Genus 
#>   802(100%) 793(98.88%) 755(94.14%) 742(92.52%)  709(88.4%) 584(72.82%) 
#>     Species 
#>    3(0.37%) 
#> 
#> Metadata variables: 5 
#>  SampleID, Plant, Date, Year, Period