pattern combinations

2007-09-17 Thread dorje tarap
Hi all, Given some patterns such as "...t...s." I need to make all possible combinations given a separate list for each position. The length of the pattern is fixed to 9, so thankfully that reduces a bit of the complexity. For example I have the following: pos1 = ['a',' t'] pos2 = ['r', 's'] pos

regular expression dictionary search

2007-08-20 Thread dorje tarap
Hi I have a dictionary with a list of patterns: Code: ( text ) 1. >>> words = {'sho.':6, '.ilk':8,'.an.':78 } Where the "." character means any pattern - this can easily be changed to the "*" symbol if need be. When the user submits a word, I want to be able to look for a corresponding pat

creating weblogo-like .png output

2007-08-18 Thread dorje tarap
Hi, For the new program I am creating I want to display some data in a format similar to weblogo. Basically I want to create .png output of a table I have that shows percentage of DNA. There is a python implementation for this, but I can only

sort dictionary by specific values

2007-08-18 Thread dorje tarap
Hi, I need to perform some horrible functions in python I need to do, using sort in a similar way that Excel can. With a dictionary like: Code: ( text ) 1. >>> d 2. {8: (99, 99), 9: [(55, 67), (77, 66), (67, 88)], 4: [(45, 78), (56, 78), (99, 78)], 5: (67, 77)} I want to sort the ent