Package org.biojava.nbio.data.sequence
Class FastaSequence
java.lang.Object
org.biojava.nbio.data.sequence.FastaSequence
- All Implemented Interfaces:
 Comparable<FastaSequence>
A FASTA formatted sequence. Please note that this class does not make any
 assumptions as to what sequence it store e.g. it could be nucleotide, protein
 or even gapped alignment sequence! The only guarantee it makes is that the
 sequence does not contain white space characters e.g. spaces, new lines etc
- Since:
 - 3.0.2
 - Version:
 - 1.0
 - Author:
 - pvtroshin
 
- 
Constructor Summary
ConstructorsConstructorDescriptionFastaSequence(String id, String sequence) Upon construction the any whitespace characters are removed from the sequence - 
Method Summary
Modifier and TypeMethodDescriptionintstatic intcountMatchesInSequence(String theString, String theRegExp) booleangetFormatedSequence(int width) Format sequence per width letter in one string.getId()Gets the value of idintGets the value of sequenceinthashCode()toString()Same as oneLineFasta 
- 
Constructor Details
- 
FastaSequence
Upon construction the any whitespace characters are removed from the sequence- Parameters:
 id-sequence-
 
 - 
 - 
Method Details
- 
getId
Gets the value of id- Returns:
 - the value of id
 
 - 
getSequence
Gets the value of sequence- Returns:
 - the value of sequence
 
 - 
countMatchesInSequence
 - 
getFormattedFasta
 - 
getOnelineFasta
- Returns:
 - one line name, next line sequence, no matter what the sequence length is
 
 - 
getFormatedSequence
Format sequence per width letter in one string. Without spaces.- Returns:
 - multiple line formated sequence, one line width letters length
 
 - 
getLength
- Returns:
 - sequence length
 
 - 
toString
Same as oneLineFasta - 
hashCode
 - 
equals
 - 
compareTo
- Specified by:
 compareToin interfaceComparable<FastaSequence>
 
 -