Dear All!
I'm also reporting some strange errors in getSeq and extractTranscriptSeqs (GenomicFeatures) packages resulting in the error message:
Error in NSBS(i, x, exact = exact, upperBoundIsStrict = !allow.append) :
subscript contains NAs or out-of-bounds indices
This question might be related to Error with DNAStringSet and definitely is to BSGenome::getSeq gives error: Error in NSBS(i, x, exact = exact, upperBoundIsStrict = !allow.append)
This can be reproduced with the example code from the extractTranscriptSeqs help page:
library(GenomicFeatures) ## Load a genome: library(BSgenome.Hsapiens.UCSC.hg19) genome <- BSgenome.Hsapiens.UCSC.hg19 ## Load a TxDb object: txdb_file <- system.file("extdata", "hg19_knownGene_sample.sqlite", package="GenomicFeatures") txdb <- loadDb(txdb_file) ## Check that 'txdb' is based on the hg19 assembly: txdb ## Extract the exon ranges grouped by transcript from 'txdb': transcripts <- exonsBy(txdb, by="tx", use.names=TRUE) ## Extract the transcript sequences from the genome: tx_seqs <- extractTranscriptSeqs(genome, transcripts) Error in NSBS(i, x, exact = exact, upperBoundIsStrict = !allow.append) : subscript contains NAs or out-of-bounds indices
I believe this has to do something with a recent update of some packages, most likely one of XVector
, IRanges
or Biostrings
. I did an update of release packages today (although I can not remember which ones were updated) and since then I'm having these problems.
cheers, jo
My session info:
> sessionInfo() R version 3.2.2 (2015-08-14) Platform: x86_64-apple-darwin15.0.0/x86_64 (64-bit) Running under: OS X 10.11.2 (El Capitan) 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 parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] GenomicFeatures_1.22.4 AnnotationDbi_1.32.0 [3] Biobase_2.30.0 BSgenome.Hsapiens.UCSC.hg19_1.4.0 [5] BSgenome_1.38.0 rtracklayer_1.30.1 [7] Biostrings_2.38.1 XVector_0.10.0 [9] GenomicRanges_1.22.1 GenomeInfoDb_1.6.1 [11] IRanges_2.4.2 S4Vectors_0.8.3 [13] BiocGenerics_0.16.1 loaded via a namespace (and not attached): [1] zlibbioc_1.16.0 GenomicAlignments_1.6.1 [3] BiocParallel_1.4.0 tools_3.2.2 [5] SummarizedExperiment_1.0.1 DBI_0.3.1 [7] lambda.r_1.1.7 futile.logger_1.4.1 [9] futile.options_1.0.0 bitops_1.0-6 [11] biomaRt_2.26.0 RCurl_1.95-4.7 [13] RSQLite_1.0.0 Rsamtools_1.22.0 [15] XML_3.98-1.3