a7bdf1a47851f7ad27c73112d7727b38df4f8470
[jabaws.git] / website / full_javadoc / compbio / data / sequence / SequenceUtil.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
2 <!--NewPage-->\r
3 <HTML>\r
4 <HEAD>\r
5 <!-- Generated by javadoc (build 1.6.0_14) on Wed Feb 17 16:46:49 GMT 2010 -->\r
6 <TITLE>\r
7 SequenceUtil\r
8 </TITLE>\r
9 \r
10 <META NAME="date" CONTENT="2010-02-17">\r
11 \r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">\r
13 \r
14 <SCRIPT type="text/javascript">\r
15 function windowTitle()\r
16 {\r
17     if (location.href.indexOf('is-external=true') == -1) {\r
18         parent.document.title="SequenceUtil";\r
19     }\r
20 }\r
21 </SCRIPT>\r
22 <NOSCRIPT>\r
23 </NOSCRIPT>\r
24 \r
25 </HEAD>\r
26 \r
27 <BODY BGCOLOR="white" onload="windowTitle();">\r
28 <HR>\r
29 \r
30 \r
31 <!-- ========= START OF TOP NAVBAR ======= -->\r
32 <A NAME="navbar_top"><!-- --></A>\r
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>\r
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">\r
35 <TR>\r
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">\r
37 <A NAME="navbar_top_firstrow"><!-- --></A>\r
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">\r
39   <TR ALIGN="center" VALIGN="top">\r
40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>\r
41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>\r
42   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>\r
43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SequenceUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>\r
44   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>\r
45   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>\r
46   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>\r
47   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>\r
48   </TR>\r
49 </TABLE>\r
50 </TD>\r
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>\r
52 </EM>\r
53 </TD>\r
54 </TR>\r
55 \r
56 <TR>\r
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
58 &nbsp;<A HREF="../../../compbio/data/sequence/Program.html" title="enum in compbio.data.sequence"><B>PREV CLASS</B></A>&nbsp;\r
59 &nbsp;<A HREF="../../../compbio/data/sequence/UnknownFileFormatException.html" title="class in compbio.data.sequence"><B>NEXT CLASS</B></A></FONT></TD>\r
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
61   <A HREF="../../../index.html?compbio/data/sequence/SequenceUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;\r
62 &nbsp;<A HREF="SequenceUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;\r
63 &nbsp;<SCRIPT type="text/javascript">\r
64   <!--\r
65   if(window==top) {\r
66     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');\r
67   }\r
68   //-->\r
69 </SCRIPT>\r
70 <NOSCRIPT>\r
71   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>\r
72 </NOSCRIPT>\r
73 \r
74 \r
75 </FONT></TD>\r
76 </TR>\r
77 <TR>\r
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
79   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>\r
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
81 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>\r
82 </TR>\r
83 </TABLE>\r
84 <A NAME="skip-navbar_top"></A>\r
85 <!-- ========= END OF TOP NAVBAR ========= -->\r
86 \r
87 <HR>\r
88 <!-- ======== START OF CLASS DATA ======== -->\r
89 <H2>\r
90 <FONT SIZE="-1">\r
91 compbio.data.sequence</FONT>\r
92 <BR>\r
93 Class SequenceUtil</H2>\r
94 <PRE>\r
95 java.lang.Object\r
96   <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>compbio.data.sequence.SequenceUtil</B>\r
97 </PRE>\r
98 <HR>\r
99 <DL>\r
100 <DT><PRE>public final class <B>SequenceUtil</B><DT>extends java.lang.Object</DL>\r
101 </PRE>\r
102 \r
103 <P>\r
104 Utility class for operations on sequences\r
105 <P>\r
106 \r
107 <P>\r
108 <DL>\r
109 <DT><B>Author:</B></DT>\r
110   <DD>pvtroshin
111  
112          Date September 2009</DD>\r
113 </DL>\r
114 <HR>\r
115 \r
116 <P>\r
117 <!-- =========== FIELD SUMMARY =========== -->\r
118 \r
119 <A NAME="field_summary"><!-- --></A>\r
120 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
121 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
122 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">\r
123 <B>Field Summary</B></FONT></TH>\r
124 </TR>\r
125 <TR BGCOLOR="white" CLASS="TableRowColor">\r
126 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
127 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
128 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#AA">AA</A></B></CODE>\r
129 \r
130 <BR>\r
131 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Valid Amino acids</TD>\r
132 </TR>\r
133 <TR BGCOLOR="white" CLASS="TableRowColor">\r
134 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
135 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
136 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#AMBIGUOUS_AA">AMBIGUOUS_AA</A></B></CODE>\r
137 \r
138 <BR>\r
139 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as AA pattern but with two additional letters - XU</TD>\r
140 </TR>\r
141 <TR BGCOLOR="white" CLASS="TableRowColor">\r
142 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
143 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
144 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#AMBIGUOUS_NUCLEOTIDE">AMBIGUOUS_NUCLEOTIDE</A></B></CODE>\r
145 \r
146 <BR>\r
147 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ambiguous nucleotide</TD>\r
148 </TR>\r
149 <TR BGCOLOR="white" CLASS="TableRowColor">\r
150 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
151 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
152 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#DIGIT">DIGIT</A></B></CODE>\r
153 \r
154 <BR>\r
155 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A digit</TD>\r
156 </TR>\r
157 <TR BGCOLOR="white" CLASS="TableRowColor">\r
158 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
159 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
160 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NON_AA">NON_AA</A></B></CODE>\r
161 \r
162 <BR>\r
163 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inversion of AA pattern</TD>\r
164 </TR>\r
165 <TR BGCOLOR="white" CLASS="TableRowColor">\r
166 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
167 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
168 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NON_NUCLEOTIDE">NON_NUCLEOTIDE</A></B></CODE>\r
169 \r
170 <BR>\r
171 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Non nucleotide</TD>\r
172 </TR>\r
173 <TR BGCOLOR="white" CLASS="TableRowColor">\r
174 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
175 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
176 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NONWORD">NONWORD</A></B></CODE>\r
177 \r
178 <BR>\r
179 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Non word</TD>\r
180 </TR>\r
181 <TR BGCOLOR="white" CLASS="TableRowColor">\r
182 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
183 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
184 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NUCLEOTIDE">NUCLEOTIDE</A></B></CODE>\r
185 \r
186 <BR>\r
187 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nucleotides a, t, g, c, u</TD>\r
188 </TR>\r
189 <TR BGCOLOR="white" CLASS="TableRowColor">\r
190 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
191 <CODE>static&nbsp;java.util.regex.Pattern</CODE></FONT></TD>\r
192 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#WHITE_SPACE">WHITE_SPACE</A></B></CODE>\r
193 \r
194 <BR>\r
195 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A whitespace character: [\t\n\x0B\f\r]</TD>\r
196 </TR>\r
197 </TABLE>\r
198 &nbsp;\r
199 <!-- ========== METHOD SUMMARY =========== -->\r
200 \r
201 <A NAME="method_summary"><!-- --></A>\r
202 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
203 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
204 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">\r
205 <B>Method Summary</B></FONT></TH>\r
206 </TR>\r
207 <TR BGCOLOR="white" CLASS="TableRowColor">\r
208 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
209 <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>\r
210 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#cleanSequence(java.lang.String)">cleanSequence</A></B>(java.lang.String&nbsp;sequence)</CODE>\r
211 \r
212 <BR>\r
213 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all whitespace chars in the sequence string</TD>\r
214 </TR>\r
215 <TR BGCOLOR="white" CLASS="TableRowColor">\r
216 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
217 <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>\r
218 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#deepCleanSequence(java.lang.String)">deepCleanSequence</A></B>(java.lang.String&nbsp;sequence)</CODE>\r
219 \r
220 <BR>\r
221 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all special characters and digits as well as whitespace chars
222  from the sequence</TD>\r
223 </TR>\r
224 <TR BGCOLOR="white" CLASS="TableRowColor">\r
225 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
226 <CODE>static&nbsp;boolean</CODE></FONT></TD>\r
227 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#isAmbiguosProtein(java.lang.String)">isAmbiguosProtein</A></B>(java.lang.String&nbsp;sequence)</CODE>\r
228 \r
229 <BR>\r
230 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check whether the sequence confirms to amboguous protein sequence</TD>\r
231 </TR>\r
232 <TR BGCOLOR="white" CLASS="TableRowColor">\r
233 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
234 <CODE>static&nbsp;boolean</CODE></FONT></TD>\r
235 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#isNonAmbNucleotideSequence(java.lang.String)">isNonAmbNucleotideSequence</A></B>(java.lang.String&nbsp;sequence)</CODE>\r
236 \r
237 <BR>\r
238 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ambiguous DNA chars : AGTCRYMKSWHBVDN // differs from protein in only one
239  (!) - B char</TD>\r
240 </TR>\r
241 <TR BGCOLOR="white" CLASS="TableRowColor">\r
242 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
243 <CODE>static&nbsp;boolean</CODE></FONT></TD>\r
244 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#isNucleotideSequence(compbio.data.sequence.FastaSequence)">isNucleotideSequence</A></B>(<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&nbsp;s)</CODE>\r
245 \r
246 <BR>\r
247 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\r
248 </TR>\r
249 <TR BGCOLOR="white" CLASS="TableRowColor">\r
250 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
251 <CODE>static&nbsp;boolean</CODE></FONT></TD>\r
252 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#isProteinSequence(java.lang.String)">isProteinSequence</A></B>(java.lang.String&nbsp;sequence)</CODE>\r
253 \r
254 <BR>\r
255 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\r
256 </TR>\r
257 <TR BGCOLOR="white" CLASS="TableRowColor">\r
258 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
259 <CODE>static&nbsp;java.util.List&lt;<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&gt;</CODE></FONT></TD>\r
260 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#readFasta(java.io.InputStream)">readFasta</A></B>(java.io.InputStream&nbsp;inStream)</CODE>\r
261 \r
262 <BR>\r
263 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads fasta sequences from inStream into the list of FastaSequence
264  objects</TD>\r
265 </TR>\r
266 <TR BGCOLOR="white" CLASS="TableRowColor">\r
267 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
268 <CODE>static&nbsp;void</CODE></FONT></TD>\r
269 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#writeFasta(java.io.OutputStream, java.util.List)">writeFasta</A></B>(java.io.OutputStream&nbsp;os,\r
270            java.util.List&lt;<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&gt;&nbsp;sequences)</CODE>\r
271 \r
272 <BR>\r
273 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes FastaSequence in the file, each sequence will take one line only</TD>\r
274 </TR>\r
275 <TR BGCOLOR="white" CLASS="TableRowColor">\r
276 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
277 <CODE>static&nbsp;void</CODE></FONT></TD>\r
278 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#writeFasta(java.io.OutputStream, java.util.List, int)">writeFasta</A></B>(java.io.OutputStream&nbsp;outstream,\r
279            java.util.List&lt;<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&gt;&nbsp;sequences,\r
280            int&nbsp;width)</CODE>\r
281 \r
282 <BR>\r
283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes list of FastaSequeces into the outstream formatting the sequence
284  so that it contains width chars on each line</TD>\r
285 </TR>\r
286 </TABLE>\r
287 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>\r
288 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
289 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">\r
290 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>\r
291 </TR>\r
292 <TR BGCOLOR="white" CLASS="TableRowColor">\r
293 <TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>\r
294 </TR>\r
295 </TABLE>\r
296 &nbsp;\r
297 <P>\r
298 \r
299 <!-- ============ FIELD DETAIL =========== -->\r
300 \r
301 <A NAME="field_detail"><!-- --></A>\r
302 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
303 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
304 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">\r
305 <B>Field Detail</B></FONT></TH>\r
306 </TR>\r
307 </TABLE>\r
308 \r
309 <A NAME="WHITE_SPACE"><!-- --></A><H3>\r
310 WHITE_SPACE</H3>\r
311 <PRE>\r
312 public static final java.util.regex.Pattern <B>WHITE_SPACE</B></PRE>\r
313 <DL>\r
314 <DD>A whitespace character: [\t\n\x0B\f\r]\r
315 <P>\r
316 <DL>\r
317 </DL>\r
318 </DL>\r
319 <HR>\r
320 \r
321 <A NAME="DIGIT"><!-- --></A><H3>\r
322 DIGIT</H3>\r
323 <PRE>\r
324 public static final java.util.regex.Pattern <B>DIGIT</B></PRE>\r
325 <DL>\r
326 <DD>A digit\r
327 <P>\r
328 <DL>\r
329 </DL>\r
330 </DL>\r
331 <HR>\r
332 \r
333 <A NAME="NONWORD"><!-- --></A><H3>\r
334 NONWORD</H3>\r
335 <PRE>\r
336 public static final java.util.regex.Pattern <B>NONWORD</B></PRE>\r
337 <DL>\r
338 <DD>Non word\r
339 <P>\r
340 <DL>\r
341 </DL>\r
342 </DL>\r
343 <HR>\r
344 \r
345 <A NAME="AA"><!-- --></A><H3>\r
346 AA</H3>\r
347 <PRE>\r
348 public static final java.util.regex.Pattern <B>AA</B></PRE>\r
349 <DL>\r
350 <DD>Valid Amino acids\r
351 <P>\r
352 <DL>\r
353 </DL>\r
354 </DL>\r
355 <HR>\r
356 \r
357 <A NAME="NON_AA"><!-- --></A><H3>\r
358 NON_AA</H3>\r
359 <PRE>\r
360 public static final java.util.regex.Pattern <B>NON_AA</B></PRE>\r
361 <DL>\r
362 <DD>inversion of AA pattern\r
363 <P>\r
364 <DL>\r
365 </DL>\r
366 </DL>\r
367 <HR>\r
368 \r
369 <A NAME="AMBIGUOUS_AA"><!-- --></A><H3>\r
370 AMBIGUOUS_AA</H3>\r
371 <PRE>\r
372 public static final java.util.regex.Pattern <B>AMBIGUOUS_AA</B></PRE>\r
373 <DL>\r
374 <DD>Same as AA pattern but with two additional letters - XU\r
375 <P>\r
376 <DL>\r
377 </DL>\r
378 </DL>\r
379 <HR>\r
380 \r
381 <A NAME="NUCLEOTIDE"><!-- --></A><H3>\r
382 NUCLEOTIDE</H3>\r
383 <PRE>\r
384 public static final java.util.regex.Pattern <B>NUCLEOTIDE</B></PRE>\r
385 <DL>\r
386 <DD>Nucleotides a, t, g, c, u\r
387 <P>\r
388 <DL>\r
389 </DL>\r
390 </DL>\r
391 <HR>\r
392 \r
393 <A NAME="AMBIGUOUS_NUCLEOTIDE"><!-- --></A><H3>\r
394 AMBIGUOUS_NUCLEOTIDE</H3>\r
395 <PRE>\r
396 public static final java.util.regex.Pattern <B>AMBIGUOUS_NUCLEOTIDE</B></PRE>\r
397 <DL>\r
398 <DD>Ambiguous nucleotide\r
399 <P>\r
400 <DL>\r
401 </DL>\r
402 </DL>\r
403 <HR>\r
404 \r
405 <A NAME="NON_NUCLEOTIDE"><!-- --></A><H3>\r
406 NON_NUCLEOTIDE</H3>\r
407 <PRE>\r
408 public static final java.util.regex.Pattern <B>NON_NUCLEOTIDE</B></PRE>\r
409 <DL>\r
410 <DD>Non nucleotide\r
411 <P>\r
412 <DL>\r
413 </DL>\r
414 </DL>\r
415 \r
416 <!-- ============ METHOD DETAIL ========== -->\r
417 \r
418 <A NAME="method_detail"><!-- --></A>\r
419 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
420 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
421 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">\r
422 <B>Method Detail</B></FONT></TH>\r
423 </TR>\r
424 </TABLE>\r
425 \r
426 <A NAME="isNucleotideSequence(compbio.data.sequence.FastaSequence)"><!-- --></A><H3>\r
427 isNucleotideSequence</H3>\r
428 <PRE>\r
429 public static boolean <B>isNucleotideSequence</B>(<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&nbsp;s)</PRE>\r
430 <DL>\r
431 <DD><DL>\r
432 \r
433 <DT><B>Returns:</B><DD>true is the sequence contains only letters a,c, t, g, u</DL>\r
434 </DD>\r
435 </DL>\r
436 <HR>\r
437 \r
438 <A NAME="isNonAmbNucleotideSequence(java.lang.String)"><!-- --></A><H3>\r
439 isNonAmbNucleotideSequence</H3>\r
440 <PRE>\r
441 public static boolean <B>isNonAmbNucleotideSequence</B>(java.lang.String&nbsp;sequence)</PRE>\r
442 <DL>\r
443 <DD>Ambiguous DNA chars : AGTCRYMKSWHBVDN // differs from protein in only one
444  (!) - B char\r
445 <P>\r
446 <DD><DL>\r
447 </DL>\r
448 </DD>\r
449 </DL>\r
450 <HR>\r
451 \r
452 <A NAME="cleanSequence(java.lang.String)"><!-- --></A><H3>\r
453 cleanSequence</H3>\r
454 <PRE>\r
455 public static java.lang.String <B>cleanSequence</B>(java.lang.String&nbsp;sequence)</PRE>\r
456 <DL>\r
457 <DD>Removes all whitespace chars in the sequence string\r
458 <P>\r
459 <DD><DL>\r
460 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> - \r
461 <DT><B>Returns:</B><DD>cleaned up sequence</DL>\r
462 </DD>\r
463 </DL>\r
464 <HR>\r
465 \r
466 <A NAME="deepCleanSequence(java.lang.String)"><!-- --></A><H3>\r
467 deepCleanSequence</H3>\r
468 <PRE>\r
469 public static java.lang.String <B>deepCleanSequence</B>(java.lang.String&nbsp;sequence)</PRE>\r
470 <DL>\r
471 <DD>Removes all special characters and digits as well as whitespace chars
472  from the sequence\r
473 <P>\r
474 <DD><DL>\r
475 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> - \r
476 <DT><B>Returns:</B><DD>cleaned up sequence</DL>\r
477 </DD>\r
478 </DL>\r
479 <HR>\r
480 \r
481 <A NAME="isProteinSequence(java.lang.String)"><!-- --></A><H3>\r
482 isProteinSequence</H3>\r
483 <PRE>\r
484 public static boolean <B>isProteinSequence</B>(java.lang.String&nbsp;sequence)</PRE>\r
485 <DL>\r
486 <DD><DL>\r
487 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> - \r
488 <DT><B>Returns:</B><DD>true is the sequence is a protein sequence, false overwise</DL>\r
489 </DD>\r
490 </DL>\r
491 <HR>\r
492 \r
493 <A NAME="isAmbiguosProtein(java.lang.String)"><!-- --></A><H3>\r
494 isAmbiguosProtein</H3>\r
495 <PRE>\r
496 public static boolean <B>isAmbiguosProtein</B>(java.lang.String&nbsp;sequence)</PRE>\r
497 <DL>\r
498 <DD>Check whether the sequence confirms to amboguous protein sequence\r
499 <P>\r
500 <DD><DL>\r
501 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> - \r
502 <DT><B>Returns:</B><DD>return true only if the sequence if ambiguous protein sequence
503          Return false otherwise. e.g. if the sequence is non-ambiguous
504          protein or DNA</DL>\r
505 </DD>\r
506 </DL>\r
507 <HR>\r
508 \r
509 <A NAME="writeFasta(java.io.OutputStream, java.util.List, int)"><!-- --></A><H3>\r
510 writeFasta</H3>\r
511 <PRE>\r
512 public static void <B>writeFasta</B>(java.io.OutputStream&nbsp;outstream,\r
513                               java.util.List&lt;<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&gt;&nbsp;sequences,\r
514                               int&nbsp;width)\r
515                        throws java.io.IOException</PRE>\r
516 <DL>\r
517 <DD>Writes list of FastaSequeces into the outstream formatting the sequence
518  so that it contains width chars on each line\r
519 <P>\r
520 <DD><DL>\r
521 <DT><B>Parameters:</B><DD><CODE>outstream</CODE> - <DD><CODE>sequences</CODE> - <DD><CODE>width</CODE> - - the maximum number of characters to write in one line\r
522 <DT><B>Throws:</B>\r
523 <DD><CODE>java.io.IOException</CODE></DL>\r
524 </DD>\r
525 </DL>\r
526 <HR>\r
527 \r
528 <A NAME="readFasta(java.io.InputStream)"><!-- --></A><H3>\r
529 readFasta</H3>\r
530 <PRE>\r
531 public static java.util.List&lt;<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&gt; <B>readFasta</B>(java.io.InputStream&nbsp;inStream)\r
532                                                throws java.io.IOException</PRE>\r
533 <DL>\r
534 <DD>Reads fasta sequences from inStream into the list of FastaSequence
535  objects\r
536 <P>\r
537 <DD><DL>\r
538 <DT><B>Parameters:</B><DD><CODE>inStream</CODE> - from\r
539 <DT><B>Returns:</B><DD>list of FastaSequence objects\r
540 <DT><B>Throws:</B>\r
541 <DD><CODE>java.io.IOException</CODE></DL>\r
542 </DD>\r
543 </DL>\r
544 <HR>\r
545 \r
546 <A NAME="writeFasta(java.io.OutputStream, java.util.List)"><!-- --></A><H3>\r
547 writeFasta</H3>\r
548 <PRE>\r
549 public static void <B>writeFasta</B>(java.io.OutputStream&nbsp;os,\r
550                               java.util.List&lt;<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>&gt;&nbsp;sequences)\r
551                        throws java.io.IOException</PRE>\r
552 <DL>\r
553 <DD>Writes FastaSequence in the file, each sequence will take one line only\r
554 <P>\r
555 <DD><DL>\r
556 <DT><B>Parameters:</B><DD><CODE>os</CODE> - <DD><CODE>sequences</CODE> - \r
557 <DT><B>Throws:</B>\r
558 <DD><CODE>java.io.IOException</CODE></DL>\r
559 </DD>\r
560 </DL>\r
561 <!-- ========= END OF CLASS DATA ========= -->\r
562 <HR>\r
563 \r
564 \r
565 <!-- ======= START OF BOTTOM NAVBAR ====== -->\r
566 <A NAME="navbar_bottom"><!-- --></A>\r
567 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>\r
568 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">\r
569 <TR>\r
570 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">\r
571 <A NAME="navbar_bottom_firstrow"><!-- --></A>\r
572 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">\r
573   <TR ALIGN="center" VALIGN="top">\r
574   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>\r
575   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>\r
576   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>\r
577   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SequenceUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>\r
578   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>\r
579   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>\r
580   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>\r
581   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>\r
582   </TR>\r
583 </TABLE>\r
584 </TD>\r
585 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>\r
586 </EM>\r
587 </TD>\r
588 </TR>\r
589 \r
590 <TR>\r
591 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
592 &nbsp;<A HREF="../../../compbio/data/sequence/Program.html" title="enum in compbio.data.sequence"><B>PREV CLASS</B></A>&nbsp;\r
593 &nbsp;<A HREF="../../../compbio/data/sequence/UnknownFileFormatException.html" title="class in compbio.data.sequence"><B>NEXT CLASS</B></A></FONT></TD>\r
594 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
595   <A HREF="../../../index.html?compbio/data/sequence/SequenceUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;\r
596 &nbsp;<A HREF="SequenceUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;\r
597 &nbsp;<SCRIPT type="text/javascript">\r
598   <!--\r
599   if(window==top) {\r
600     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');\r
601   }\r
602   //-->\r
603 </SCRIPT>\r
604 <NOSCRIPT>\r
605   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>\r
606 </NOSCRIPT>\r
607 \r
608 \r
609 </FONT></TD>\r
610 </TR>\r
611 <TR>\r
612 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
613   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>\r
614 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
615 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>\r
616 </TR>\r
617 </TABLE>\r
618 <A NAME="skip-navbar_bottom"></A>\r
619 <!-- ======== END OF BOTTOM NAVBAR ======= -->\r
620 \r
621 <HR>\r
622 \r
623 </BODY>\r
624 </HTML>\r