waldronlab / lefser

R implementation of the LEfSe method
https://waldronlab.io/lefser/
38 stars 6 forks source link

Error in .local(.Object, ...) : ‘x’ and ‘y’ do not contain data #19

Closed dannynielsen0 closed 8 months ago

dannynielsen0 commented 2 years ago

I have created the attached summarized experiment for analysis, but keep getting the following errors when I try to run lefser.

I have followed the tutorial for creating the summarized experiment and running the analysis, so I am hoping you can tell me if I have some bug in my code:

create the SE - I transpose the counts data as it needs to match # rows with # cols

throat_exp <- SummarizedExperiment(assays=list(counts=t(counts)), colData=colData)

should be simple to then run the lefser

throat_res <- lefser(expr=throat_exp, groupCol = "Staph.culture", blockCol = "Location")

the above line generates the following error:

Error in .local(.Object, ...) : ‘x’ and ‘y’ do not contain data

throat_exp.RDS.zip

LiNk-NY commented 10 months ago

Hi @dannynielsen0 There are some empty groups in your Location variable. I have included a droplevels call in the PR linked above.