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 Tue Dec 21 18:32:58 GMT 2010 -->
\r
10 <META NAME="date" CONTENT="2010-12-21">
\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/Score.html" title="class in compbio.data.sequence"><B>PREV CLASS</B></A>
\r
59 <A HREF="../../../compbio/data/sequence/SMERFSConstraints.html" title="enum 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/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A><<A HREF="../../../compbio/data/sequence/Score.html" title="class in compbio.data.sequence">Score</A>></CODE></FONT></TD>
\r
269 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#readAAConResults(java.io.InputStream)">readAAConResults</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> results)</CODE>
\r
272 Read AACon result with no alignment files.</TD>
\r
274 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
275 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
276 <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
277 <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
280 Reads fasta sequences from inStream into the list of FastaSequence
283 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
284 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
285 <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/AnnotatedSequence.html" title="class in compbio.data.sequence">AnnotatedSequence</A>></CODE></FONT></TD>
\r
286 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#readJRonn(java.io.File)">readJRonn</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> result)</CODE>
\r
289 </TD>
\r
291 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
292 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
293 <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/AnnotatedSequence.html" title="class in compbio.data.sequence">AnnotatedSequence</A>></CODE></FONT></TD>
\r
294 <TD><CODE><B><A HREF="../../../compbio/data/sequence/SequenceUtil.html#readJRonn(java.io.InputStream)">readJRonn</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
297 Reader for JRonn horizontal file format</TD>
\r
299 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
300 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
301 <CODE>static void</CODE></FONT></TD>
\r
302 <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
303 <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
306 Writes FastaSequence in the file, each sequence will take one line only</TD>
\r
308 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
309 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
310 <CODE>static void</CODE></FONT></TD>
\r
311 <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
312 <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
313 int width)</CODE>
\r
316 Writes list of FastaSequeces into the outstream formatting the sequence
317 so that it contains width chars on each line</TD>
\r
319 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
320 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
321 <CODE>static void</CODE></FONT></TD>
\r
322 <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
323 <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
324 int width)</CODE>
\r
327 </TD>
\r
330 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
\r
331 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
332 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
333 <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
335 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
336 <TD><CODE><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#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
342 <!-- ============ FIELD DETAIL =========== -->
\r
344 <A NAME="field_detail"><!-- --></A>
\r
345 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
346 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
347 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
348 <B>Field Detail</B></FONT></TH>
\r
352 <A NAME="WHITE_SPACE"><!-- --></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>WHITE_SPACE</B></PRE>
\r
357 <DD>A whitespace character: [\t\n\x0B\f\r]
\r
364 <A NAME="DIGIT"><!-- --></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>DIGIT</B></PRE>
\r
376 <A NAME="NONWORD"><!-- --></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>NONWORD</B></PRE>
\r
388 <A NAME="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>AA</B></PRE>
\r
393 <DD>Valid Amino acids
\r
400 <A NAME="NON_AA"><!-- --></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>NON_AA</B></PRE>
\r
405 <DD>inversion of AA pattern
\r
412 <A NAME="AMBIGUOUS_AA"><!-- --></A><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_AA</B></PRE>
\r
417 <DD>Same as AA pattern but with two additional letters - XU
\r
424 <A NAME="NUCLEOTIDE"><!-- --></A><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>NUCLEOTIDE</B></PRE>
\r
429 <DD>Nucleotides a, t, g, c, u
\r
436 <A NAME="AMBIGUOUS_NUCLEOTIDE"><!-- --></A><H3>
\r
437 AMBIGUOUS_NUCLEOTIDE</H3>
\r
439 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
441 <DD>Ambiguous nucleotide
\r
448 <A NAME="NON_NUCLEOTIDE"><!-- --></A><H3>
\r
449 NON_NUCLEOTIDE</H3>
\r
451 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
459 <!-- ============ METHOD DETAIL ========== -->
\r
461 <A NAME="method_detail"><!-- --></A>
\r
462 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
463 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
464 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
465 <B>Method Detail</B></FONT></TH>
\r
469 <A NAME="isNucleotideSequence(compbio.data.sequence.FastaSequence)"><!-- --></A><H3>
\r
470 isNucleotideSequence</H3>
\r
472 public static boolean <B>isNucleotideSequence</B>(<A HREF="../../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A> s)</PRE>
\r
476 <DT><B>Returns:</B><DD>true is the sequence contains only letters a,c, t, g, u</DL>
\r
481 <A NAME="isNonAmbNucleotideSequence(java.lang.String)"><!-- --></A><H3>
\r
482 isNonAmbNucleotideSequence</H3>
\r
484 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
486 <DD>Ambiguous DNA chars : AGTCRYMKSWHBVDN // differs from protein in only one
495 <A NAME="cleanSequence(java.lang.String)"><!-- --></A><H3>
\r
498 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
500 <DD>Removes all whitespace chars in the sequence string
\r
503 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
504 <DT><B>Returns:</B><DD>cleaned up sequence</DL>
\r
509 <A NAME="deepCleanSequence(java.lang.String)"><!-- --></A><H3>
\r
510 deepCleanSequence</H3>
\r
512 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
514 <DD>Removes all special characters and digits as well as whitespace chars
518 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
519 <DT><B>Returns:</B><DD>cleaned up sequence</DL>
\r
524 <A NAME="isProteinSequence(java.lang.String)"><!-- --></A><H3>
\r
525 isProteinSequence</H3>
\r
527 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
530 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
531 <DT><B>Returns:</B><DD>true is the sequence is a protein sequence, false overwise</DL>
\r
536 <A NAME="isAmbiguosProtein(java.lang.String)"><!-- --></A><H3>
\r
537 isAmbiguosProtein</H3>
\r
539 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
541 <DD>Check whether the sequence confirms to amboguous protein sequence
\r
544 <DT><B>Parameters:</B><DD><CODE>sequence</CODE> -
\r
545 <DT><B>Returns:</B><DD>return true only if the sequence if ambiguous protein sequence
546 Return false otherwise. e.g. if the sequence is non-ambiguous
547 protein or DNA</DL>
\r
552 <A NAME="writeFasta(java.io.OutputStream, java.util.List, int)"><!-- --></A><H3>
\r
555 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
556 <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
558 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
560 <DD>Writes list of FastaSequeces into the outstream formatting the sequence
561 so that it contains width chars on each line
\r
564 <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
566 <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
571 <A NAME="writeFastaKeepTheStream(java.io.OutputStream, java.util.List, int)"><!-- --></A><H3>
\r
572 writeFastaKeepTheStream</H3>
\r
574 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
575 <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
577 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
582 <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
587 <A NAME="readFasta(java.io.InputStream)"><!-- --></A><H3>
\r
590 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
591 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
593 <DD>Reads fasta sequences from inStream into the list of FastaSequence
597 <DT><B>Parameters:</B><DD><CODE>inStream</CODE> - from
\r
598 <DT><B>Returns:</B><DD>list of FastaSequence objects
\r
600 <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
605 <A NAME="writeFasta(java.io.OutputStream, java.util.List)"><!-- --></A><H3>
\r
608 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
609 <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
610 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
612 <DD>Writes FastaSequence in the file, each sequence will take one line only
\r
615 <DT><B>Parameters:</B><DD><CODE>os</CODE> - <DD><CODE>sequences</CODE> -
\r
617 <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
622 <A NAME="readJRonn(java.io.File)"><!-- --></A><H3>
\r
625 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/AnnotatedSequence.html" title="class in compbio.data.sequence">AnnotatedSequence</A>> <B>readJRonn</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> result)
\r
626 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>,
\r
627 <A HREF="../../../compbio/data/sequence/UnknownFileFormatException.html" title="class in compbio.data.sequence">UnknownFileFormatException</A></PRE>
\r
632 <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>
\r
633 <DD><CODE><A HREF="../../../compbio/data/sequence/UnknownFileFormatException.html" title="class in compbio.data.sequence">UnknownFileFormatException</A></CODE></DL>
\r
638 <A NAME="readJRonn(java.io.InputStream)"><!-- --></A><H3>
\r
641 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/AnnotatedSequence.html" title="class in compbio.data.sequence">AnnotatedSequence</A>> <B>readJRonn</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
642 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>,
\r
643 <A HREF="../../../compbio/data/sequence/UnknownFileFormatException.html" title="class in compbio.data.sequence">UnknownFileFormatException</A></PRE>
\r
645 <DD>Reader for JRonn horizontal file format
648 >Foobar M G D T T A G 0.48 0.42
649 0.42 0.48 0.52 0.53 0.54
652 Where all values are tab delimited
\r
655 <DT><B>Parameters:</B><DD><CODE>inStream</CODE> - the InputStream connected to the JRonn output file
\r
656 <DT><B>Returns:</B><DD>List of <A HREF="../../../compbio/data/sequence/AnnotatedSequence.html" title="class in compbio.data.sequence"><CODE>AnnotatedSequence</CODE></A> objects
\r
658 <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> - is thrown if the inStream has problems accessing the data
\r
659 <DD><CODE><A HREF="../../../compbio/data/sequence/UnknownFileFormatException.html" title="class in compbio.data.sequence">UnknownFileFormatException</A></CODE> - is thrown if the inStream represents an unknown source of
660 data, i.e. not a JRonn output</DL>
\r
665 <A NAME="closeSilently(java.util.logging.Logger, java.io.Closeable)"><!-- --></A><H3>
\r
668 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
669 <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
671 <DD>Closes the Closable and logs the exception if any
\r
674 <DT><B>Parameters:</B><DD><CODE>log</CODE> - <DD><CODE>stream</CODE> - </DL>
\r
679 <A NAME="readAAConResults(java.io.InputStream)"><!-- --></A><H3>
\r
680 readAAConResults</H3>
\r
682 public static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A><<A HREF="../../../compbio/data/sequence/Score.html" title="class in compbio.data.sequence">Score</A>> <B>readAAConResults</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> results)</PRE>
\r
684 <DD>Read AACon result with no alignment files. This method leaves incoming
685 the InputStream results open!
\r
688 <DT><B>Parameters:</B><DD><CODE>results</CODE> - output file of AAConservation
\r
689 <DT><B>Returns:</B><DD>Map with keys <A HREF="../../../compbio/data/sequence/ConservationMethod.html" title="enum in compbio.data.sequence"><CODE>ConservationMethod</CODE></A> -> float[]</DL>
\r
692 <!-- ========= END OF CLASS DATA ========= -->
\r
696 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
697 <A NAME="navbar_bottom"><!-- --></A>
\r
698 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
\r
699 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
701 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
702 <A NAME="navbar_bottom_firstrow"><!-- --></A>
\r
703 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
704 <TR ALIGN="center" VALIGN="top">
\r
705 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
706 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
707 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
708 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SequenceUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
\r
709 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
710 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
711 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
712 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
716 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
722 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
723 <A HREF="../../../compbio/data/sequence/Score.html" title="class in compbio.data.sequence"><B>PREV CLASS</B></A>
\r
724 <A HREF="../../../compbio/data/sequence/SMERFSConstraints.html" title="enum in compbio.data.sequence"><B>NEXT CLASS</B></A></FONT></TD>
\r
725 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
726 <A HREF="../../../index.html?compbio/data/sequence/SequenceUtil.html" target="_top"><B>FRAMES</B></A>
\r
727 <A HREF="SequenceUtil.html" target="_top"><B>NO FRAMES</B></A>
\r
728 <SCRIPT type="text/javascript">
\r
731 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
736 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
743 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
744 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
745 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
746 DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
749 <A NAME="skip-navbar_bottom"></A>
\r
750 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r