Entering edit mode
I want to retrieve genomic sequences strand specifically from hg19.
The coordinates are in a data frame, I make GRanges object out of it
and try to use getSeq. getSeq gives me the error message below.
What's wrong? Any alternative way? Many thanks!
Csaba
> df <- data.frame(chr="chr1", start=11:13, end=12:14, + strand=c("+","-","+"), score=1:3) > > gr <- makeGRangesFromDataFrame(df) > gr GRanges with 3 ranges and 0 metadata columns: seqnames ranges strand <Rle> <IRanges> <Rle> [1] chr1 [11, 12] + [2] chr1 [12, 13] - [3] chr1 [13, 14] + --- seqlengths: chr1 NA > getSeq(Hsapiens, gr) Error in rep.int(DNAStringSet(""), length(sseq_idx)) : error in evaluating the argument 'x' in selecting a method for function 'rep.int': Error in .Call2("new_XString_from_CHARACTER", classname, x, start(solved_SEW), : function '_alloc_XRaw' not provided by package 'IRanges' R version 3.1.1 (2014-07-10) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats graphics grDevices utils datasets methods base other attached packages: [1] BSgenome.Hsapiens.UCSC.hg19_1.3.19 BSgenome_1.28.0 lattice_0.20-29 [4] Biostrings_2.28.0 GenomicRanges_1.16.4 GenomeInfoDb_1.0.2 [7] IRanges_1.22.10 BiocGenerics_0.10.0 loaded via a namespace (and not attached): [1] bitops_1.0-6 grid_3.1.1 stats4_3.1.1 tools_3.1.1 XVector_0.4.0 zlibbioc_1.6.0