Fix/lowdepth sample fix#8
Merged
Merged
Conversation
miraep8
approved these changes
Sep 17, 2025
miraep8
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me - thanks for adding the test cases as well!
|
|
||
| get_metaphlan_analyses <- function(con, analysis_ids, schema="public") { | ||
| raw_results <- get_subset_pg_df("mgx_metaphlan", "ia_id", analysis_ids, schema=schema) %>% | ||
| get_metaphlan_analyses <- function(con, analysis_ids, schema="public", include_failures=FALSE) { |
Contributor
There was a problem hiding this comment.
Nice, I think this include_failures flag is a good way to give people the data for all the samples they sequenced if they really want it! 👍
| if (include_failures){ | ||
| if (sum(raw_results[raw_results$clade_name == "unclassified", "estimated_number_of_reads_from_the_clade"]) > 0){ | ||
| print(raw_results[raw_results$clade_name== "unclassified", "ia_id"]) | ||
| stop("some of the above analyses have metaphlan failures where estimated_number of reads from the clade is not zero as expected; please alert of the vdbR delevopers that the metaphlan output has changed") |
Contributor
There was a problem hiding this comment.
Nice! Hopefully a good catch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses how we consider the (usually poor quality) samples that have no metaphlan hits in the context of creating phyloseq objects. vdbR now will error and tell the user which samples they should remove from their metadata. Making this a hard error rather than a warning should clarify to users which samples they need to be aware of.