Account for mismatches between old cell typing results and current processed object and handle missing UMAPs #596
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.
Closes #591
Based on discussion in #591, we decided to handle any potential mismatches in barcodes between the processed object and the existing
CellAssign
orSingleR
results by labeling any cells not present in the results asUnclassified cells
. This PR makes that adjustment and fixes some other smaller errors I discovered during test runs.density()
following the suggestion in Figure out what to do when the numbers of cells don't match up between CellAssign results and processed SCE object #591 (comment).Unclassified cells
in the processed SCE object. This avoids any cells being labeled asNA
accidentally. This happens as part ofadd_celltypes_to_sce.R
.Unclassified cells
before continuing with plotting.scpcaTools
(Update renv & python scpcaTools#242). However, I realized we probably want to account for potentially having no UMAP results and still having cell type results. We already have handling for missing UMAPs in the main report, but we don't have that for the cell type report, so I added that here. This involved updating the function for creatingcelltype_df
to account for potentially missing UMAP results and then usinghas_umap
throughout the report to ensure no UMAPs are printed if UMAP is missing.Here's a copy of a rendered main and supplemental report with these changes:
SCPCL000495_qc.html.zip
SCPCL000495_celltype-report.html.zip