immunomind / immunarch

🧬 Immunarch: an R Package for Fast and Painless Exploration of Single-cell and Bulk T-cell/Antibody Immune Repertoires
https://immunarch.com
Apache License 2.0
312 stars 65 forks source link

fixVis : Error in if (is.na(.plot)) { : the condition has length > 1 #274

Closed Valeriy-Tereshchenko closed 2 years ago

Valeriy-Tereshchenko commented 2 years ago

❓ Questions and Help

We have a set of listed tutorials available on the website. Dear colleagues, When I apply fixVis() to any of my plots ( after vis() function) the error appears: fixVis : Error in if (is.na(.plot)) { : the condition has length > 1. fixVis without arguments is calling diamonds dataset. My system: R 4.2.1 ggplot2 3.3.6 immunarch 0.6.9 Rtools 4.2.0

Script example:

Overlap

repOverlap(InVitroList, .method = "morisita", .verbose = F) %>% vis("heatmap2") %>% fixVis()

repOverlap(InVitroList, .method = "overlap", .verbose = F) %>% repOverlapAnalysis("mds") %>% vis() %>% fixVis()

GeneUsage

geneUsage(InVitroList, "musmus.trbv", .norm = T) %>% geneUsageAnalysis(.method = "js", .verbose = F) %>% vis() %>% fixVis()

How can I fix it? Thank you!

Alexander230 commented 2 years ago

Hello, Valeriy! I'm Aleksandr, a developer of Immunarch package. Thank you for using our software!

I've made a hotfix for this bug; you can try it by installing Immunarch from dev branch:

install.packages(c("devtools", "pkgload"))
devtools::install_github("immunomind/immunarch", ref="dev")
devtools::reload(pkgload::inst("immunarch"))

If you have more questions, feel free to ask them!

Best regards, Aleksandr

Valeriy-Tereshchenko commented 2 years ago

Hello, Alexander! The solution is working! fixVis_is_OK_png Thank you!

Alexander230 commented 2 years ago

I'm glad to hear that it's working! If you have more questions, feel free to reopen the issue.