Changeset 289
- Timestamp:
- 01/31/08 18:43:05 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cartwheel-server/website/canal/motif/__init__.py
r288 r289 10 10 from canal.motif import utils 11 11 from canal.motif.analyze import AnalyzeSequenceHandler 12 from canal.motif.score_sites import ScoreSitesHandler 12 13 13 14 from pages import _q_index, set_DNA_bias … … 25 26 from cartwheel.website.RawPWMMotif import RawPWMMotif 26 27 27 _q_exports = ['delete', 'edit', 'go_analyze', ' set_DNA_bias',28 _q_exports = ['delete', 'edit', 'go_analyze', 'go_score', 'set_DNA_bias', 28 29 'add_iupac_motif', 29 30 'build_pwm_from_list', … … 68 69 return request.redirect('./analyze%s' % (seq_id,)) 69 70 71 def go_score(request): 72 """ 73 Redirect to the sequence analysis handler. 74 """ 75 motif_id = request.form['motif'] 76 return request.redirect('./score%s' % (motif_id,)) 77 70 78 def _q_lookup(request, component): 71 79 if component.startswith('analyze'): … … 76 84 77 85 return AnalyzeSequenceHandler(sequence) 86 87 elif component.startswith('score'): 88 motif_id = int(component[len('score'):]) 89 90 m = cartwheel.website.get_object_manager() 91 motif = m.load(motif_id) 92 93 return ScoreSitesHandler(motif) 78 94 79 95 #### trunk/cartwheel-server/website/canal/motif/pages.ptl
r288 r289 86 86 (To analyze a sequence with motifs, you must first <a href='../sequences/'>enter some sequences</a>) 87 87 """ 88 88 89 matrix_motifs = [ m for m in motifs if hasattr(m, 'make_pwm') ] 90 91 if matrix_motifs: 92 """ 93 <form method="POST" action="go_score"> 94 <b>Score sites with a matrix motif:</b> <select name='motif'> 95 """ 96 97 for m in matrix_motifs: 98 """ 99 <option value='%d'> %s 100 """ % (m.id, m.name,) 101 102 """ 103 </select> 104 <input type='submit' value='score sites'> 105 </form> 106 """ 107 89 108 """ 90 109 <b>Other actions:</b> <ul>
