Skip to content

Commit

Permalink
Merge pull request #33 from gmteunisse/fix/sample-names-X
Browse files Browse the repository at this point in the history
Fixed behaviour for sample names containing X
  • Loading branch information
gmteunisse authored May 29, 2024
2 parents 7b422c5 + d86d21f commit 9564d35
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/top_taxa.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ top_taxa <- function(ps_obj, tax_level = NULL, n_taxa = 1, grouping = NULL,

# Convert to long
ps_long <- otu_table(ps_tmp) %>%
data.frame(taxid = row.names(.)) %>%
rename_with(function(x){gsub("X", "", x)}) %>%
data.frame(taxid = row.names(.), check.names = F) %>%
pivot_longer(!taxid, names_to = "sample_id", values_to = "abundance") %>%
left_join(sample_data(ps_tmp) %>%
data.frame(sample_id = row.names(.)),
Expand Down

0 comments on commit 9564d35

Please sign in to comment.