This is a test version of Biostars. For the public version, visit https://www.biostars.org.
CDS coordinates to hg19 positions

Hello,

By some ill fortune, I was given some CDS coordinates of a gene, say FOO c.1234. Is there a robust way to convert this into hg19 coordinates?

  1. Yes, they didn't even mention what transcript they were using. But I can guess.
  2. I know I can use Ensemble REST API to convert CDS coordinates into hg38 positions, and then liftover to hg19. But my gut feeling is there must be something better than this approach.

Any suggestion is much appreciated!

Jing

r assembly

1 answer

> library(Homo.sapiens) # from BioConductor
> cds(TxDb.Hsapiens.UCSC.hg19.knownGene, columns=c('CDSID', 'GENEID'))
GRanges object with 237533 ranges and 2 metadata columns:
                 seqnames           ranges strand   |     CDSID              GENEID
                    <Rle>        <IRanges>  <Rle>   | <integer>     <CharacterList>
       [1]           chr1 [ 12190,  12227]      +   |         1           100287102
       [2]           chr1 [ 12595,  12721]      +   |         2           100287102
       [3]           chr1 [ 13403,  13639]      +   |         3           100287102
       [4]           chr1 [ 69091,  70008]      +   |         4               79501
       [5]           chr1 [324343, 324345]      +   |         5 100133331,100132062
       ...            ...              ...    ... ...       ...                 ...
  [237529] chrUn_gl000228   [30530, 31035]      -   |    237529           100288255
  [237530] chrUn_gl000228   [31353, 31430]      -   |    237530           100288255
  [237531] chrUn_gl000228   [31660, 31734]      -   |    237531           100288255
  [237532] chrUn_gl000228   [31660, 31737]      -   |    237532           100288255
  [237533] chrUn_gl000228   [31996, 32173]      -   |    237533           100288255
  -------
  seqinfo: 93 sequences (1 circular) from hg19 genome

You can then use subsetByOverlaps or other GRanges functions to intersect it with your data.

Log in to answer this question.