Error in getOneSeqFromBSgenomeMultipleSequences During singeR tutorial
0
0
Entering edit mode
dfcarril • 0
@dfcarril-21162
Last seen 5.4 years ago

I'm running a VCF file through singeR in order to get a mutation matrix; however, I keep getting this error. What could be causing it and how can I fix it, in layman's terms? Thank you!

Tutorial: https://bioconductor.org/packages/release/bioc/vignettes/signeR/inst/doc/signeR-vignette.html

Context: https://ibb.co/WBDmKw7

Error output, picture: https://ibb.co/4Jw79hT

Error output, no picture:

mut <- genCountMatrixFromVcf(BSgenome.Hsapiens.UCSC.hg19, vcfobj) Error in .getOneSeqFromBSgenomeMultipleSequences(x, name, start, NA, width, : sequence 1 not found In addition: Warning message: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.)

error • 4.7k views
ADD COMMENT
0
Entering edit mode

Not a good idea to send links to images to show the code you ran. We cannot copy/paste code from images.

Please include a self-contained reproducible example in the body of your post, in text form, so we can copy/paste it.

Also please provide your sessionInfo() as instructed in our posting guide.

Thanks!

ADD REPLY
0
Entering edit mode

What do you mean by "self-contained reproducible example"? Can you give an example of an example that might help you? I'm just confused as to what information might help you and what data types you need

ADD REPLY
0
Entering edit mode

Here is my system info: https://ibb.co/zJfvLmz

ADD REPLY
0
Entering edit mode

You ran some code and you got an error. The people on this support site who want to help you need to be able to run that code, or a simplified version of it, on their own machine, so they can reproduce the error you got. A "self-contained reproducible example" is just that: a few lines of code that you provide and that we can run. Right now we can't because the code you showed in the image is not self-contained i.e. it uses things that we don't have access to (the VCF file).

I suspect that the error you got is because your VCF file is incompatible with the BSgenome package that you use (BSgenome.Hsapiens.UCSC.hg19). In particular it looks like the chromosomes in your VCF file have names that don't match the names of the chromosomes in hg19. So you need to figure out what assembly your VCF file is based on and make sure that you use the BSgenome package that matches this assembly.

Also please provide the full output of your sessionInfo(). What you provided in the image is truncated e.g. the first lines showing the version of R and the platform that you are on are missing.

Finally please avoid putting code and code output in images. The information contained in these images is not searchable. Instead include code and code output in the body of your post. Thanks!

ADD REPLY
0
Entering edit mode

Okay, great! Thanks for the clarification. Here is the code I'm running from the tutorial above:

library(VariantAnnotation)

library(BSgenome.Hsapiens.UCSC.hg19)

vcfobj <- readVcf("/path/to/a/file.vcf", "hg19")
mut <- genCountMatrixFromVcf(BSgenome.Hsapiens.UCSC.hg19, vcfobj)

Here is my full systemInfo():

    > sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

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

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg19_1.4.0 BSgenome_1.52.0                  
 [3] rtracklayer_1.44.0                BiocManager_1.30.4               
 [5] signeR_1.10.0                     NMF_0.21.0                       
 [7] cluster_2.0.8                     rngtools_1.3.1.1                 
 [9] pkgmaker_0.27                     registry_0.5-1                   
[11] VariantAnnotation_1.30.1          Rsamtools_2.0.0                  
[13] Biostrings_2.52.0                 XVector_0.24.0                   
[15] SummarizedExperiment_1.14.0       DelayedArray_0.10.0              
[17] BiocParallel_1.17.18              matrixStats_0.54.0               
[19] Biobase_2.44.0                    GenomicRanges_1.36.0             
[21] GenomeInfoDb_1.20.0               IRanges_2.18.1                   
[23] S4Vectors_0.22.0                  BiocGenerics_0.30.0              

loaded via a namespace (and not attached):
 [1] httr_1.4.0               bit64_0.9-7              foreach_1.4.4           
 [4] assertthat_0.2.1         blob_1.1.1               GenomeInfoDbData_1.2.1  
 [7] progress_1.2.2           pillar_1.4.1             RSQLite_2.1.1           
[10] lattice_0.20-38          digest_0.6.19            RColorBrewer_1.1-2      
[13] colorspace_1.4-1         Matrix_1.2-17            plyr_1.8.4              
[16] XML_3.98-1.20            pkgconfig_2.0.2          bibtex_0.4.2            
[19] biomaRt_2.40.0           zlibbioc_1.30.0          xtable_1.8-4            
[22] scales_1.0.0             tibble_2.1.3             ggplot2_3.2.0           
[25] withr_2.1.2              GenomicFeatures_1.36.3   lazyeval_0.2.2          
[28] magrittr_1.5             crayon_1.3.4             memoise_1.1.0           
[31] doParallel_1.0.14        class_7.3-15             PMCMR_4.3               
[34] tools_3.6.0              prettyunits_1.0.2        hms_0.4.2               
[37] gridBase_0.4-7           stringr_1.4.0            munsell_0.5.0           
[40] AnnotationDbi_1.46.0     compiler_3.6.0           rlang_0.4.0             
[43] grid_3.6.0               RCurl_1.95-4.12          nloptr_1.2.1            
[46] iterators_1.0.10         rstudioapi_0.10          bitops_1.0-6            
[49] gtable_0.3.0             codetools_0.2-16         DBI_1.0.0               
[52] reshape2_1.4.3           R6_2.4.0                 GenomicAlignments_1.20.1
[55] bit_1.1-14               stringi_1.4.3            Rcpp_1.0.1

Here is the error:

Error in .getOneSeqFromBSgenomeMultipleSequences(x, name, start, NA, width,  : 
  sequence 1 not found
In addition: Warning message:
In .Seqinfo.mergexy(x, y) :
  The 2 combined objects have no sequence levels in common. (Use
  suppressWarnings() to suppress this warning.)

Is that enough information? Thanks for your help!

ADD REPLY
0
Entering edit mode

No it's not. As I said earlier, we don't have access to your VCF file so we can't run the code you provided. If you can't provide code that we can run, you'll need to troubleshoot on your side. I gave you some hints in my previous comment on where to start looking (incompatibility between your VCF file and the BSgenome package you use). Did you look at that? What did you find?

H.

ADD REPLY

Login before adding your answer.

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