[Biopython-dev] 3/23 active questions tagged biopython - Stack Overflow

Feed My Inbox updates at feedmyinbox.com
Wed Mar 23 08:06:27 UTC 2011


// marking up mutation positions in a sequence with html in python
// March 22, 2011 at 7:03 AM

http://stackoverflow.com/questions/5390170/marking-up-mutation-positions-in-a-sequence-with-html-in-python
Hello,

I was wondering if there are any methods in python or biopython that allows one to markup a sequence in html.

I would like to mark positions on a sequence (ie colour bases differently) according to if that position is a known snp/indel etc 

Having a list of mutation positions in an array (read from a database) eg

mutation_position = [10,20,30,40]

I can change case for the affected base using something like:
seq = seq[0:b] + mutation_positions[b].lower() + seq[(b+1):len(seq)]

But is it possible to add some html code eg add the tag pos for each of the mutation positions. (when the html markup is added to the sequence, the length of the sequence is altered and so the mutation positions don't match to the newly marked up sequence during each iteration of the loop!)

I hope this makes sense!

Thanks.


--
Website: http://stackoverflow.com/questions/tagged/?tagnames=biopython&sort=active

Account Login: 
https://www.feedmyinbox.com/members/login/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

Unsubscribe here: 
http://www.feedmyinbox.com/feeds/unsubscribe/630208/9a33fac9c8e89861715f609a2333362c8425e495/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

--
This email was carefully delivered by FeedMyInbox.com. 
PO Box 682532 Franklin, TN 37068




More information about the Biopython-dev mailing list