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

Fix: wrong filtered gene count in 01_input_qc.html #4

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

vucinick
Copy link
Contributor

@vucinick vucinick commented Oct 2, 2023

Description

In the Gene filtering section of the generated 01_input_qc.html report, it reports a wrong number of removed filtered genes, both in custom and data-sensitive tab.

Current behaviour

It reports the number of genes that aren't discarded.

Expected behaviour

It should report the number of genes that are discarded and removed from the rest of the analysis.

Fix

The error is ininst/Rmd/single_sample/01_input_qc_children/gene_filtering_qc.Rmdand inst/Rmd/single_sample/01_input_qc_children/gene_filtering_custom.Rmd. Example:

**Removing `r sum(!drake::readd(sce_qc_gene_filter, path = drake_cache_dir))` genes with UMI per cell less than
`r cfg$MIN_UMI` and expressed in less than `r cfg$MIN_RATIO_CELLS * 100` % of all cells.**

sce_qc_gene_filter is a logical vector where TRUE is not passing the filter, and FALSE is passing the filter. However, currently it is summing all FALSE values = all the genes that are passing the filter. It is taking a reverse values of logical vector and summing it. The fix is removing the inversion of the logical vector.

@vucinick vucinick added the invalid This doesn't seem right label Oct 2, 2023
@vucinick vucinick self-assigned this Oct 2, 2023
@gorgitko gorgitko force-pushed the filtered_gene_count_Rmd branch from f750ace to 6f536f3 Compare October 5, 2023 09:37
Copy link
Contributor

@gorgitko gorgitko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

@gorgitko gorgitko force-pushed the filtered_gene_count_Rmd branch from 6f536f3 to 78cc2d3 Compare October 5, 2023 10:22
@gorgitko gorgitko merged commit a447552 into main Oct 5, 2023
1 check passed
@gorgitko gorgitko deleted the filtered_gene_count_Rmd branch October 5, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants