This is a test version of Biostars. For the public version, visit https://www.biostars.org.
genomic location convertion between hg19 and hg38

Hi,

I need to convert hg19 coordinates to hg38 (or opposite, doesn't matter). I tried to use liftOver from uscc, but without results.

My coordinate in hg38 2:230442937-230450255

In hg19: chr2:231307651-231314970

And after conversion in liftOver the results is: chr2:231307652-231314970

Where I made a mistake? I understand that that the one base is due to the different database, but why is difference in length?

And how is the easiest way to convert this?

Best, d.

genome

1 answer

A chromosomal rearrangement could give you regions of different lengths.

One good way to run liftOver is to do it in both directions, find what maps in both directions, and use those intervals:

  1. From hg19 to hg38, taking input A and generating interval set A'

    liftOver(A) -> A`
    
  2. From set A', go back to hg19 via a second liftOver from hg38 to hg19, to get set A''

    liftOver(A`) -> A``
    
  3. Compare sets A and A'' via set operations, to determine which regions are identical in hg19 space:

    bedopsElementOfExact(A, A``) -> A```
    
  4. Run a final liftOver on A''', from hg19 to hg38:

    liftOver(A```) -> A````
    

Log in to answer this question.