File: seqviz.py

package info (click to toggle)
python-seqcluster 1.2.9%2Bds-3
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 113,624 kB
  • sloc: python: 5,308; makefile: 184; sh: 122; javascript: 55
file content (27 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
JSVIZ1='''<script type="text/javascript">
		  function go() {
            var zoomCanvas = document.getElementById('canvas');
            origZoomChart = new Scribl(zoomCanvas, 100);
            //origZoomChart.scale.min = 0;
	   // origZoomChart.scale.max = 12000;
'''

JSVIZ2='''
            origZoomChart.scrollable = true;
            origZoomChart.scrollValues = [10, 250];
            origZoomChart.draw();
		  }

		</script>
'''


CANVAS='''		<div id="container">
		            <canvas id="canvas" width="940px" height="400px"  style="margin-left:auto; margin-right:auto"></canvas>  
		</div>		
'''

SEQ='''origZoomChart.addFeature( new Seq('human', %s, %s, "%s") );'''

def addseq(pos,len,seq):
	return(SEQ % (pos,len,seq))