Make sure dimensions for UMAPs exist #651
Merged
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.
When trying to generate the test data, I came across this error in the cell type report, where the dimensions set in the chunk options don't always exist. For each cell type annotation method, we have a chunk that is evaluated only if that method exists. Here was where we were defining the dimensions to use to create the UMAP in the following chunk. The problem with this approach is that if a method doesn't exist, then the dimensions don't get assigned to a variable. Then in the chunk where we create the UMAP we define the figure height and width with variables that don't exist. So here I'm just setting all the dimensions to a dummy set of dimensions in the event that a cell type method wasn't used. That way the variable exists when going to the UMAP chunk, even if that chunk doesn't get evaluated.