Question: rtracklayer::lifOver one-to-many regions and not match UCSC
gravatar for m.guelfi
7 months ago by
m.guelfi0 wrote:

Dear All,

I'm using the liftOver function to lift a genomic region (chr2:243181072-243181572) from hg19 to hg38. I have downloaded the file chain from here: and the commands I'm using are the following: 

chain = import.chain("hg19ToHg38.over.chain")

liftOver(GRanges("chr2" , IRanges(243181072,243181572)), chain )

And this is the outcome:

> chain = import.chain("hg19ToHg38.over.chain")

Found more than one class "file" in cache; using the first, from namespace 'BiocGenerics'

Also defined by ‘filehash’

> liftOver(GRanges("chr2" , IRanges(243181072,243181572)), chain )

GRangesList object of length 1:


GRanges object with 7 ranges and 0 metadata columns:

      seqnames         ranges strand

         <Rle>      <IRanges>  <Rle>

  [1]     chr1 [96548, 96552]      *

  [2]     chr1 [96554, 96625]      *

  [3]     chr1 [96627, 96848]      *

  [4]     chr1 [96850, 96893]      *

  [5]     chr1 [96895, 96944]      *

  [6]     chr1 [96946, 96991]      *

  [7]     chr1 [96993, 97048]      *

seqinfo: 1 sequence from an unspecified genome; no seqlengths


My region gets lifted to version hg38 but divided in smaller non-overlapping regions. However, if I use the UCSC liftover web tool the region gets lifted to one single region; chr1:96548-97048. The boundaries of the first region and the last region correspond to the outcome using the liftOver function, so I wonder why my region gets divided in smaller pieces? Is there something I'm missing here?



Seb  Guelfi








ADD COMMENTlink modified 7 months ago by Michael Lawrence9.9k • written 7 months ago by m.guelfi0
gravatar for Michael Lawrence
7 months ago by
United States
Michael Lawrence9.9k wrote:

The inconsistency is probably due to the UCSC lift over "smoothing over" the gaps in the alignment. rtracklayer takes a more literal interpretation of the chain file. Does this cause a problem for your use case? If a good case is made, I could add an option for the smoothing to rtracklayer. It would have to be a pretty good case though.

ADD COMMENTlink written 7 months ago by Michael Lawrence9.9k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 272 users visited in the last hour