public final class SequenceUtil extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
AA
Valid Amino acids
|
static Pattern |
AMBIGUOUS_AA
Same as AA pattern but with one additional letters - X
|
static Pattern |
AMBIGUOUS_NUCLEOTIDE
Ambiguous nucleotide
|
static Pattern |
DIGIT
A digit
|
static Pattern |
NON_AA
inversion of AA pattern
|
static Pattern |
NON_NUCLEOTIDE
Non nucleotide
|
static Pattern |
NONWORD
Non word
|
static Pattern |
NUCLEOTIDE
Nucleotides a, t, g, c, u
|
static Pattern |
WHITE_SPACE
A whitespace character: [\t\n\x0B\f\r]
|
Modifier and Type | Method and Description |
---|---|
static String |
cleanSequence(String sequence)
Removes all whitespace chars in the sequence string
|
static String |
deepCleanSequence(String sequence)
Removes all special characters and digits as well as whitespace chars
from the sequence
|
static boolean |
isAmbiguosProtein(String sequence)
Check whether the sequence confirms to amboguous protein sequence
|
static boolean |
isNonAmbNucleotideSequence(String sequence)
Ambiguous DNA chars : AGTCRYMKSWHBVDN // differs from protein in only one
(!)
|
static boolean |
isNucleotideSequence(FastaSequence s) |
static boolean |
isProteinSequence(String sequence) |
static List<FastaSequence> |
readFasta(InputStream inStream)
Reads fasta sequences from inStream into the list of FastaSequence
objects
|
static void |
writeFasta(OutputStream os,
List<FastaSequence> sequences)
Writes FastaSequence in the file, each sequence will take one line only
|
static void |
writeFasta(OutputStream outstream,
List<FastaSequence> sequences,
int width)
Writes list of FastaSequeces into the outstream formatting the sequence
so that it contains width chars on each line
|
public static final Pattern WHITE_SPACE
public static final Pattern AMBIGUOUS_AA
public static final Pattern NUCLEOTIDE
public static final Pattern AMBIGUOUS_NUCLEOTIDE
public static final Pattern NON_NUCLEOTIDE
public static boolean isNucleotideSequence(FastaSequence s)
public static boolean isNonAmbNucleotideSequence(String sequence)
public static String cleanSequence(String sequence)
sequence
- public static String deepCleanSequence(String sequence)
sequence
- public static boolean isProteinSequence(String sequence)
sequence
- public static boolean isAmbiguosProtein(String sequence)
sequence
- public static void writeFasta(OutputStream outstream, List<FastaSequence> sequences, int width) throws IOException
outstream
- sequences
- width
- - the maximum number of characters to write in one lineIOException
public static List<FastaSequence> readFasta(InputStream inStream) throws IOException
inStream
- fromIOException
public static void writeFasta(OutputStream os, List<FastaSequence> sequences) throws IOException
os
- sequences
- IOException
Copyright © 2000–2018 BioJava. All rights reserved.