[Bioc-sig-seq] liftOver problem (missing ranges method for Chain ?)
Boris Lenhard
boris.lenhard at bio.uib.no
Sat Jan 22 04:42:00 CET 2011
Hi, I am trying to do a simple thing with liftOver:
> ucsc.con <- browserSession("UCSC")
> genome(ucsc.con) <- "hg19"
> query <- ucscTableQuery(ucsc.con, "cpgIslandExt")
> cpg.hg19.gr<- track(query, asRangedData=F)
> hg19ToMm9.chain <- import.chain(file.path(SOURCE.DATA.ROOT.DIR,
+ "hg19ToMm9.over.chain"))
> cpg.mm9FromHg19.gr <- liftOver(cpg.hg19.gr, hg19ToMm9.chain)
Error in findOverlaps(ranges, ranges(chain)) :
error in evaluating the argument 'query' in selecting a method for function 'findOverlaps'
> traceback()
8: findOverlaps(ranges, ranges(chain))
7: function (ranges, chain)
{
ol <- findOverlaps(ranges, ranges(chain))
shits <- subjectHits(ol)
ranges <- ranges(ol, ranges, ranges(chain))
starts <- ifelse(reversed(chain)[shits], start(reflect(ranges,
ranges(chain)[shits])), start(ranges))
ranges <- IRanges(starts, width = width(ranges))
offsets <- offset(chain)[shits]
spaces <- space(chain)[shits]
GRanges(spaces, IRanges(start(ranges) - offsets, end(ranges) -
offsets))
}(dots[[1L]][[1L]], dots[[2L]][[1L]])
6: .Call("do_mapply", FUN, dots, MoreArgs, environment(), PACKAGE = "base")
5: mapply(liftOverSpace, x, chain)
4: do.call(c, mapply(liftOverSpace, x, chain))
3: .local(x, chain, ...)
2: liftOver(cpg.hg19.gr, hg19ToMm9.chain)
1: liftOver(cpg.hg19.gr, hg19ToMm9.chain)
Then I tried simple
> ranges(hg19ToMm9.chain)
Error in function (classes, fdef, mtable) :
unable to find an inherited method for function "ranges", for signature "Chain"
and indeed, there does not seem to be a "ranges" method for Chain, not even in the development version of the rtracklayer package. Since the documentation for liftOver says
-----
x: The intervals to lift-over, usually a ‘GRanges’.
chain: A ‘Chain’ object, usually imported with ‘import.chain’.
-----
and both objects that I am passing to it seem fine, is there anything I am missing?
Thanks,
Boris
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] beanplot_1.1 GenomicFeatures_1.2.3 GenomicRanges_1.2.3 IRanges_1.8.8 rtracklayer_1.10.6
[6] RCurl_1.4-3 bitops_1.0-4.1
loaded via a namespace (and not attached):
[1] Biobase_2.10.0 biomaRt_2.6.0 Biostrings_2.18.2 BSgenome_1.18.2 DBI_0.2-5 RSQLite_0.9-4 tools_2.12.1
[8] XML_3.2-0
More information about the Bioc-sig-sequencing
mailing list