[BioC] findOverlaps with strand info

Chris Stubben stubben at lanl.gov
Thu Feb 2 23:12:34 CET 2012


Does anyone know how to add strands and number of overlapping bases to 
the findOverlaps output?  For example, given these locations

x <- GRanges( "chr",
  IRanges( c(3,11,17,25,28), c(9,18,24,31,35)) ,
 c("-", "+", "+","-","+" ))

and the findOverlaps output...

y<- as.matrix(findOverlaps(ranges(x), ignoreSelf=TRUE, 
ignoreRedundant=TRUE))
y
     query subject
[1,]     2       3
[2,]     4       5

I'd like to add the query and subject strands and number of overlapping 
bases

query subject strands overlap
     2          3     ++       2
     4          5     -+       4


Thanks,
Chris Stubben



-- 
Los Alamos National Lab
BioScience Division
MS M888
Los Alamos, NM 87545



More information about the Bioconductor mailing list