snpsBySeqname() and snpsByOverlaps() functions in BSgenome package did not work in my computer
0
1
Entering edit mode
sunyingkai • 0
@af6d9623
Last seen 14 months ago
Hong Kong

I want to get SNPs information with snpsByOverlaps() and snpsBySeqname() function, but it relied as below:

#my code
library(SNPlocs.Hsapiens.dbSNP144.GRCh38)
library(BSgenome.Hsapiens.NCBI.GRCh38)
snps <- SNPlocs.Hsapiens.dbSNP144.GRCh38

snpsBySeqname(snps,c('1','MT'))
#results
#Error in extract_rowids(x_rowids_env, rowidx) : 
#  is.integer(idx) is not TRUE

snpsByOverlaps(snps, "X:3e6-8e6", genome="GRCh38")

#snpsByOverlaps(snps, "X:3e6-8e6", genome="GRCh38")
#Error in extract_rowids(x_rowids_env, rowidx) : 
#  is.integer(idx) is not TRUE

My computer is Mac with m2 silicon and snpsById() function worked without problem.

BSgeome • 775 views
ADD COMMENT
0
Entering edit mode

I have no error running your code what is your sessionInfo() ?

ADD REPLY
0
Entering edit mode

My sessionInfo() is as below:

R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.0

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

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

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

other attached packages:
 [1] XtraSNPlocs.Hsapiens.dbSNP144.GRCh38_0.99.12 BSgenome.Hsapiens.NCBI.GRCh38_1.3.1000      
 [3] SNPlocs.Hsapiens.dbSNP144.GRCh38_0.99.20     SNPlocs.Hsapiens.dbSNP155.GRCh38_0.99.23    
 [5] BSgenome_1.66.2                              rtracklayer_1.58.0                          
 [7] Biostrings_2.66.0                            XVector_0.38.0                              
 [9] GenomicRanges_1.50.2                         GenomeInfoDb_1.34.9                         
[11] IRanges_2.32.0                               S4Vectors_0.36.1                            
[13] BiocGenerics_0.44.0                          biomaRt_2.54.0                              
[15] MRutils_0.2.0.0                              reshape2_1.4.4                              
[17] forcats_1.0.0                                stringr_1.5.0                               
[19] dplyr_1.1.0                                  purrr_1.0.1                                 
[21] readr_2.1.4                                  tidyr_1.3.0                                 
[23] tibble_3.1.8                                 ggplot2_3.4.1                               
[25] tidyverse_1.3.2                             

loaded via a namespace (and not attached):
  [1] googledrive_2.0.0           colorspace_2.1-0            rjson_0.2.21                ellipsis_0.3.2             
  [5] futile.logger_1.4.3         fs_1.6.1                    rstudioapi_0.14             bedr_1.0.7                 
  [9] bit64_4.0.5                 AnnotationDbi_1.60.0        fansi_1.0.4                 lubridate_1.9.2            
 [13] xml2_1.3.3                  codetools_0.2-19            R.methodsS3_1.8.2           cachem_1.0.6               
 [17] jsonlite_1.8.4              Rsamtools_2.14.0            broom_1.0.3                 dbplyr_2.3.0               
 [21] settings_0.2.7              png_0.1-8                   R.oo_1.25.0                 BiocManager_1.30.19        
 [25] compiler_4.2.2              httr_1.4.4                  backports_1.4.1             assertthat_0.2.1           
 [29] Matrix_1.5-3                fastmap_1.1.0               gargle_1.3.0                cli_3.6.0                  
 [33] formatR_1.14                prettyunits_1.1.1           tools_4.2.2                 gtable_0.3.1               
 [37] glue_1.6.2                  GenomeInfoDbData_1.2.9      rappdirs_0.3.3              Rcpp_1.0.10                
 [41] Biobase_2.58.0              cellranger_1.1.0            vctrs_0.5.2                 brio_1.1.3                 
 [45] rvest_1.0.3                 testthat_3.1.6              timechange_0.2.0            lifecycle_1.0.3            
 [49] restfulr_0.0.15             XML_3.99-0.13               googlesheets4_1.0.1         zlibbioc_1.44.0            
 [53] scales_1.2.1                VariantAnnotation_1.44.0    hms_1.1.2                   MatrixGenerics_1.10.0      
 [57] parallel_4.2.2              SummarizedExperiment_1.28.0 lambda.r_1.2.4              yaml_2.3.7                 
 [61] curl_5.0.0                  memoise_2.0.1               stringi_1.7.12              RSQLite_2.2.20             
 [65] BiocIO_1.8.0                gwasvcf_0.1.1               GenomicFeatures_1.50.4      filelock_1.0.2             
 [69] BiocParallel_1.32.5         rlang_1.0.6                 pkgconfig_2.0.3             matrixStats_0.63.0         
 [73] bitops_1.0-7                lattice_0.20-45             GenomicAlignments_1.34.0    bit_4.0.5                  
 [77] tidyselect_1.2.0            plyr_1.8.8                  magrittr_2.0.3              R6_2.5.1                   
 [81] generics_0.1.3              DelayedArray_0.24.0         DBI_1.1.3                   withr_2.5.0                
 [85] pillar_1.8.1                haven_2.5.1                 KEGGREST_1.38.0             RCurl_1.98-1.10            
 [89] validate_1.1.1              modelr_0.1.10               crayon_1.5.2                futile.options_1.0.1       
 [93] utf8_1.2.3                  BiocFileCache_2.6.0         tzdb_0.3.0                  progress_1.2.2             
 [97] grid_4.2.2                  readxl_1.4.2                data.table_1.14.6           blob_1.2.3                 
[101] reprex_2.0.2                digest_0.6.31               VennDiagram_1.7.3           R.utils_2.12.2             
[105] munsell_0.5.0
ADD REPLY

Login before adding your answer.

Traffic: 439 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