<div>Greetings-</div><div><br></div><div>I am having a lot difficulty figuring out how to use Ensembl to map between chromosomal, contig, transcript, and protein coordinates.</div><div><br></div><div>The first step on the journey is to map HGVS transcript variations to chromosomal coordinates. I'm using rs74423290 (ENST00000309983.4:c.500C>G) as a test. The Ensembl and NCBI web sites show this SNP at 6:18134115. When I use TranscriptMapper's cdna2genomic(), I get 18134114 (i.e., off by one). Ensembl is 1-based everywhere else and I've not had other off-by-one errors, so just making it all go away by adding one is disconcerting.</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>The core of the code is</div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div>my $id = 'ENST00000309983';</div><div>my $cds_pos = 500; </div><div>my ($tx) = $ens{ta}->fetch_by_stable_id($id);</div></div><div><div>my ($gstart) = $tx->cdna2genomic(</div><div>   $cds_pos + $tx->cdna_coding_start,</div>
</div><div>   $cds_pos + $tx->cdna_coding_start);</div></blockquote><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div>The full code is at <a href="http://pastebin.com/a8uwL3eB">http://pastebin.com/a8uwL3eB</a> .</div>
</div></div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div>So, the question: why am I off by one?</div></div></div><div><br></div><div>Thanks,</div><div>Reece</div>