[BioC] Adding names to a IRanges object

Daniel Brewer daniel.brewer at icr.ac.uk
Fri Jan 23 11:30:55 CET 2009


Hello,

Is there any way to add rownames to an IRanges object?  What I am trying
to do is try and make it easy to reference back to the original table
that created the IRanges object after an overlap.

Hs1plus <- with(HsapiensAnnot[HsapiensAnnot$seqname == "1" &
HsapiensAnnot$strand == "+",], IRanges(start, end))

yoda1plus <- with(yip[yip$seqname == "chr1" & yip$strand == "+",],
IRanges(start, end))
yoda1plus <- yoda1plus[order(start(yoda1plus)),]

seqoverlap <- overlap(Hs1plus,yoda1plus,multiple=F)

At the moment to get information about the overlaps I have to do
something like:
HsapiensAnnot[HsapiensAnnot$start == start(Hs1plus[seqoverlap[1],]) &
HsapiensAnnot$seqname=="1",]

but I am sure that there is a better way and this can't deal with the
NAs that might be in seqoverlap

Thanks

Dan
-- 
**************************************************************
Daniel Brewer, Ph.D.

Institute of Cancer Research
Molecular Carcinogenesis
Email: daniel.brewer at icr.ac.uk
**************************************************************

The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the a...{{dropped:2}}



More information about the Bioconductor mailing list