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

returnSamples() error when setting 'counts = TRUE' for 'relative_abundance' dataType #306

Open
Guan06 opened this issue Sep 28, 2024 · 0 comments
Assignees

Comments

@Guan06
Copy link

Guan06 commented Sep 28, 2024

Describe the bug
I am tring to get the count table of relative abundance of some disease related samples, all good when loading with counts = FALSE but errors occur when setting counts to TRUE.

To Reproduce
I have version curatedMetagenomicData_3.8.0

Blow is the scripts that got errors:

study <- "IaniroG_2022"

  samples <- filter(sampleMetadata, 
                 study_name == study) |>
    filter(body_site=="stool") |>
    select(where(~ !all(is.na(.x))))
  
  print(study)
  filter_lst <- c("acute_diarrhoea", "CDI", "FMT", "IBD", "control")
  samples <- samples[(samples$study_condition %in% filter_lst) &
                       (samples$country != "CHN"), ]
  ra_2022 <- returnSamples(samples, counts = TRUE,
                      dataType = "relative_abundance", rownames = "long")

Expected behavior
Return of a count table.

Additional context
Error message:
Error in validObject(.Object) :
invalid class “SummarizedExperiment” object:
nb of cols in 'assay' (0) must equal nb of rows in 'colData' (165)

@Guan06 Guan06 changed the title returnSamples() error when setting 'counts = TRUE' for 'relative_abundance' aataType returnSamples() error when setting 'counts = TRUE' for 'relative_abundance' dataType Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants