[Bioc-sig-seq] mapply with GRangesList

Dario Strbenac D.Strbenac at garvan.org.au
Thu Mar 24 01:00:02 CET 2011


mapply doesn't iterate over the GRangesList in an example I have that also uses other types of variables. Would it be possible for it to be more flexible in this usage ?

Simple example:

gr1 <- GRanges("chr1", IRanges(seq(100, 600, 100), width = 100))
gr2 <- GRanges("chr2", IRanges(seq(1000, 1600, 100), width = 100))
grl <- GRangesList(gr1, gr2)

IRanges::mapply(function(x, y)
{
    print(x)
    print(y)
}, grl, 1:2, SIMPLIFY = FALSE)

Result: It keeps using element 1 of grl.

--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia



More information about the Bioc-sig-sequencing mailing list