public class Protein extends Object implements SymbolSequence<AminoAcid>
| Modifier and Type | Class and Description |
|---|---|
static class |
Protein.Builder |
| Constructor and Description |
|---|
Protein(String accessionId,
AminoAcid... aas)
Create an instance from a list of AminoAcids
|
Protein(String accessionId,
String sequence)
Create an instance from a sequence string
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAccessionId() |
PeptideBuilder |
getPeptideBuilder(int fromInclusive,
int toExclusive)
Create a PeptideBuilder that has the sequence initialised by copying this Protein's amino acids starting at
fromInclusive to toExclusive. |
AminoAcid |
getSymbol(int index)
Returns the symbol at the specified position in this symbol sequence.
|
int |
hashCode() |
int |
size()
Returns the number of symbols in this symbol sequence.
|
String |
toString() |
String |
toSymbolString()
String containing the Symbols
|
public Protein(String accessionId, String sequence)
sequence - the string to create a Protein fromIllegalArgumentException - if the amino-acid sequence is invalidpublic String getAccessionId()
public PeptideBuilder getPeptideBuilder(int fromInclusive, int toExclusive)
fromInclusive to toExclusive.fromInclusive - from index proteintoExclusive - to index proteinpublic AminoAcid getSymbol(int index)
SymbolSequencegetSymbol in interface SymbolSequence<AminoAcid>index - index of the symbol to returnpublic String toSymbolString()
SymbolSequencetoSymbolString in interface SymbolSequence<AminoAcid>public int size()
SymbolSequencesize in interface SymbolSequence<AminoAcid>Copyright © 2016. All Rights Reserved.