<div dir="ltr"><div>ciao <span class="gmail-HOEnZb"><font color="#888888">Christian,<br></font></span></div><span class="gmail-HOEnZb"><font color="#888888">che dire... spettacolare!!!!;<br></font></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 26, 2017 at 11:25 AM, Christian Barra <span dir="ltr"><<a href="mailto:barrachri@gmail.com" target="_blank">barrachri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">In pseudo code<div><br></div><div><div>seq = "<wbr>ACTGATCGATTACGTATAGTAGAATTCTAT<wbr>CATACATATATATCGATGCGTTCAT"</div><div> ...:</div><div> ...: def finder(seq, target):</div><div> ...: len_target = len(target)</div><div> ...: i = 0</div><div> ...: while i+len_target < len(seq):</div><div> ...: yield seq[i:i+len_target], i</div><div> ...: i += 1</div></div><div><span class="m_5576092878317877844Apple-tab-span" style="white-space:pre-wrap"> </span></div><div>Il check per == lo puoi inserire all’interno del finder o fuori.<span class="m_5576092878317877844Apple-tab-span" style="white-space:pre-wrap"> </span></div><div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="word-wrap:break-word">——</div><span class="HOEnZb"><font color="#888888"><div style="word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Christian Barra</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Python Freelancer // Consultant // Trainer<br>Board member of the EuroPython Society</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://www.chrisbarra.xyz" target="_blank">www.chrisbarra.xyz</a></div></div></font></span></div></div></div></div></div></div></div></div></div></div>
</div><div><div class="h5">
<br><div><blockquote type="cite"><div>On 26 Nov 2017, at 10:42, Giuseppe Costanzi <<a href="mailto:giuseppecostanzi@gmail.com" target="_blank">giuseppecostanzi@gmail.com</a>> wrote:</div><br class="m_5576092878317877844Apple-interchange-newline"><div><div>ciao carlo,<br><br>si, interessante ma vorrei iterare la sequenza mano a mano,<br><br>stavo pensando a qualcosa tipo<br><br>next(iterator, default)<br><br>grazie comunque<br><br><br><br>On Sun, Nov 26, 2017 at 10:30 AM, Carlo Miron <<a href="mailto:miron@python.it" target="_blank">miron@python.it</a>> wrote:<br><blockquote type="cite">On Sun, Nov 26, 2017 at 10:20 AM, Giuseppe Costanzi<br><<a href="mailto:giuseppecostanzi@gmail.com" target="_blank">giuseppecostanzi@gmail.com</a>> wrote:<br><br><blockquote type="cite">ho una sequenza del tipo<br>ACTGATCGATTACGTATAGTAGAATTCTAT<wbr>CATACATATATATCGATGCGTTCAT<br>scorrendola devo trovare una sequenza target GAATTC<br>ACTGATCGATTACGTATAGTA "GAATTC" TATCATACATATATATCGATGCGTTCAT<br>quindi dividere la sequenza da G, la prima lettera della sequenza target,<br>e calcolarmi la lunghezza dei due frammenti risultanti<br>ACTGATCGATTACGTATAGTAG<br>e di questa<br>GAATTCTATCATACATATATATCGATGCGT<wbr>TCAT<br></blockquote><br>qualcosa tipo<br><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">seq = "<wbr>ACTGATCGATTACGTATAGTAGAATTCTAT<wbr>CATACATATATATCGATGCGTTCAT"<br>target = "GAATTCT"<br>first, second = seq.split(target, 1)<br>first += target[1]<br>second = target[1:] + second<br>len(first), len(second)<br></blockquote></blockquote></blockquote>(22, 33)<br><br>?<br>㎝<br><br>--<br>|:**THE 🍺-WARE LICENSE** *(Revision ㊷)*:<br>| <<a href="mailto:miron@xn--4n8h.it" target="_blank">miron@🐍.it</a>> wrote this mail. As long as you retain this<br>| notice you can do whatever you want with this stuff.<br>| If we meet some day, and you think this stuff is worth it,<br>| you can buy me a 🍺 in return. —㎝<br>______________________________<wbr>_________________<br>Python mailing list<br><a href="mailto:Python@lists.python.it" target="_blank">Python@lists.python.it</a><br><a href="https://lists.python.it/mailman/listinfo/python" target="_blank">https://lists.python.it/<wbr>mailman/listinfo/python</a><br></blockquote>______________________________<wbr>_________________<br>Python mailing list<br><a href="mailto:Python@lists.python.it" target="_blank">Python@lists.python.it</a><br><a href="https://lists.python.it/mailman/listinfo/python" target="_blank">https://lists.python.it/<wbr>mailman/listinfo/python</a><br></div></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>_________________<br>
Python mailing list<br>
<a href="mailto:Python@lists.python.it">Python@lists.python.it</a><br>
<a href="https://lists.python.it/mailman/listinfo/python" rel="noreferrer" target="_blank">https://lists.python.it/<wbr>mailman/listinfo/python</a><br>
<br></blockquote></div><br></div>