annotate tools/mytools/fimo_out/fimo-to-html.xsl @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <?xml version="1.0" encoding="ISO-8859-1"?>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <xsl:stylesheet version="1.0"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 xmlns:cis="http://zlab.bu.edu/schema/cisml"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 xmlns:fimo="http://noble.gs.washington.edu/schema/cisml"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 xmlns:mem="http://noble.gs.washington.edu/meme"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 >
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <xsl:output method="html" indent="yes"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 doctype-system="http://www.w3.org/TR/html4/loose.dtd"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <!-- Stylesheet processing starts here -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <xsl:template match="/fimo">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <html>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <xsl:call-template name="html_head"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <body bgcolor='#D5F0FF'>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <a name="top_buttons"></a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <hr />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <table summary="buttons" align="left" cellspacing="0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <td bgcolor="#00FFFF">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <a href='#database_and_motifs'><b>Database and Motifs</b></a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <td bgcolor="#DDFFDD">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <a href="#sec_i"><b>High-scoring Motif Occurences</b></a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <td bgcolor="#DDDDFF">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <a href="#debugging_information"><b>Debugging Information</b></a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <!-- Create the various sub-sections of the document -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <xsl:call-template name="version"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <xsl:call-template name="database_and_motifs"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <xsl:call-template name="high_scoring_motif_occurrences"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <!-- Diagrams and annotations break for long sequences
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 (H. sap. chr21 for example -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <xsl:call-template name="motif_diagrams"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <xsl:call-template name="annotations"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <xsl:call-template name="debugging_information"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <!-- Buttons are pointless since there is only one section
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <xsl:call-template name="button_help"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 </body>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 </html>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <xsl:template name="html_head">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <!-- This template prints the HTML head block, including the document level CSS. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <head>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <title>FIMO Results</title>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <style type="text/css">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 td.left {text-align: left;}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 td.right {text-align: right; padding-right: 1cm;}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 </style>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 </head>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 <xsl:template name="version">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 This template prints the HTML describing the version of FIMO
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 that generated this document.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 <hr />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 <big><b>FIMO - Motif search tool</b></big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 <hr />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 FIMO version <xsl:value-of select="@version"/>,
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 (Release date: <xsl:value-of select="@release"/>)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 For further information on how to interpret these results
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 or to get a copy of the FIMO software please access
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 <a href="http://meme.nbcr.net">http://meme.nbcr.net</a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 <p>If you use FIMO in your research, please cite the following paper:<br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 Charles E. Grant, Timothy L. Bailey, and William Stafford Noble,
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 &quot;FIMO: Scanning for occurrences of a given motif&quot;,
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 <i>Bioinformatics</i>, <b>27</b>(7):1017&#45;1018, 2011.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 <xsl:template name="reference">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 <!-- This template prints the instructions for citing FIMO. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 <a name="reference"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 <big><b>REFERENCE</b></big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 If you use this program in your research, please cite:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 <xsl:template name="database_and_motifs">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109 This template prints the HTML descibing the input sequences
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 and motifs that were used to generate this document.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 <big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115 <b><a name="database_and_motifs">DATABASE AND MOTIFS</a></b>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 </big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119 <div style="padding-left: 0.75in; line-height: 1em; font-family: monospace;">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
121 DATABASE
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
122 <xsl:value-of select="/fimo/settings/setting[@name='sequence file name']"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
123 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
124 Database contains
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
125 <xsl:value-of select="/fimo/sequence-data/@num-sequences"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
126 sequences,
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
127 <xsl:value-of select="/fimo/sequence-data/@num-residues"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
128 residues
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
129 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
130 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
131 MOTIFS
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
132 <xsl:value-of select="/fimo/settings/setting[@name='MEME file name']"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
133 <xsl:text> </xsl:text>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
134 (<xsl:value-of select="/fimo/alphabet"/>)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
135 <table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
136 <thead>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
137 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
138 <th style="border-bottom: 1px dashed;">MOTIF</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
139 <th style="border-bottom: 1px dashed; padding-left: 1em;">WIDTH</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
140 <th style="border-bottom: 1px dashed; padding-left: 1em;" align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
141 BEST POSSIBLE MATCH
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
142 </th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
143 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
144 </thead>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
145 <tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
146 <xsl:for-each select="/fimo/motif">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
147 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
148 <td align="right"><xsl:value-of select="./@name"/></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
149 <td align="right" style="padding-left: 1em;"><xsl:value-of select="./@width"/></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
150 <td align="left" style="padding-left: 1em;">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
151 <xsl:value-of select="./@best-possible-match"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
152 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
153 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
154 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
155 </tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
156 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
157 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
158 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
159 Random model letter frequencies
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
160 (from <xsl:value-of select="/fimo/background/@source"/>):
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
161 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
162 <xsl:call-template name="bg_freq"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
163 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
164 </div>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
165 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
166
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
167 <xsl:template name="bg_freq">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
168 <!-- This template prints the HTML listing the background frequencies for each symbol in the alphabet. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
169 <xsl:for-each select="/fimo/background/value">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
170 <xsl:value-of select="./@letter"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
171 <xsl:text> </xsl:text>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
172 <xsl:value-of select="format-number(., '0.000')"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
173 <xsl:text> </xsl:text>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
174 <!-- For amino acids insert a line break very 9 characters. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
175 <xsl:variable name="letter_index" select="position()" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
176 <xsl:if test="$letter_index mod 9 = 0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
177 <xsl:text>&#10;</xsl:text>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
178 <br/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
179 <xsl:text>&#10;</xsl:text>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
180 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
181 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
182 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
183
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
184 <xsl:template name="high_scoring_motif_occurrences">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
185 <xsl:variable name="alphabet">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
186 <xsl:value-of select="/fimo/alphabet"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
187 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
188 <xsl:variable name="num_qvalues">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
189 <xsl:value-of
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
190 select="count(document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence/cis:matched-element/mem:qvalue)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
191 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
192 <!-- This template prints the matches to the pattern. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
193 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
194 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
195 <big><b><a name="sec_i">SECTION I: HIGH-SCORING MOTIF OCCURENCES</a></b></big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
196 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
197 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
198 <ul>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
199 <li> Each of the following
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
200 <xsl:value-of select="count(document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence/cis:matched-element)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
201 motif occurrences has
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
202 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
203 <xsl:when test="/fimo/settings/setting[@name='output q-threshold set'] = 'true'">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
204 q-value less than
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
205 <xsl:value-of select="/fimo/settings/setting[@name='output q-value threshold' = 'true']"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
206 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
207 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
208 p-value less than
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
209 <xsl:value-of select="/fimo/settings/setting[@name='output p-value threshold']"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
210 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
211 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
212 </li>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
213 <li> The p-value of a motif occurrence is defined as the
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
214 probability of a random sequence of the same length as the motif
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
215 matching that position of the sequence with as good or better a score.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
216 </li>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
217 <li> The score for the match of a position in a sequence to a motif
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
218 is computed by summing the appropriate entries from each column of
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
219 the position-dependent scoring matrix that represents the motif.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
220 </li>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
221 <xsl:if test="$num_qvalues > 0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
222 <li> The q-value of a motif occurrence is defined as the
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
223 false discovery rate if the occurrence is accepted as significant.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
224 </li>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
225 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
226 <li>The table is sorted by increasing p-value.</li>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
227 <li>If the start position is larger than the end position,
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
228 the motif occurrence is on the reverse strand.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
229 </li>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
230 </ul>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
231 <table border="1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
232 <thead>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
233 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
234 <th>Motif</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
235 <th>Sequence Name</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
236 <xsl:if test="$alphabet='nucleotide'">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
237 <th>Strand</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
238 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
239 <th>Start</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
240 <th>End</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
241 <th>p-value</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
242 <xsl:if test="$num_qvalues > 0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
243 <th>q-value</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
244 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
245 <th>Matched Sequence</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
246 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
247 </thead>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
248 <tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
249 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence/cis:matched-element">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
250 <xsl:sort select="@pvalue" data-type="number" order="ascending"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
251 <xsl:variable name="seq_name" select="../@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
252 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
253 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
254 <a name="occurrences_{$seq_name}"><xsl:value-of select="../../@name"/></a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
255 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
256 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
257 <xsl:value-of select="../@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
258 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
259 <!-- start and stop positions -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
260 <!-- CISML uses start > stop to indicate - strand -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
261 <!-- For HTML we want start < stop, indicate strand in strand column -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
262 <xsl:if test="$alphabet='nucleotide'">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
263 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
264 <xsl:when test="@start &gt; @stop">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
265 <!-- start > stop so - strand -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
266 <td align="center"><xsl:text>&#8722;</xsl:text></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
267 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
268 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
269 <td align="center"><xsl:text>+</xsl:text></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
270 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
271 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
272 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
273 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
274 <xsl:when test="@start &gt; @stop">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
275 <!-- start > stop so - strand -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
276 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
277 <xsl:value-of select="@stop"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
278 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
279 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
280 <xsl:value-of select="@start"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
281 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
282 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
283 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
284 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
285 <xsl:value-of select="@start"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
286 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
287 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
288 <xsl:value-of select="@stop"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
289 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
290 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
291 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
292 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
293 <xsl:value-of select="@pvalue"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
294 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
295 <xsl:if test="$num_qvalues > 0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
296 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
297 <xsl:value-of select="./mem:qvalue"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
298 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
299 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
300 <td align="left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
301 <code style="font-size: x-large;"><xsl:value-of select="./cis:sequence"/></code>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
302 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
303 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
304 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
305 </tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
306 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
307 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
308
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
309 <xsl:template name="motif_diagrams">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
310 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
311 This template draws the bead-on-string diagram for each
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
312 of the scanned sequence.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
313 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
314 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
315 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
316 <big><b><a name="sec_ii">SECTION II: MOTIF DIAGRAMS</a></b></big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
317 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
318 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
319 <table border="1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
320 <thead>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
321 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
322 <th align="left"><br/>Name</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
323 <th align="left"><br/>Motifs</th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
324 <th></th>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
325 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
326 </thead>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
327 <tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
328 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[not (@name = preceding::cis:scanned-sequence/@name)]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
329 <xsl:sort select="@name" order="ascending"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
330 <xsl:variable name="sequence_width" select="@length"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
331 <xsl:variable name="sequence_name" select="@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
332 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
333 <td><a name="diagram_{$sequence_name}"><xsl:value-of select="$sequence_name"/></a></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
334 <td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
335 <table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
336 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
337 <xsl:call-template name="draw_diagram_for_sequence">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
338 <xsl:with-param name="sequence_name" select="$sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
339 <xsl:with-param name="sequence_width" select="@length"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
340 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
341 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
342 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
343 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
344 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
345 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
346 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
347 <td rowspan="2" style="color: blue;">SCALE</td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
348 <td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
349 <table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
350 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
351 <td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
352 <xsl:call-template name="ticks">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
353 <xsl:with-param name="count" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
354 <xsl:with-param name="limit">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
355 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence/@length">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
356 <xsl:sort data-type="number" order="descending"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
357 <xsl:if test="position()=1"><xsl:value-of select="."/></xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
358 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
359 </xsl:with-param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
360 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
361 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
362 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
363 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
364 <td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
365 <xsl:call-template name="scale">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
366 <xsl:with-param name="count" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
367 <xsl:with-param name="limit">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
368 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence/@length">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
369 <xsl:sort data-type="number" order="descending"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
370 <xsl:if test="position()=1"><xsl:value-of select="."/></xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
371 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
372 </xsl:with-param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
373 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
374 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
375 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
376 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
377 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
378 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
379 </tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
380 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
381 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
382
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
383 <xsl:template name="draw_diagram_for_sequence">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
384 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
385 This template draws the bead-on-string diagram for
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
386 a single sequence.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
387 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
388 <xsl:param name="sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
389 <xsl:param name="sequence_width"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
390 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[@name = $sequence_name]/cis:matched-element">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
391 <xsl:sort select="number(@start)" data-type="number" order="ascending"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
392 <xsl:variable name="starting">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
393 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
394 <xsl:when test="number(@start) &lt; number(@stop)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
395 <xsl:value-of select="@start"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
396 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
397 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
398 <xsl:value-of select="@stop"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
399 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
400 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
401 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
402 <xsl:variable name="ending">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
403 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
404 <xsl:when test="number(@start) &lt; number(@stop)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
405 <xsl:value-of select="@stop"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
406 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
407 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
408 <xsl:value-of select="@start"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
409 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
410 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
411 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
412 <xsl:variable name="current_element" select="position()"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
413 <xsl:variable name="previous_end">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
414 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
415 <xsl:when test="position() = 1">0</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
416 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
417 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[@name = $sequence_name]/cis:matched-element">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
418 <xsl:sort select="number(@start)" data-type="number" order="ascending"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
419 <xsl:if test="position() = ($current_element - 1)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
420 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
421 <xsl:when test="number(@start) &lt; number(@stop)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
422 <xsl:value-of select="@stop"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
423 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
424 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
425 <xsl:value-of select="@start"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
426 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
427 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
428 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
429 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
430 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
431 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
432 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
433 <xsl:variable name="motif_name">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
434 <xsl:value-of select="../../@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
435 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
436 <xsl:variable name="motif_index">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
437 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
438 <xsl:if test="@name = $motif_name"><xsl:value-of select="position()"/></xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
439 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
440 <xsl:value-of select="@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
441 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
442 <xsl:variable name="motif_color">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
443 <xsl:call-template name="pick_color">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
444 <xsl:with-param name="index" select="$motif_index"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
445 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
446 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
447 <xsl:variable name="font_color">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
448 <xsl:call-template name="pick_font_color">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
449 <xsl:with-param name="index" select="$motif_index"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
450 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
451 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
452 <xsl:variable name="strand">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
453 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
454 <xsl:when test="number(@start) &lt; number(@stop)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
455 <xsl:text>+</xsl:text>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
456 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
457 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
458 <xsl:text>-</xsl:text>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
459 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
460 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
461 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
462 <xsl:variable name="alphabet" select="document('fimo.xml')/fimo/alphabet"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
463 <td style="width: {2 * ($starting - $previous_end) }px;"><hr size="4" noshade="noshade"/></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
464 <td style="width: {2 * ($ending - $starting)}px; background: {$motif_color}; color: {$font_color}; text-align: center;">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
465 <xsl:if test="$alphabet = 'nucleotide'"><xsl:value-of select="$strand"/></xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
466 <xsl:value-of select="../../@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
467 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
468 <xsl:if test="position() = last()">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
469 <td style="width: {2 * ($sequence_width - $ending) }px;"><hr size="4" noshade="noshade"/></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
470 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
471 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
472 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
473
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
474 <xsl:template name="ticks">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
475 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
476 This template is used to print the tick marks in the
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
477 scale at the bottom of the bead-on-string daigrams.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
478 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
479 <xsl:param name="count" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
480 <xsl:param name="limit" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
481 <xsl:if test="$count &lt; $limit">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
482 <td style="width: 50px;" align="left"><font color="blue">|</font></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
483 <xsl:call-template name="ticks">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
484 <xsl:with-param name="count" select="$count + 24"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
485 <xsl:with-param name="limit" select="$limit"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
486 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
487 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
488 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
489
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
490 <xsl:template name="scale">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
491 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
492 This template is used to print the text in the
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
493 scale at the bottom of the bead-on-string daigrams.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
494 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
495 <xsl:param name="count" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
496 <xsl:param name="limit" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
497 <xsl:if test="$count &lt; $limit">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
498 <td style="width: 50px;" align="left"><font color="blue"><xsl:value-of select="$count"/></font></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
499 <xsl:if test="$count = 1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
500 <xsl:call-template name="scale">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
501 <xsl:with-param name="limit" select="$limit"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
502 <xsl:with-param name="count" select="$count + 24"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
503 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
504 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
505 <xsl:if test="$count > 1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
506 <xsl:call-template name="scale">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
507 <xsl:with-param name="limit" select="$limit"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
508 <xsl:with-param name="count" select="$count + 25"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
509 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
510 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
511 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
512 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
513
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
514 <xsl:template name="pick_color">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
515 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
516 This template is used to set the color of motif markers
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
517 in the bead-on-string diagrams.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
518 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
519 <xsl:param name="index" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
520 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
521 <xsl:when test="($index mod 16) = 0">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
522 <xsl:when test="($index mod 16) = 1">aqua</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
523 <xsl:when test="($index mod 16) = 2">blue</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
524 <xsl:when test="($index mod 16) = 3">red</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
525 <xsl:when test="($index mod 16) = 4">fuchsia</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
526 <xsl:when test="($index mod 16) = 5">yellow</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
527 <xsl:when test="($index mod 16) = 6">lime</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
528 <xsl:when test="($index mod 16) = 7">teal</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
529 <xsl:when test="($index mod 16) = 8">#444444</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
530 <xsl:when test="($index mod 16) = 9">green</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
531 <xsl:when test="($index mod 16) = 10">silver</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
532 <xsl:when test="($index mod 16) = 11">purple</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
533 <xsl:when test="($index mod 16) = 12">olive</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
534 <xsl:when test="($index mod 16) = 13">navy</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
535 <xsl:when test="($index mod 16) = 14">maroon</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
536 <xsl:when test="($index mod 16) = 15">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
537 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
538 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
539
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
540 <xsl:template name="pick_font_color">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
541 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
542 This template is used to set the font color in motif markers
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
543 in the bead-on-string diagrams.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
544 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
545 <xsl:param name="index" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
546 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
547 <xsl:when test="($index mod 16) = 0">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
548 <xsl:when test="($index mod 16) = 1">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
549 <xsl:when test="($index mod 16) = 2">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
550 <xsl:when test="($index mod 16) = 3">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
551 <xsl:when test="($index mod 16) = 4">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
552 <xsl:when test="($index mod 16) = 5">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
553 <xsl:when test="($index mod 16) = 6">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
554 <xsl:when test="($index mod 16) = 7">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
555 <xsl:when test="($index mod 16) = 8">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
556 <xsl:when test="($index mod 16) = 9">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
557 <xsl:when test="($index mod 16) = 10">black</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
558 <xsl:when test="($index mod 16) = 11">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
559 <xsl:when test="($index mod 16) = 12">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
560 <xsl:when test="($index mod 16) = 13">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
561 <xsl:when test="($index mod 16) = 14">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
562 <xsl:when test="($index mod 16) = 15">white</xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
563 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
564 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
565
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
566 <xsl:template name="annotations">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
567 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
568 This template draws the motif/sequence annotations for each
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
569 of the scanned sequence less than 10kb.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
570 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
571 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
572 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
573 <big><b><a name="sec_iii">SECTION III: SEQUENCE/MOTIF ANNOTATIONS</a></b></big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
574 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
575 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
576 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[not (@name = preceding::cis:scanned-sequence/@name)]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
577 <xsl:sort select="@name" order="ascending"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
578 <xsl:variable name="sequence_length" select="@length"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
579 <xsl:variable name="sequence_name" select="@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
580 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
581 <a name="annotation_{$sequence_name}"><xsl:value-of select="$sequence_name"/></a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
582 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
583 <span style="background-color: ##DDDD88;"><a href="#occurrences_{$sequence_name}">S</a></span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
584 <span style="background-color: #DDFFDD;"><a href="#diagram_{$sequence_name}">D</a></span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
585 <span style="background-color: #FFFFFF;"><a href="#button_help">?</a></span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
586 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
587 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
588 Length = <xsl:value-of select="$sequence_length"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
589 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
590 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
591 String Length = <xsl:value-of
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
592 select="string-length(normalize-space(document('matched_sequences.xml')/matched-sequences/sequence[@name=$sequence_name]))"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
593 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
594 <pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
595 <table style="font-family: monospace;">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
596 <tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
597 <xsl:call-template name="wrap_sequence">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
598 <xsl:with-param name="sequence"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
599 select="normalize-space(document('matched_sequences.xml')/matched-sequences/sequence[@name=$sequence_name])"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
600 <xsl:with-param name="sequence_index" select="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
601 <xsl:with-param name="sequence_name" select="$sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
602 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
603 </tbody>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
604 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
605 </pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
606 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
607 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
608
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
609 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
610
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
611 <xsl:template name="debugging_information">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
612 <!-- This template print the HTML describing the FIMO input parameters. -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
613 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
614 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
615 <big><b><a name="debugging_information">DEBUGGING INFORMATION</a></b></big>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
616 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
617 <hr/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
618 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
619 Command line:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
620 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
621 <pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
622 <xsl:value-of select="/fimo/command-line"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
623 </pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
624 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
625 Settings:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
626 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
627 <pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
628 <table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
629 <xsl:apply-templates select="/fimo/settings/setting[position() mod 3 = 1]"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
630 </table>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
631 </pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
632 <p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
633 This information can be useful in the event you wish to report a
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
634 problem with the FIMO software.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
635 </p>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
636 <hr />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
637 <span style="background-color: #DDDDFF"><a href="#top_buttons"><b>Go to top</b></a></span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
638
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
639 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
640
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
641 <xsl:template match="setting">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
642 <!-- This template prints the program settings in 2 columns -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
643 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
644 <td style="padding-right: 2em"><xsl:value-of select="@name"/> = <xsl:value-of select="."/></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
645 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
646 <xsl:when test="count(following-sibling::*[name()=name(current())])">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
647 <td style="padding-left: 5em; padding-right: 2em">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
648 <xsl:value-of select="following-sibling::setting[1]/@name"/> = <xsl:value-of select="following-sibling::setting[1]"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
649 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
650 <td style="padding-left: 5em; padding-right: 2em">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
651 <xsl:value-of select="following-sibling::setting[2]/@name"/> = <xsl:value-of select="following-sibling::setting[2]"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
652 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
653 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
654 <xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
655 <td style="padding-left: 5em; padding-right: 2em"></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
656 <td align="right"></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
657 </xsl:otherwise>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
658 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
659 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
660 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
661
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
662 <xsl:template name="button_help">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
663 <hr />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
664 <center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
665 <h3><a name="button_help">Button Help</a></h3>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
666 </center>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
667 <hr />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
668 <span style="background-color: #DDDDFF">S</span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
669 Links to Entrez database at <a href="http://www.ncbi.nlm.nih.gov">NCBI</a>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
670 <span style="background-color: #DDDD88">S</span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
671 Links to motif occurences table(<a href="#sec_i">SECTION I</a>)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
672 <br/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
673 <span style="background-color: #DDFFDD">D</span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
674 Links to motif occurences diagram (<a href="#sec_ii">SECTION II</a>)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
675 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
676 <span style="background-color: #FFDDDD">A</span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
677 Links to sequence/motif annotated alignments (<a href="#sec_iii">SECTION III</a>)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
678 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
679 <span style="background-color: #FFFFFF">?</span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
680 This information
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
681 <br />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
682
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
683 <hr />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
684 <span style="background-color: #DDDDFF"><a href="#top_buttons"><b>Go to top</b></a></span>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
685 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
686
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
687 <xsl:template name="wrap_sequence">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
688 <xsl:param name="sequence"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
689 <xsl:param name="sequence_index"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
690 <xsl:param name="sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
691 <xsl:variable name="current_sequence">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
692 <xsl:value-of select="substring($sequence, 1, 75)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
693 </xsl:variable>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
694 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
695 <td></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
696 <td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
697 <xsl:call-template name="annotate_motif_names">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
698 <xsl:with-param name="sequence_index" select="$sequence_index"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
699 <xsl:with-param name="sequence_name" select="$sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
700 <xsl:with-param name="current_sequence" select="$current_sequence" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
701 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
702 </td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
703 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
704 <tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
705 <td style="width: 6em;"><xsl:value-of select ="$sequence_index"/></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
706 <td><xsl:value-of select="$current_sequence"/></td>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
707 </tr>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
708 <xsl:variable name="new_sequence" select="substring($sequence, 76)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
709 <xsl:if test="string-length($new_sequence)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
710 <xsl:call-template name="wrap_sequence">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
711 <xsl:with-param name="sequence" select="$new_sequence"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
712 <xsl:with-param name="sequence_index" select="number($sequence_index) + 75"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
713 <xsl:with-param name="sequence_name" select="$sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
714 </xsl:call-template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
715 </xsl:if>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
716 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
717
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
718 <xsl:template name="annotate_motif_names">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
719 <xsl:param name="sequence_index"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
720 <xsl:param name="sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
721 <xsl:param name="input_sequence"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
722 <xsl:param name="output_sequence"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
723 <xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
724 <xsl:when test="count(document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[@name=$sequence_name]) = 1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
725 </xsl:when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
726 </xsl:choose>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
727 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[@name=$sequence_name]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
728 <xsl:for-each select="./cis:matched-element[(@start &gt;= $sequence_index) and (@start &lt; ($sequence_index + 75))]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
729 <xsl:sort select="@start" data-type="number" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
730 <xsl:text> </xsl:text><xsl:value-of select="../../@name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
731 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
732 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
733 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
734
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
735 <xsl:template name="annotate_pvalues">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
736 <xsl:param name="sequence_index"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
737 <xsl:param name="sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
738 <pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
739 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[@name=$sequence_name]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
740 <xsl:for-each select="./cis:matched-element[(@start &gt;= $sequence_index) and (@start &lt; ($sequence_index + 75))]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
741 <xsl:sort select="@start" data-type="number" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
742 <xsl:text> </xsl:text><xsl:value-of select="@pvalue"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
743 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
744 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
745 </pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
746 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
747
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
748 <xsl:template name="annotate_best_match">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
749 <xsl:param name="sequence_index"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
750 <xsl:param name="sequence_name"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
751 <pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
752 <xsl:for-each select="document('cisml.xml')/cis:cis-element-search/cis:pattern/cis:scanned-sequence[@name=$sequence_name]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
753 <xsl:for-each select="./cis:matched-element[(@start &gt;= $sequence_index) and (@start &lt; ($sequence_index + 75))]">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
754 <xsl:sort select="@start" data-type="number" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
755 <xsl:text> </xsl:text><xsl:value-of select="document('fimo.xml')/fimo/motif[@name=./@name]/@best-possible-match"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
756 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
757 </xsl:for-each>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
758 </pre>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
759 </xsl:template>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
760 </xsl:stylesheet>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
761