public class Protein extends Object
AASequenceImpl| Modifier and Type | Field and Description |
|---|---|
static int |
CTERMTRUNC
The code for an C-terminal truncation.
|
static int |
NTERMTRUNC
The code for an N-terminal truncation.
|
| Constructor and Description |
|---|
Protein(AASequenceImpl aSequence)
This constructor requires an AASequenceImpl as argument.
|
Protein(Header aHeader,
AASequenceImpl aSequence)
This constructor allows the passing of a Header, as well as an
AASequenceImpl for this Protein.
|
Protein(Header aHeader,
AASequenceImpl aSequence,
boolean aTruncated,
int aTruncationPosition)
This constructor allows the passing of a Header, as well as an
AASequenceImpl for this Protein.
|
Protein(String aFASTAString)
This constructor allows for the construction of a Protein instance
by passing a FASTA entry.
|
Protein(String aFASTAString,
boolean aTruncated,
int aTruncationPosition)
This constructor allows for the construction of a Protein instance
by passing a FASTA entry and boolean flag for truncation.
|
Protein(String aHeader,
String aSequence)
This constructor allows for the construction of a Protein instance through the
passing of a Header String and a Sequence String.
|
Protein(String aHeader,
String aSequence,
boolean aTruncated,
int aTruncationPosition)
This constructor allows for the construction of a Protein instance through the
passing of a Header String and a Sequence String.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
This method will check equality between this object
and another Protein instance.
|
Protein |
getCTermTruncatedProtein(int aSize)
This method truncates the sequence for this protein on the C-terminus
to the requested size.
|
Header |
getHeader()
This method reports on the header for the current
protein.
|
long |
getLength()
This method reports on the length of the sequence for the current protein.
|
double |
getMass()
This method returns the protein weight in Da.
|
Protein |
getNTermTruncatedProtein(int aSize)
This method truncates the sequence for this protein on the N-terminus
to the requested size.
|
AASequenceImpl |
getSequence()
This method reports on the sequence for the current
protein.
|
int |
getTruncationPosition()
This method reports on the position of the truncation.
|
boolean |
isTruncated()
This method reports on the 'truncatedness' of the protein.
|
void |
setHeader(Header aHeader)
Simple setter for the header.
|
void |
setSequence(AASequenceImpl aSequence)
Simple setter for the sequence.
|
void |
writeToFASTAFile(PrintWriter aOut)
This method can be used to append this protein to the
FASTA DB flatfile the PrintWriter points to.
|
public static final int NTERMTRUNC
public static final int CTERMTRUNC
public Protein(AASequenceImpl aSequence)
aSequence - AASequenceImpl around which this protein will be built.public Protein(Header aHeader, AASequenceImpl aSequence)
aHeader - Header with the header information for this Protein.aSequence - AASequenceImpl with the sequence for this Protein.public Protein(Header aHeader, AASequenceImpl aSequence, boolean aTruncated, int aTruncationPosition)
aHeader - Header with the header information for this Protein.aSequence - AASequenceImpl with the sequence for this Protein.aTruncated - boolean that indicates whether this Protein has been truncated.aTruncationPosition - int with the coded position for the truncation (N-Term or C-Term).public Protein(String aFASTAString)
aFASTAString - String with the FASTA representation of the Protein.public Protein(String aFASTAString, boolean aTruncated, int aTruncationPosition)
aFASTAString - String with the FASTA representation of the Protein.aTruncated - boolean that indicates whether this Protein has been truncated.aTruncationPosition - int with the coded position for the truncation (N-Term or C-Term).public Protein(String aHeader, String aSequence)
aHeader - String with the header (can be 'null').aSequence - String with the sequence.public Protein(String aHeader, String aSequence, boolean aTruncated, int aTruncationPosition)
aHeader - String with the header (can be 'null').aSequence - String with the sequence.aTruncated - boolean that indicates whether this Protein has been truncated.aTruncationPosition - int with the coded position for the truncation (N-Term or C-Term).public Header getHeader()
public AASequenceImpl getSequence()
public Protein getNTermTruncatedProtein(int aSize)
aSize - int with the size of the resulting N-terminal sequencepublic Protein getCTermTruncatedProtein(int aSize)
aSize - int with the size of the resulting C-terminal sequencepublic long getLength()
public double getMass()
public void setHeader(Header aHeader)
aHeader - the Header to set for this protein.public void setSequence(AASequenceImpl aSequence)
aSequence - the AASequenceImpl with the
sequence to set for this protein.public void writeToFASTAFile(PrintWriter aOut) throws IOException
aOut - PrintWriter to write the file to.IOException - when the writing failed.public boolean isTruncated()
public int getTruncationPosition()
Copyright © 2014. All rights reserved.