[Bioc-sig-seq] countOverlaps question

Jason Lu jasonlu68 at gmail.com
Fri Dec 10 20:56:42 CET 2010


Hi,

First thank developers for building so many cool tools for HTS.
I have a question which I would like to have someone give me an hint
or two. Thanks.

Here I have ,
> countOverlaps(cds[1],aln)
2

I kind of expect the answer should be 6. Any idea?

> aln
GappedAlignments of length 6
    rname strand cigar qwidth    start      end width ngap
[1] chr19      +   33M     33 58858743 58858775    33    0
[2] chr19      -   33M     33 58858812 58858844    33    0
[3] chr19      +   33M     33 58858912 58858944    33    0
[4] chr19      -   33M     33 58858921 58858953    33    0
[5] chr19      +   33M     33 58858934 58858966    33    0
[6] chr19      +   33M     33 58858940 58858972    33    0

> cds[1]
GRangesList of length 1
$1
GRanges with 8 ranges and 2 elementMetadata values
    seqnames               ranges strand |    cds_id    cds_name
       <Rle>            <IRanges>  <Rle> | <integer> <character>
[1]    chr19 [58858388, 58858395]      - |    185127          NA
[2]    chr19 [58858719, 58859006]      - |    185128          NA
[3]    chr19 [58861736, 58862017]      - |    185129          NA
[4]    chr19 [58862757, 58863053]      - |    185130          NA
[5]    chr19 [58863649, 58863921]      - |    185131          NA
[6]    chr19 [58864294, 58864563]      - |    185132          NA
[7]    chr19 [58864658, 58864693]      - |    185133          NA
[8]    chr19 [58864770, 58864803]      - |    185134          NA


seqlengths
                  chr1                  chr2 ... chr18_gl000207_random
             249250621             243199373 ...                  4262

> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] GenomicFeatures_1.2.0 Rsamtools_1.2.1       Biostrings_2.17.48
[4] GenomicRanges_1.1.38  IRanges_1.7.40

loaded via a namespace (and not attached):
[1] Biobase_2.9.2      biomaRt_2.6.0      BSgenome_1.17.7    DBI_0.2-5
[5] RCurl_1.4-4        RSQLite_0.9-2      rtracklayer_1.10.1 tools_2.12.0
[9] XML_3.2-0

Many thanks!

Jason



More information about the Bioc-sig-sequencing mailing list