-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in check_rank_names(ps) : ranks of taxonimic profile must be one of Kingdom, Phylum, Class, Order, Family, Genus, Species #101
Comments
Hey @KatrinaLutap and @yiluheihei I get the same error with this script. What may help to prevent the error? #'@title Linear discriminant analysis Effect Size analysis script.
#'@description In this script the LDA effect sizes are investigated for:
# Prepare the environment ----
library(tidyverse)
library(phyloseq)
library(microbiomeMarker)
library(microViz)
library(readxl)
source("utils/utils.R")
# Reading in the data ----
otu_mat <- read.csv("data/OTU_table_Exp2_24hrs.csv")
tax_mat <- read.csv("data/Taxa_Exp_1_2_Cleaned.csv")
samples_df <- read.csv("data/Metadata_Exp2_24hrs.csv")
# phy <- make_phyloseq(otu_mat, tax_mat, samples_df)
otu_mat <- otu_mat %>%
tibble::column_to_rownames("asv")
tax_mat <- tax_mat %>%
tibble::column_to_rownames("asv")
samples_df <- samples_df %>%
tibble::column_to_rownames("samples")
otu_mat <- as.matrix(otu_mat)
tax_mat <- as.matrix(tax_mat)
OTU <- otu_table(otu_mat, taxa_are_rows = TRUE)
TAX <- tax_table(tax_mat)
samples <- sample_data(samples_df)
phyloseq_object_all <- phyloseq(OTU, TAX, samples)
phyloseq_object_all <- prune_taxa(taxa_sums(phyloseq_object_all) > 0,
phyloseq_object_all)
message("Created the phyloseq object")
lef_out <- run_lefse(phyloseq_object_all,
taxa_rank = "none",
group = "Treatment", norm = "CPM",
kw_cutoff = 0.05, lda_cutoff = 2)
|
Dear @KatrinaLutap and @Luke-ebbis I'm also having a similar issue with my 18S (microeukaryotes) dataset with 9 taxonomic ranks (Domain, Supergroup, Division, Subdivision, Class, Order, Family, Genus, Species" ). Have you got any solution for this? |
Looking at the code, the function microbiomeMarker/R/utilities.R Lines 31 to 36 in afe4745
This global constant is defined here: microbiomeMarker/data-raw/available_ranks.R Lines 1 to 11 in afe4745
So in my view the one way to deal with this is to
|
Dear @yiluheihei, thank you for this package.
I had this error message while using the package:
Error in check_rank_names(ps) :
ranks of taxonimic profile must be one of Kingdom, Phylum, Class, Order, Family, Genus, Species
I think it is because my phyloseq object has 8 taxonomic ranks based from my taxonomy database:
Does this mean I can not use more than 8 taxonomic ranks and is there a way to go around this?
Thank you.
Best,
Katrina
The text was updated successfully, but these errors were encountered: