[Tutor] finding a polymer of letters in a string

Hs Hs ilhs_hs at yahoo.com
Thu Jan 19 19:44:36 CET 2012


Hi Hilton. Thanks for your suggestion. 



I saw re module. I should have explain a little bit in my message that patter of polymer is not constant. There could be variety of combinations given A, T G and C. 

it could be AAATAAA, ATATATAT, or GTAGTAGTA or GGGACCCGAAAT etc.


so I do not know what that pattern would be when I read in a string. I do not know if regex could solve my kind of problem too. 


Thanks
Hs.





________________________________
 From: Hilton Fernandes <hgfernan at gmail.com>
To: "tutor at python.org" <tutor at python.org> 
Cc: Hs Hs <ilhs_hs at yahoo.com> 
Sent: Thursday, January 19, 2012 1:39 PM
Subject: Re: [Tutor] finding a polymer of letters in a string
 

Hi ! 

Have you considered regular expressions in Python ? 

Please take a look at "Regular Expression HOWTO", at 
http://docs.python.org/howto/regex.html

All the best, 
Hilton 


On Thu, Jan 19, 2012 at 4:09 PM, Hs Hs <ilhs_hs at yahoo.com> wrote:

Hi: 
>I am writing to see if I could any help.
>I am trying to find if a mutation in gene falls in a polymer region of DNA. To explain in simplistic terms, 
>
>
>
>Given a piece of DNA string, with following characters, I know where mutation happens.  Happens at T (in quotes with spaces.) 3 As before T and 4 As after T are removed in a disease. 
>
>
>
>Given following sequence, I should be able to find if this T is in a polymer region. such as 'AAA' T 'AAAA. 
>
>
>
>AAATAGCAGAAA 'T' AAAAGAAAAGATTGGAACTAGGTCAG
>
>
>
>
>
>
>I am not sure if there are any methods in python to find these.  Do you think a script has to be written with more logic involving some known algorithms. 
>
>
>
>Please advise. 
>
>
>
>thanksHs.
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>To unsubscribe or change subscription options:
>http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
(11)8131-5213
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120119/9510cc0c/attachment.html>


More information about the Tutor mailing list