Commit 20b20eeb authored by mahendra-mariadassou's avatar mahendra-mariadassou
Browse files

Revert back to original names when exporting

parent 985a10dd
......@@ -85,7 +85,11 @@ app_server <- function(input, output, session) {
content = function(con) {
## Update taxonomy of object phyloseq
phyloseq::tax_table(physeq)[rownames(affiliations$cleaned), ] <- affiliations$cleaned
## TODO revert short OTU names back to original names
## revert short OTU names back to original names
dict <- setNames(object = otu_dictionary$sequence,
nm = otu_dictionary$OTU)
phyloseq::taxa_names(physeq) <- dict[phyloseq::taxa_names(physeq)]
## Export
phyloseq.extended::write_phyloseq(
physeq = physeq,
biom_file = con,
......
......@@ -26,7 +26,7 @@ create_otu_dictionary <- function(physeq) {
abundance = phyloseq::taxa_sums(physeq)
) %>%
dplyr::arrange(desc(abundance))
## If all taxa names are long, sequences are likely to have been processed by DADA
## If all taxa names are long, sequences are likely to have been processed by DADA2
## Move OTU names to sequence column and rename OTU with shorter names
if (long_taxa_names(otu_dictionary$sequence)) {
otu_dictionary <- otu_dictionary %>%
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment