bc-anaisabel / juniperus_paper

Pipeline for analyzing Illumina MiSeq paired-end data of fungal communities
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

1_Filter_otu_table.R: #4

Open bc-anaisabel opened 4 years ago

bc-anaisabel commented 4 years ago

Filter OTUs present in only one sample from relative abundance table

bc-anaisabel commented 4 years ago

We haven't fixed this issue. Right now, the code calculates read sum, but it does not calculate what we need, that is taxa sum

Remove OTUs that appear only in 1 sample (using presence/absence)

any(taxa_sums(phyloseq.rel) == 1)

otu_table(prune_taxa(taxa_sums(phyloseq.rel) <= 1, phyloseq.rel))

phyloseq.rel_OTU2 <- prune_taxa(taxa_sums(phyloseq.rel) > 1, phyloseq.rel)