<div dir="ltr">Projecting/mapping locations and variants between genome, transcript, and protein coordinates is conceptually easy and practically straightforward in most cases. Unfortunately, there are diabolical real-world challenges. Here are a few off the cuff, roughly in decreasing order of difficulty:<div><br></div><div>* Source of alignments. Projecting between genome and transcript coordinates requires alignments. For the last ~2 years, NCBI has released alignments (as gff files) for *current* transcripts to *current* assemblies. That works great for what it is, but you're stuck if you need historical data (e.g., a variant from an old paper).</div><div><br></div><div>* Genome-transcript discrepancies. Genome and transcript sequences are from different sources. Their alignments are littered with natural polymorphisms as well as sequencing errors (typically genomic). As a result, accurate projections in these regions requires being aware of indels.</div><div><br></div><div>* Mutable alignments. Surprisingly, the alignments of a transcript and genome is not necessarily stable at NCBI. Changes happen very rarely, but it's worth knowing that these do change and nothing about the process prevents such degeneracy. This mutability has terrible (hypothetical) consequences for reliably communicating variation and interpreting consequences (like coding v. non-coding). A related issue is that UCSC uses blat to generate alignments, which sometimes differs significantly from the splign alignments. (<a href="https://www.slideshare.net/reecehart/hvp-2014-clinical-significance-of-transcript-alignment-discrepancies" target="_blank">2014 presentation on slideshare</a>)</div><div><br></div><div>* Alignment representation. This is an extreme corner case that results from regions of misassembly. For nearly all exons in all transcripts, it's a terrific and convenient assumption that alignments are exon-wise with exon-wise cigar strings. For a small number of transcripts (see <a href="https://github.com/biocommons/uta/issues/198#issuecomment-273269902">biocommons/uta#198</a>), the alignments are discontiguous, with unaligned regions possible in transcript or genome sequence. While CIGARs have an N (typically for introns), there's no symmetric operator for unaligned sequence in transcripts, which makes it difficult to represent such regions. </div><div><br></div><div>The last case is definitely in the weeds, but exemplifies what you find when trying to do this at genome scales.<br></div><div><br></div><div>-Reece</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 28, 2017 at 6:42 AM, Peter Cock <span dir="ltr"><<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Lenna,<br>
<br>
Thank you!<br>
<br>
Sorry for the delay - the CodeFest and BOSC plus ISMB/ECCB<br>
was a fun but busy trip.<br>
<br>
I know a fair amount about sequence coordinates, but have<br>
rarely needed to map between protein or gene coordinates<br>
and genomic coordinates. I would suggest waiting for user<br>
feedback to identify any missing functionality.<br>
<br>
We can include the new code with an experimental warning<br>
if you feel there is a high chance of the API needing changes?<br>
<br>
Regards,<br>
<br>
Peter<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Jul 20, 2017 at 1:13 PM, Lenna Peterson<br>
<<a href="mailto:lenna.peterson@gmail.com">lenna.peterson@gmail.com</a>> wrote:<br>
> I am willing (and available, now that I've finished my PhD!) to work on<br>
> getting the code into the main branch. The main barrier is that I am not<br>
> familiar with the finer details of sequence coordinates, so I would benefit<br>
> from guidance from a sequence expert for adding missing functionality.<br>
><br>
> Lenna<br>
</div></div></blockquote></div><br></div>