Skip to content
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

Getting error "subscript out of bounds" when trying to run testDA() #23

Open
gbergmann opened this issue Mar 14, 2024 · 0 comments
Open
Assignees
Labels

Comments

@gbergmann
Copy link

Describe the bug
Hello, a collaborator recommended I try the DAtest package for differential abundance analysis on some phyloseq data of mine. I'm still learning how to use the package, so the error is most likely due to a problem with how I've set up my data. When I try to run testDA() on one of my datasets, I get the error "Error in { : task 1 failed - "task 1 failed - "subscript out of bounds." This has happened both when I use the transposed OTU table and a vector of my sample group (i.e. plant tissue type) levels as the predictor, as well as when I use the source phyloseq object and the sample groups from my metadata. Any suggestions on how to resolve this problem are much appreciated!

To Reproduce
Here's the code I tried, and the resulting error: (csv file is attached for reproducibility)
seed.stigma.raw.asv.csv

seed.stigma.raw.asv <- otu_table(seed.stigma.raw.phy) %>% data.frame()
seed.stigma.raw.asv.t <- t(seed.stigma.raw.asv) %>% data.frame()
vec <- c("stigma", "stigma", "stigma", "stigma", "stigma", "stigma", "stigma", "seed_pooled",
"seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled",
"seed_pooled", "stigma", "stigma", "stigma", "stigma", "stigma", "stigma", "stigma", "stigma",
"seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled",
"seed_pooled", "seed_pooled", "stigma", "stigma", "stigma", "stigma", "stigma", "stigma",
"stigma", "stigma", "seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled",
"seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled", "seed_pooled", "stigma", "stigma",
"stigma", "stigma", "stigma", "stigma", "stigma", "seed_pooled", "seed_pooled", "seed_pooled",
"seed_pooled", "seed_pooled", "seed_pooled")
test <- testDA(seed.stigma.raw.asv.t, predictor = vec)
test2 <- testDA(seed.stigma.raw.phy, predictor = "tissue_type")
options(error=recover)

Seed is set to 123
predictor is assumed to be a categorical variable with 2 levels: seed_pooled, stigma
|=================================================================================================| 100%neb, per, adx, vli, qpo, poi, wil, ttt, ltt, ltt2, ds2, ds2x, lim, lli, lli2, lrm, llm, llm2 were excluded due to failure
Error in { : task 1 failed - "task 1 failed - "subscript out of bounds""
In addition: Warning messages:
1: In tests != c("lim", "lli", "lli2", "vli") :
longer object length is not a multiple of shorter object length
2: In tests != c("lim", "lli", "lli2", "vli") :
longer object length is not a multiple of shorter object length

OS and package versions (please complete the following information):

  • OS: MacOS Ventura 13.3.1
  • DAtest version: 2.7.5
  • Versions of other packages related to the bug: DESeq2_1.40.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants