1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.6.0_21) on Wed Nov 24 12:17:18 GMT 2010 -->
\r
10 <META NAME="date" CONTENT="2010-11-24">
\r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
\r
14 <SCRIPT type="text/javascript">
\r
15 function windowTitle()
\r
17 if (location.href.indexOf('is-external=true') == -1) {
\r
18 parent.document.title="SequenceUtil";
\r
27 <BODY BGCOLOR="white" onload="windowTitle();">
\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
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> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SequenceUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
\r
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
58 <A HREF="../../../compbio/data/sequence/Program.html" title="enum in compbio.data.sequence"><B>PREV CLASS</B></A>
\r
59 <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>
\r
62 <A HREF="SequenceUtil.html" target="_top"><B>NO FRAMES</B></A>
\r
63 <SCRIPT type="text/javascript">
\r
66 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
71 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
79 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
81 DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
84 <A NAME="skip-navbar_top"></A>
\r
85 <!-- ========= END OF TOP NAVBAR ========= -->
\r
88 <!-- ======== START OF CLASS DATA ======== -->
\r
91 compbio.data.sequence</FONT>
\r
93 Class SequenceUtil</H2>
\r
95 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
\r
96 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>compbio.data.sequence.SequenceUtil</B>
\r
100 <DT><PRE>public final class <B>SequenceUtil</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
\r
104 Utility class for operations on sequences
\r
109 <DT><B>Version:</B></DT>
\r
111 <DT><B>Author:</B></DT>
\r
112 <DD>Petr Troshin</DD>
\r
117 <!-- =========== FIELD SUMMARY =========== -->
\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
125 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
126 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
127 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
128 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#AA">AA</A></B></CODE>
\r
131 Valid Amino acids</TD>
\r
133 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
134 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
135 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
136 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#AMBIGUOUS_AA">AMBIGUOUS_AA</A></B></CODE>
\r
139 Same as AA pattern but with two additional letters - XU</TD>
\r
141 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
142 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
143 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
144 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#AMBIGUOUS_NUCLEOTIDE">AMBIGUOUS_NUCLEOTIDE</A></B></CODE>
\r
147 Ambiguous nucleotide</TD>
\r
149 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
150 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
151 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
152 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#DIGIT">DIGIT</A></B></CODE>
\r
155 A digit</TD>
\r
157 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
158 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
159 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
160 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NON_AA">NON_AA</A></B></CODE>
\r
163 inversion of AA pattern</TD>
\r
165 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
166 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
167 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
168 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NON_NUCLEOTIDE">NON_NUCLEOTIDE</A></B></CODE>
\r
171 Non nucleotide</TD>
\r
173 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
174 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
175 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
176 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NONWORD">NONWORD</A></B></CODE>
\r
179 Non word</TD>
\r
181 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
182 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
183 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
184 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#NUCLEOTIDE">NUCLEOTIDE</A></B></CODE>
\r
187 Nucleotides a, t, g, c, u</TD>
\r
189 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
190 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
191 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A></CODE></FONT></TD>
\r
192 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#WHITE_SPACE">WHITE_SPACE</A></B></CODE>
\r
195 A whitespace character: [\t\n\x0B\f\r]</TD>
\r
199 <!-- ========== METHOD SUMMARY =========== -->
\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
207 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
208 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
209 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
\r
210 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#cleanSequence(java.lang.String)">cleanSequence</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</CODE>
\r
213 Removes all whitespace chars in the sequence string</TD>
\r
215 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
216 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
217 <CODE>static void</CODE></FONT></TD>
\r
218 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#closeSilently(java.util.logging.Logger, java.io.Closeable)">closeSilently</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</A> log,
\r
219 <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A> stream)</CODE>
\r
222 Closes the Closable and logs the exception if any</TD>
\r
224 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
225 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
226 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
\r
227 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#deepCleanSequence(java.lang.String)">deepCleanSequence</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</CODE>
\r
230 Removes all special characters and digits as well as whitespace chars
231 from the sequence</TD>
\r
233 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
234 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
235 <CODE>static boolean</CODE></FONT></TD>
\r
236 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#isAmbiguosProtein(java.lang.String)">isAmbiguosProtein</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</CODE>
\r
239 Check whether the sequence confirms to amboguous protein sequence</TD>
\r
241 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
242 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
243 <CODE>static boolean</CODE></FONT></TD>
\r
244 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#isNonAmbNucleotideSequence(java.lang.String)">isNonAmbNucleotideSequence</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</CODE>
\r
247 Ambiguous DNA chars : AGTCRYMKSWHBVDN // differs from protein in only one
250 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
251 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
252 <CODE>static boolean</CODE></FONT></TD>
\r
253 <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> s)</CODE>
\r
256 </TD>
\r
258 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
259 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
260 <CODE>static boolean</CODE></FONT></TD>
\r
261 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#isProteinSequence(java.lang.String)">isProteinSequence</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</CODE>
\r
264 </TD>
\r
266 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
267 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
268 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>></CODE></FONT></TD>
\r
269 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#readFasta(java.io.InputStream)">readFasta</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> inStream)</CODE>
\r
272 Reads fasta sequences from inStream into the list of FastaSequence
275 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
276 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
277 <CODE>static void</CODE></FONT></TD>
\r
278 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#writeFasta(java.io.OutputStream, java.util.List)">writeFasta</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os,
\r
279 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> sequences)</CODE>
\r
282 Writes FastaSequence in the file, each sequence will take one line only</TD>
\r
284 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
285 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
286 <CODE>static void</CODE></FONT></TD>
\r
287 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#writeFasta(java.io.OutputStream, java.util.List, int)">writeFasta</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> outstream,
\r
288 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> sequences,
\r
289 int width)</CODE>
\r
292 Writes list of FastaSequeces into the outstream formatting the sequence
293 so that it contains width chars on each line</TD>
\r
295 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
296 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
297 <CODE>static void</CODE></FONT></TD>
\r
298 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#writeFastaKeepTheStream(java.io.OutputStream, java.util.List, int)">writeFastaKeepTheStream</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> outstream,
\r
299 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> sequences,
\r
300 int width)</CODE>
\r
303 </TD>
\r
306 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
\r
307 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
308 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
309 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
\r
311 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
312 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
\r
318 <!-- ============ FIELD DETAIL =========== -->
\r
320 <A NAME="field_detail"><!-- --></A>
\r
321 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
322 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
323 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
324 <B>Field Detail</B></FONT></TH>
\r
328 <A NAME="WHITE_SPACE"><!-- --></A><H3>
\r
331 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>WHITE_SPACE</B></PRE>
\r
333 <DD>A whitespace character: [\t\n\x0B\f\r]
\r
340 <A NAME="DIGIT"><!-- --></A><H3>
\r
343 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>DIGIT</B></PRE>
\r
352 <A NAME="NONWORD"><!-- --></A><H3>
\r
355 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>NONWORD</B></PRE>
\r
364 <A NAME="AA"><!-- --></A><H3>
\r
367 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>AA</B></PRE>
\r
369 <DD>Valid Amino acids
\r
376 <A NAME="NON_AA"><!-- --></A><H3>
\r
379 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>NON_AA</B></PRE>
\r
381 <DD>inversion of AA pattern
\r
388 <A NAME="AMBIGUOUS_AA"><!-- --></A><H3>
\r
391 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>AMBIGUOUS_AA</B></PRE>
\r
393 <DD>Same as AA pattern but with two additional letters - XU
\r
400 <A NAME="NUCLEOTIDE"><!-- --></A><H3>
\r
403 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>NUCLEOTIDE</B></PRE>
\r
405 <DD>Nucleotides a, t, g, c, u
\r
412 <A NAME="AMBIGUOUS_NUCLEOTIDE"><!-- --></A><H3>
\r
413 AMBIGUOUS_NUCLEOTIDE</H3>
\r
415 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>AMBIGUOUS_NUCLEOTIDE</B></PRE>
\r
417 <DD>Ambiguous nucleotide
\r
424 <A NAME="NON_NUCLEOTIDE"><!-- --></A><H3>
\r
425 NON_NUCLEOTIDE</H3>
\r
427 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</A> <B>NON_NUCLEOTIDE</B></PRE>
\r
435 <!-- ============ METHOD DETAIL ========== -->
\r
437 <A NAME="method_detail"><!-- --></A>
\r
438 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
439 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
440 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
441 <B>Method Detail</B></FONT></TH>
\r
445 <A NAME="isNucleotideSequence(compbio.data.sequence.FastaSequence)"><!-- --></A><H3>
\r
446 isNucleotideSequence</H3>
\r
448 public static boolean <B>isNucleotideSequence</B>(<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A> s)</PRE>
\r
452 <DT><B>Returns:</B><DD>true is the sequence contains only letters a,c, t, g, u</DL>
\r
457 <A NAME="isNonAmbNucleotideSequence(java.lang.String)"><!-- --></A><H3>
\r
458 isNonAmbNucleotideSequence</H3>
\r
460 public static boolean <B>isNonAmbNucleotideSequence</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</PRE>
\r
462 <DD>Ambiguous DNA chars : AGTCRYMKSWHBVDN // differs from protein in only one
471 <A NAME="cleanSequence(java.lang.String)"><!-- --></A><H3>
\r
474 public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>cleanSequence</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</PRE>
\r
476 <DD>Removes all whitespace chars in the sequence string
\r
479 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
480 <DT><B>Returns:</B><DD>cleaned up sequence</DL>
\r
485 <A NAME="deepCleanSequence(java.lang.String)"><!-- --></A><H3>
\r
486 deepCleanSequence</H3>
\r
488 public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>deepCleanSequence</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</PRE>
\r
490 <DD>Removes all special characters and digits as well as whitespace chars
494 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
495 <DT><B>Returns:</B><DD>cleaned up sequence</DL>
\r
500 <A NAME="isProteinSequence(java.lang.String)"><!-- --></A><H3>
\r
501 isProteinSequence</H3>
\r
503 public static boolean <B>isProteinSequence</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</PRE>
\r
506 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
507 <DT><B>Returns:</B><DD>true is the sequence is a protein sequence, false overwise</DL>
\r
512 <A NAME="isAmbiguosProtein(java.lang.String)"><!-- --></A><H3>
\r
513 isAmbiguosProtein</H3>
\r
515 public static boolean <B>isAmbiguosProtein</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> sequence)</PRE>
\r
517 <DD>Check whether the sequence confirms to amboguous protein sequence
\r
520 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
521 <DT><B>Returns:</B><DD>return true only if the sequence if ambiguous protein sequence
522 Return false otherwise. e.g. if the sequence is non-ambiguous
523 protein or DNA</DL>
\r
528 <A NAME="writeFasta(java.io.OutputStream, java.util.List, int)"><!-- --></A><H3>
\r
531 public static void <B>writeFasta</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> outstream,
\r
532 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> sequences,
\r
534 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
\r
536 <DD>Writes list of FastaSequeces into the outstream formatting the sequence
537 so that it contains width chars on each line
\r
540 <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
542 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
\r
547 <A NAME="writeFastaKeepTheStream(java.io.OutputStream, java.util.List, int)"><!-- --></A><H3>
\r
548 writeFastaKeepTheStream</H3>
\r
550 public static void <B>writeFastaKeepTheStream</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> outstream,
\r
551 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> sequences,
\r
553 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
\r
558 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
\r
563 <A NAME="readFasta(java.io.InputStream)"><!-- --></A><H3>
\r
566 public static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> <B>readFasta</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> inStream)
\r
567 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
\r
569 <DD>Reads fasta sequences from inStream into the list of FastaSequence
573 <DT><B>Parameters:</B><DD><CODE>inStream</CODE> - from
\r
574 <DT><B>Returns:</B><DD>list of FastaSequence objects
\r
576 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
\r
581 <A NAME="writeFasta(java.io.OutputStream, java.util.List)"><!-- --></A><H3>
\r
584 public static void <B>writeFasta</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os,
\r
585 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> sequences)
\r
586 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
\r
588 <DD>Writes FastaSequence in the file, each sequence will take one line only
\r
591 <DT><B>Parameters:</B><DD><CODE>os</CODE> - <DD><CODE>sequences</CODE> -
\r
593 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
\r
598 <A NAME="closeSilently(java.util.logging.Logger, java.io.Closeable)"><!-- --></A><H3>
\r
601 public static final void <B>closeSilently</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</A> log,
\r
602 <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A> stream)</PRE>
\r
604 <DD>Closes the Closable and logs the exception if any
\r
607 <DT><B>Parameters:</B><DD><CODE>log</CODE> - <DD><CODE>stream</CODE> - </DL>
\r
610 <!-- ========= END OF CLASS DATA ========= -->
\r
614 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
615 <A NAME="navbar_bottom"><!-- --></A>
\r
616 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
\r
617 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
619 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
620 <A NAME="navbar_bottom_firstrow"><!-- --></A>
\r
621 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
622 <TR ALIGN="center" VALIGN="top">
\r
623 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
624 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
625 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
626 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SequenceUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
\r
627 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
628 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
629 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
630 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
634 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
640 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
641 <A HREF="../../../compbio/data/sequence/Program.html" title="enum in compbio.data.sequence"><B>PREV CLASS</B></A>
\r
642 <A HREF="../../../compbio/data/sequence/UnknownFileFormatException.html" title="class in compbio.data.sequence"><B>NEXT CLASS</B></A></FONT></TD>
\r
643 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
644 <A HREF="../../../index.html?compbio/data/sequence/SequenceUtil.html" target="_top"><B>FRAMES</B></A>
\r
645 <A HREF="SequenceUtil.html" target="_top"><B>NO FRAMES</B></A>
\r
646 <SCRIPT type="text/javascript">
\r
649 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
654 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
661 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
662 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
663 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
664 DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
667 <A NAME="skip-navbar_bottom"></A>
\r
668 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r