<div dir="ltr"><div>The hgvs package does some of what you seek for sequence variants written using HGVS nomenclature standards. In this context, perhaps the most important feature to point out is that it correctly handles cases where the genome-transcript alignment contains indels.</div><div><br></div><div>See <a href="https://github.com/biocommons/hgvs" target="_blank">https://github.com/biocomm<wbr>ons/hgvs</a> for features, installation, and examples, and <a href="http://hgvs.readthedocs.io/en/latest/" target="_blank">http://hgvs.readthedocs.io<wbr>/en/latest/</a> for extended documentation.<br></div><div><br></div><div>If hgvs doesn't do what you want, you may want to at least use the exon-wise alignments in UTA. All coordinates are from the source databases (NCBI, UCSC, Ensembl); the alignment here is only a n-w alignment of the exons to generate a cigar string. <a href="https://github.com/biocommons/uta">https://github.com/biocommons/uta</a>, and publicly visible at <a href="http://uta.biocommons.org:5432">uta.biocommons.org:5432</a> (postgresql).</div><div><br></div><div>-Reece</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 5, 2017 at 3:04 AM, Michiel de Hoon <span dir="ltr"><<a href="mailto:mjldehoon@yahoo.com" target="_blank">mjldehoon@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-size:10px"><div id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10166">Dear all,</div><div id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_9990"><br></div><div id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_9991">Does anybody have some code to convert transcript coordinates to genome coordinates?<br>I have the position of a nucleotide along a transcript, and the genome coordinates of the start and end of each exon in the transcript, and I would like to find the position of the nucleotide in genome coordinates.</div><div id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10091">Ideally, I am looking for some code that can find the genome coordinates of a sequence of nucleotides.</div><div id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10145">For example, if these are the exons:</div><div id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10146">exon1  10000 10030</div><div dir="ltr" id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10101">exon2  10050 10080</div><div dir="ltr" id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10147">and a nucleotide sequence starting at position 20 and ending at position 50 in transcript coordinates,<br></div><div dir="ltr" id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10148">then I am looking for the genome coordinates (10020,10030), (10050,10070).</div><div dir="ltr" id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10157"><br></div><div dir="ltr" id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10158">Thanks,</div><div dir="ltr" id="gmail-m_-7048163304394428346m_6248146552299267599m_-7434919385654407475yui_3_16_0_ym19_1_1499248527573_10198">-Michiel<br></div></div></div><br>______________________________<wbr>_________________<br>
Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/ma<wbr>ilman/listinfo/biopython</a><br></blockquote></div><br></div></div>