immunogenomics / symphony

Efficient and precise single-cell reference atlas mapping with Symphony
GNU General Public License v3.0
95 stars 22 forks source link

could not find function "vargenes_vst" #5

Closed guanlinW closed 3 years ago

guanlinW commented 3 years ago

Hello! Very nice package! I am going through the pbmc dataset. In option1, when I ran

'var_genes = vargenes_vst(ref_exp_full, groups = as.character(ref_metadata[['donor']]), topn = 2000)'

it showed: "vargenes_vst(ref_exp_full, groups = as.character(ref_metadata[["donor"]]), : could not find function "vargenes_vst"

Do you get any ideas why this occurred?

Thank you very much! guanlin

ps: Also attached sessionInfo()

R version 4.0.4 (2021-02-15) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.7

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.5 purrr_0.3.4 readr_1.4.0 tidyr_1.1.3 tibble_3.1.0
[8] ggplot2_3.3.3 tidyverse_1.3.0 symphony_1.0

guanlinW commented 3 years ago

Also Error in ' could not find function "plotBasic'

joycekang commented 3 years ago

Hi Guanlin,

Thanks for your message and for letting us know of these bugs. For the vargenes_vst error, I think this was caused by the fact that previously that function was not exported with the Symphony package and instead the tutorial was calling it from the singlecellmethods package. I have now exported Symphony's vargenes_vst so you should be able to call it. Let me know if that doesn't work still.

For the plotBasic error, that function isn't a Symphony-specific function but instead a convenience function (to simplify the ggplot plotting code). plotBasic is defined in the utils.R file in the vignettes folder. At the top of the PBMCs tutorial, there are two lines: source('libs.R') and source('utils.R') - you should run these lines in order to import the libraries needed for the tutorial (you may need to also install them if you don't have them). For example, looking at your sessionInfo() output, it seems like you don't have harmony installed. You'll need that for subsequent steps.

Please let me know if anything is unclear or if you run into any further issues. Thanks!

guanlinW commented 3 years ago

Hi Guanlin,

Thanks for your message and for letting us know of these bugs. For the vargenes_vst error, I think this was caused by the fact that previously that function was not exported with the Symphony package and instead the tutorial was calling it from the singlecellmethods package. I have now exported Symphony's vargenes_vst so you should be able to call it. Let me know if that doesn't work still.

For the plotBasic error, that function isn't a Symphony-specific function but instead a convenience function (to simplify the ggplot plotting code). plotBasic is defined in the utils.R file in the vignettes folder. At the top of the PBMCs tutorial, there are two lines: source('libs.R') and source('utils.R') - you should run these lines in order to import the libraries needed for the tutorial (you may need to also install them if you don't have them). For example, looking at your sessionInfo() output, it seems like you don't have harmony installed. You'll need that for subsequent steps.

Please let me know if anything is unclear or if you run into any further issues. Thanks!

Thank you for the promptly reply. Extremely helpful!

  1. vargenes_vst - now solved!
  2. plotBasic - Sorry, I forgot to run the libs.R and utils.R. I also realised the first question probably can be solved by running these two as 'singlecellmethods' package need to be installed. Probably good to add devtools::install_github("immunogenomics/singlecellmethods") in you installation part as well?
  3. harmony - yes, I have it. I need to library(harmony) first before installing symphony

Sessioninfo()

R version 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.5

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ggpubr_0.4.0 patchwork_1.1.1 RColorBrewer_1.1-2
[4] ggrastr_0.2.3 ggthemes_4.2.4 plyr_1.8.6
[7] matrixStats_0.58.0 forcats_0.5.1 stringr_1.4.0
[10] dplyr_1.0.5 purrr_0.3.4 readr_1.4.0
[13] tidyr_1.1.3 tibble_3.1.0 ggplot2_3.3.3
[16] tidyverse_1.3.0 irlba_2.3.3 Matrix_1.3-2
[19] singlecellmethods_0.1.0 data.table_1.14.0 harmony_1.0
[22] Rcpp_1.0.6 symphony_1.0