Skip to content

Commit

Permalink
fix: import crashed when atlas cell types where all numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
aviezerl committed Aug 20, 2023
1 parent f9e06d2 commit 82696cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/import.R
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ import_dataset <- function(project,
}
} else if (is.null(cell_type_colors)) {
if (!is.null(atlas_dataset) && !is.null(atlas_project)) { # use atlas colors
atlas_colors <- fread(fs::path(project_cache_dir(atlas_project), atlas_dataset, "cell_type_colors.tsv")) %>% as_tibble()
atlas_colors <- fread(fs::path(project_cache_dir(atlas_project), atlas_dataset, "cell_type_colors.tsv"), colClasses = c("cell_type" = "character", "color" = "character")) %>% as_tibble()
atlas_colors <- atlas_colors %>%
bind_rows(
tibble(cell_type = c("Dissimilar", "Mixture", "Doublet"), color = c("gray", "darkgray", "black"), order = max(atlas_colors$order) + 1:3)
Expand Down

0 comments on commit 82696cd

Please sign in to comment.