orthogene icon indicating copy to clipboard operation
orthogene copied to clipboard

convert_orthologs returning Error in names(object) <- nm : attempt to set an attribute on NULL

Open shanie-landen opened this issue 10 months ago β€’ 0 comments

1. Bug description

When running conver_orthologs I get an error that I am trying to set attribute to NULL.

Console output

Preparing gene_df.
data.frame format detected.
Extracting genes from NOG.
4,174 genes extracted.
Converting rat ==> human orthologs using: gprofiler
Retrieving all organisms available in gprofiler.
Using stored `gprofiler_orgs`.
Mapping species name: rat
Common name mapping found for rat
1 organism identified from search: rnorvegicus
Retrieving all organisms available in gprofiler.
Using stored `gprofiler_orgs`.
Mapping species name: human
Common name mapping found for human
1 organism identified from search: hsapiens
Checking for genes without orthologs in human.
Extracting genes from input_gene.
4,285 genes extracted.
Extracting genes from ortholog_gene.
4,285 genes extracted.
Dropping 269 NAs of all kinds from ortholog_gene.
Checking for genes without 1:1 orthologs.
Dropping 45 genes that have multiple input_gene per ortholog_gene (many:1).
Dropping 11 genes that have multiple ortholog_gene per input_gene (1:many).
Filtering gene_df with gene_map
Adding input_gene col to gene_df.
Adding input_gene_standard col to gene_df.
Error in names(object) <- nm : attempt to set an attribute on NULL
--
Β 
Β 

Expected behaviour

A new column in my gene_df with the human orthologs matching the rat genes in $NOG.

2. Reproducible example

Code

orthologs=orthogene::convert_orthologs(gene_df = allrats_sigs,
                                       gene_input = "NOG",
                                       gene_output = "columns",
                                       standardise_genes = "TRUE",
                                       input_species = "rat",
                                       output_species = "human")

Data

allrats_sigs$NOG [1] "ENSRNOG00000000047" "ENSRNOG00000000047" "ENSRNOG00000000047" "ENSRNOG00000000047" [5] "ENSRNOG00000000073" "ENSRNOG00000000073" "ENSRNOG00000000075" "ENSRNOG00000000075"...etc (If possible, upload a small sample of your data so that we can reproduce the bug on our end. If that's not possible, please at least include a screenshot of your data and other relevant details.)

3. Session info

(Add output of the R function utils::sessionInfo() below. This helps us assess version/OS conflicts which could be causing bugs.)

# Paste utils::sessionInfo() output 
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

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

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C               LC_TIME=en_AU.UTF-8       
 [4] LC_COLLATE=en_AU.UTF-8     LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

time zone: Etc/UTC
tzcode source: system (glibc)

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

other attached packages:
 [1] org.Rn.eg.db_3.18.0     orthogene_1.8.0         ggpubr_0.6.0            ggplot2_3.4.2          
 [5] VennDiagram_1.7.3       futile.logger_1.4.3     ensembldb_2.26.0        AnnotationFilter_1.26.0
 [9] GenomicFeatures_1.54.4  AnnotationDbi_1.64.1    Biobase_2.62.0          GenomicRanges_1.54.1   
[13] GenomeInfoDb_1.38.8     IRanges_2.36.0          S4Vectors_0.40.2        BiocGenerics_0.48.1    
[17] edgeR_4.0.16            limma_3.58.1           

loaded via a namespace (and not attached):
  [1] jsonlite_1.8.7              rstudioapi_0.15.0           magrittr_2.0.3             
  [4] fs_1.6.3                    BiocIO_1.12.0               zlibbioc_1.48.2            
  [7] vctrs_0.6.3                 memoise_2.0.1               Rsamtools_2.18.0           
 [10] RCurl_1.98-1.12             ggtree_3.10.1               rstatix_0.7.2              
 [13] htmltools_0.5.5             S4Arrays_1.2.1              progress_1.2.2             
 [16] lambda.r_1.2.4              curl_5.0.1                  broom_1.0.5                
 [19] gridGraphics_0.5-1          SparseArray_1.2.4           htmlwidgets_1.6.2          
 [22] plotly_4.10.2               futile.options_1.0.1        cachem_1.0.8               
 [25] GenomicAlignments_1.38.2    lifecycle_1.0.3             pkgconfig_2.0.3            
 [28] Matrix_1.6-0                R6_2.5.1                    fastmap_1.1.1              
 [31] GenomeInfoDbData_1.2.11     MatrixGenerics_1.14.0       aplot_0.2.2                
 [34] digest_0.6.33               colorspace_2.1-0            patchwork_1.2.0            
 [37] grr_0.9.5                   DESeq2_1.42.1               RSQLite_2.3.6              
 [40] filelock_1.0.2              fansi_1.0.4                 httr_1.4.6                 
 [43] abind_1.4-5                 compiler_4.3.1              remotes_2.4.2.1            
 [46] bit64_4.0.5                 withr_2.5.0                 backports_1.4.1            
 [49] BiocParallel_1.36.0         carData_3.0-5               DBI_1.2.2                  
 [52] homologene_1.4.68.19.3.27   highr_0.10                  ggsignif_0.6.4             
 [55] biomaRt_2.58.2              rappdirs_0.3.3              DelayedArray_0.28.0        
 [58] rjson_0.2.21                tools_4.3.1                 ape_5.7-1                  
 [61] glue_1.6.2                  restfulr_0.0.15             nlme_3.1-162               
 [64] ggvenn_0.1.10               generics_0.1.3              gtable_0.3.3               
 [67] tidyr_1.3.0                 data.table_1.14.8           hms_1.1.3                  
 [70] xml2_1.3.5                  car_3.1-2                   utf8_1.2.3                 
 [73] XVector_0.42.0              pillar_1.9.0                stringr_1.5.0              
 [76] yulab.utils_0.1.4           babelgene_22.9              dplyr_1.1.2                
 [79] treeio_1.26.0               BiocFileCache_2.10.2        lattice_0.21-8             
 [82] rtracklayer_1.62.0          bit_4.0.5                   tidyselect_1.2.1           
 [85] locfit_1.5-9.9              Biostrings_2.70.3           knitr_1.43                 
 [88] ProtGenerics_1.34.0         SummarizedExperiment_1.32.0 xfun_0.39                  
 [91] statmod_1.5.0               matrixStats_1.2.0           stringi_1.7.12             
 [94] ggfun_0.1.4                 lazyeval_0.2.2              yaml_2.3.7                 
 [97] evaluate_0.21               codetools_0.2-19            tibble_3.2.1               
[100] BiocManager_1.30.22         ggplotify_0.1.2             cli_3.6.1                  
[103] munsell_0.5.0               Rcpp_1.0.11                 gprofiler2_0.2.3           
[106] dbplyr_2.5.0                png_0.1-8                   XML_3.99-0.14              
[109] parallel_4.3.1              blob_1.2.4                  prettyunits_1.1.1          
[112] bitops_1.0-7                viridisLite_0.4.2           tidytree_0.4.6             
[115] scales_1.2.1                purrr_1.0.1                 crayon_1.5.2               
[118] rlang_1.1.1                 KEGGREST_1.42.0             formatR_1.14      

shanie-landen avatar Apr 10 '24 03:04 shanie-landen