"organism" missing in BSgenome.Hsapiens.UCSC.hg38 slotNames
1
0
Entering edit mode
ubjw24 • 0
@6bd8ba1e
Last seen 7 hours ago
United States

Enter the body of text here

I recently upgraded R to 4.5.1 and installed BSgeome.Hsapiens.UcSC.hg38. Howver, when running mutSignature, it errored out and I traced the problem to be missing the "organism" term in the slotNames of the BSgenome object. I tried to resinstall this package a few times, same problme, "organism" is not in the slotNames. Any fix for this?

Bioconductor • 56 views
ADD COMMENT
0
Entering edit mode

R-4.5.1 is compatible with both release and devel versions of Bioconductor. Which one are you using? I am still on release, and it's fine:

> BSgenome.Hsapiens.UCSC.hg38
| BSgenome object for Human
| - organism: Homo sapiens
| - provider: UCSC
| - genome: hg38
| - release date: 2023/01/31
| - 711 sequence(s):
|     chr1                    chr2                    chr3                   
|     chr4                    chr5                    chr6                   
|     chr7                    chr8                    chr9                   
|     chr10                   chr11                   chr12                  
|     chr13                   chr14                   chr15                  
|     ...                     ...                     ...                    
|     chr19_KV575256v1_alt    chr19_KV575257v1_alt    chr19_KV575258v1_alt   
|     chr19_KV575259v1_alt    chr19_KV575260v1_alt    chr19_MU273387v1_alt   
|     chr22_KN196485v1_alt    chr22_KN196486v1_alt    chr22_KQ458387v1_alt   
|     chr22_KQ458388v1_alt    chr22_KQ759761v1_alt    chrX_KV766199v1_alt    
|     chrX_MU273395v1_alt     chrX_MU273396v1_alt     chrX_MU273397v1_alt    
| 
| Tips: call 'seqnames()' on the object to get all the sequence names, call
| 'seqinfo()' to get the full sequence info, use the '$' or '[[' operator to
| access a given sequence, see '?BSgenome' for more information.
> sessionInfo()
R version 4.5.0 (2025-04-11)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0

locale:
[1] C

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

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg38_1.4.5 BSgenome_1.76.0                  
 [3] rtracklayer_1.68.0                BiocIO_1.18.0                    
 [5] Biostrings_2.76.0                 XVector_0.48.0                   
 [7] GenomicRanges_1.60.0              GenomeInfoDb_1.44.3              
 [9] IRanges_2.42.0                    S4Vectors_0.46.0                 
[11] BiocGenerics_0.54.0               generics_0.1.4                   

loaded via a namespace (and not attached):
 [1] Matrix_1.7-3                jsonlite_2.0.0             
 [3] compiler_4.5.0              rjson_0.2.23               
 [5] crayon_1.5.3                SummarizedExperiment_1.38.1
 [7] Biobase_2.68.0              Rsamtools_2.24.1           
 [9] bitops_1.0-9                GenomicAlignments_1.44.0   
[11] parallel_4.5.0              BiocParallel_1.42.1        
[13] yaml_2.3.10                 lattice_0.22-7             
[15] R6_2.6.1                    S4Arrays_1.8.1             
[17] curl_6.2.2                  XML_3.99-0.19              
[19] DelayedArray_0.34.1         MatrixGenerics_1.20.0      
[21] GenomeInfoDbData_1.2.14     SparseArray_1.8.1          
[23] grid_4.5.0                  codetools_0.2-20           
[25] abind_1.4-8                 RCurl_1.98-1.17            
[27] restfulr_0.0.16             httr_1.4.7                 
[29] matrixStats_1.5.0           tools_4.5.0                
[31] UCSC.utils_1.4.0           
> library(BiocManager)
Bioconductor version 3.21 (BiocManager 1.30.25), R 4.5.0 (2025-04-11)
ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States

It seems fine on devel as well.

> BSgenome.Hsapiens.UCSC.hg38
| BSgenome object for Human
| - organism: Homo sapiens
| - provider: UCSC
| - genome: hg38
| - release date: 2023/01/31
| - 711 sequence(s):
|     chr1                   
|     chr2                   
|     chr3                   
|     chr4                   
|     chr5                   
|     ...                    
|     chr22_KQ759761v1_alt   
|     chrX_KV766199v1_alt    
|     chrX_MU273395v1_alt    
|     chrX_MU273396v1_alt    
|     chrX_MU273397v1_alt    
| 
| Tips: call 'seqnames()' on the
| object to get all the sequence
| names, call 'seqinfo()' to get the
| full sequence info, use the '$' or
| '[[' operator to access a given
| sequence, see '?BSgenome' for more
| information.
> sessionInfo()
R version 4.5.1 (2025-06-13 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/New_York
tzcode source: internal

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg38_1.4.5
 [2] BSgenome_1.77.2                  
 [3] rtracklayer_1.69.1               
 [4] BiocIO_1.19.0                    
 [5] Biostrings_2.77.2                
 [6] XVector_0.49.1                   
 [7] GenomicRanges_1.61.5             
 [8] GenomeInfoDb_1.45.12             
 [9] Seqinfo_0.99.2                   
[10] IRanges_2.43.5                   
[11] S4Vectors_0.47.4                 
[12] BiocGenerics_0.55.3              
[13] generics_0.1.4                   
[14] BiocManager_1.30.26

But regardless, mutSignatures is a CRAN package, not Bioconductor, so you should contact the maintainer directly, or try asking on R-help or biostars.org.

0
Entering edit mode

Thank you for your replies. I got the problem solved by installing mutSignature with this line:

 devtools::install_github("dami82/mutSignatures", force = TRUE, build_vignettes = FALSE)

Looks like there are discrepancies between the CRAN source and the GitHub source. Package installed from CRAN has the following line:

if ((! "BSgenome" %in% class(BSGenomeDb))  | 
      sum(c("pkgname", "organism") %in% methods::slotNames(BSGenomeDb)) != 2)
    stop ("Please, provide a valid 'BSgenome'-class object")

This is the cause for the problem since "organism" is not in the slotNames(BSGenomeDb) as shown by the output below:

> slotNames(BSgenome.Hsapiens.UCSC.hg38)
[1] "pkgname"            "single_sequences"   "multiple_sequences" "seqinfo"            "user_seqnames"      "injectSNPs_handler"
[7] ".seqs_cache"        ".link_counts"       "metadata"

Maybe slotNames() should not be used in checking the BSGenomeDb object in mutSignature. Any way, I' glad this issue is solved.

ADD REPLY

Login before adding your answer.

Traffic: 788 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6