Elisseeff-Lab / domino

A software package for connecting cell level features in single cell RNA sequencing data with receptor ligand activity. Please be aware that an improved package, dominoSignal, is available.
https://fertiglab.github.io/dominoSignal/
GNU General Public License v3.0
15 stars 8 forks source link

Could not find function "convert_genes" #11

Closed gleb-gavrish closed 3 years ago

gleb-gavrish commented 3 years ago

Hi! I am having a similar issue with @lothm2014 -- when I'm running convert_genes() function, the error 'Could not find function "convert_genes"' appears. > library(domino) > convert_genes() Error in convert_genes() : could not find function "convert_genes"

The find() function also can't find convert_genes() > find('convert_genes') character(0)

But the funniest part is the fact that other functions work properly! > signaling_heatmap() Error in signaling_heatmap() : argument "dom" is missing, with no default > create_domino() Error in create_domino() : Either ser or clusters and z_scores must be provided > find('signaling_heatmap') [1] "package:domino" > find('create_domino') [1] "package:domino"

Also, I have functions documentation for all functions, even for convert_genes(). You've previously written, that the function isn't exported. But I have no idea how to export it by myself :( I will drop my sessionInfo() and NAMESPACE below. In NAMESPACE (similar to the GitHub version) there is no export(convert_genes) line. Maybe it's a clue?

My sessionInfo(): > sessionInfo()

R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=ru_RU.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=ru_RU.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=ru_RU.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=ru_RU.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] biomaRt_2.44.4 domino_0.1.1  

loaded via a namespace (and not attached):
 [1] progress_1.2.2       tinytex_0.27         tidyselect_1.1.0    
 [4] xfun_0.19            remotes_2.2.0        purrr_0.3.4         
 [7] testthat_3.0.0       vctrs_0.3.6          generics_0.1.0      
[10] usethis_2.0.1        stats4_4.0.3         BiocFileCache_1.12.1
[13] blob_1.2.1           XML_3.99-0.5         rlang_0.4.10        
[16] pkgbuild_1.1.0       pillar_1.4.7         withr_2.3.0         
[19] glue_1.4.2           DBI_1.1.0            rappdirs_0.3.1      
[22] BiocGenerics_0.34.0  bit64_4.0.5          dbplyr_2.0.0        
[25] sessioninfo_1.1.1    lifecycle_1.0.0      stringr_1.4.0       
[28] devtools_2.3.2       memoise_1.1.0        Biobase_2.48.0      
[31] callr_3.5.1          IRanges_2.22.2       ps_1.4.0            
[34] parallel_4.0.3       curl_4.3             AnnotationDbi_1.50.3
[37] Rcpp_1.0.6           backports_1.2.0      openssl_1.4.3       
[40] desc_1.2.0           pkgload_1.1.0        S4Vectors_0.26.1    
[43] fs_1.5.0             bit_4.0.4            hms_0.5.3           
[46] askpass_1.1          digest_0.6.27        stringi_1.5.3       
[49] processx_3.4.4       dplyr_1.0.4          rprojroot_1.3-2     
[52] cli_2.3.0            tools_4.0.3          magrittr_2.0.1      
[55] RSQLite_2.2.1        tibble_3.0.6         crayon_1.4.1        
[58] pkgconfig_2.0.3      ellipsis_0.3.1       xml2_1.3.2          
[61] prettyunits_1.1.1    rstudioapi_0.13      assertthat_0.2.1    
[64] httr_1.4.2           R6_2.5.0             compiler_4.0.3      

NAMESPACE:

# Generated by roxygen2: do not edit by hand

export(build_domino)
export(collate_network_items)
export(cor_heatmap)
export(cor_scatter)
export(create_domino)
export(feat_heatmap)
export(gene_network)
export(incoming_signaling_heatmap)
export(rename_clusters)
export(signaling_heatmap)
export(signaling_network)
exportClasses(domino)
Chris-Cherry commented 3 years ago

Hey Gleb,

The convert_genes function is an internal function that's used by create_domino to convert the signaling database from HGNC symbol to MGI symbol using BioMart. If you use the gene_conv parameter in create_domino it should automatically handle everything for you. If that isn't functioning properly, feel free to respond and I can try to help you work it out.

If you want to access the function for your own use elsewhere, you have two options. The first is to manually edit domino/R/import_fxns.R to include an #' @export flag in the convert_genes documentation section. When you then run devtools::document() and devtools::install() it will export convert_genes. The second is simply to copy the function from import_fxns.R from github directly (in the R folder as well).

Hopefully this gives you some clarity.

Chris

gleb-gavrish commented 3 years ago

Thanks! It was very informative! :)