public class Header extends Object implements Cloneable, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Header.DatabaseType
A list of the database types.
|
Modifier and Type | Method and Description |
---|---|
void |
addAddendum(String aAddendum)
This method allows the addition of an addendum to the list.
|
Object |
clone()
This method provides a deep copy of the Header instance.
|
String |
getAbbreviatedFASTAHeader()
This method returns an abbreviated version of the Header, suitable for
inclusion in FASTA formatted files.
|
String |
getAbbreviatedFASTAHeader(String decoyTag)
This method returns an abbreviated version of the Header, suitable for
inclusion in FASTA formatted files.
|
String |
getAbbreviatedFASTAHeaderWithAddenda()
This method returns an abbreviated version of the Header, suitable for
inclusion in FASTA formatted files.
|
String |
getAccession() |
String |
getAccessionOrRest()
Returns the accession or if this is null the rest.
|
String |
getAddenda()
This method allows the caller to retrieve all addenda for the current
header, or 'null' if there aren't any.
|
String |
getCoreHeader()
This method reports on the core information for the header, which is
comprised of the ID and the accession String:
|
Header.DatabaseType |
getDatabaseType() |
static String |
getDatabaseTypeAsString(Header.DatabaseType databaseType)
Convenience method returning the database name as a String.
|
static String[] |
getDatabaseTypesAsString()
Returns the implemented database types as an array of String.
|
String |
getDescription() |
String |
getDescriptionProteinName() |
String |
getDescriptionShort() |
int |
getEndLocation()
This method reports on the end index of the header.
|
String |
getForeignAccession() |
String |
getForeignDescription() |
String |
getForeignID() |
String |
getFullHeaderWithAddenda()
This method reports on the full header, with the addenda (if present).
|
String |
getGeneName() |
String |
getID() |
static String |
getProteinEvidencAsString(Integer type)
Return the Uniprot protein evidence type as text.
|
String |
getProteinEvidence() |
String |
getRawHeader() |
String |
getRest() |
int |
getScore()
This method will attribute a score to the current header, based on the
following scoring list: SwissProt : 4 IPI, SwissProt
reference : 3 IPI, TrEMBL or REFSEQ_NP reference : 2
IPI, without SwissProt, TrEMBL or REFSEQ_NP reference : 1
NCBI, SwissProt reference : 2 NCBI, other reference : 1
Unknown header format : 0
|
String |
getSimpleProteinDescription()
Returns a simplified protein description for a UniProt header.
|
int |
getStartLocation()
This method reports on the start index of the header.
|
String |
getTaxonomy() |
boolean |
hasAddenda()
This method reports on the presence of addenda for this header.
|
static Header |
parseFromFASTA(String aFASTAHeader)
Factory method that constructs a Header instance based on a FASTA header
line.
|
void |
setAccession(String aAccession) |
void |
setDatabaseType(Header.DatabaseType aDatabaseType) |
void |
setDescription(String aDescription) |
void |
setDescriptionProteinName(String aDescriptionProteinName) |
void |
setDescriptionShort(String aDescriptionShort) |
void |
setForeignAccession(String aForeignAccession) |
void |
setForeignDescription(String aForeignDescription) |
void |
setForeignID(String aForeignID) |
void |
setGeneName(String aGeneName) |
void |
setID(String aID) |
void |
setLocation(int aStart,
int aEnd)
This method allows the caller to add information to the header about
location of the sequence in a certain master sequence.
|
void |
setProteinEvidence(String aProteinEvidence) |
void |
setRawHeader(String aRawHeader) |
void |
setRest(String aRest) |
void |
setTaxonomy(String aTaxonomy) |
String |
toString()
This method reports on the entire processed(!) header.
|
String |
toString(String decoyTag)
This method reports on the entire processed(!) header, with the given
decoy tag added.
|
public static Header parseFromFASTA(String aFASTAHeader) throws StringIndexOutOfBoundsException
aFASTAHeader
- the String with the original FASTA header line.StringIndexOutOfBoundsException
- thrown if issues occur during the
parsingpublic String getID()
public void setID(String aID)
public String getForeignID()
public void setForeignID(String aForeignID)
public String getAccession()
public void setAccession(String aAccession)
public String getAccessionOrRest()
public Header.DatabaseType getDatabaseType()
public void setDatabaseType(Header.DatabaseType aDatabaseType)
public String getForeignAccession()
public void setForeignAccession(String aForeignAccession)
public String getDescription()
public void setDescription(String aDescription)
public String getDescriptionShort()
public void setDescriptionShort(String aDescriptionShort)
public String getDescriptionProteinName()
public void setDescriptionProteinName(String aDescriptionProteinName)
public String getGeneName()
public void setGeneName(String aGeneName)
public String getProteinEvidence()
public void setProteinEvidence(String aProteinEvidence)
public String getTaxonomy()
public void setTaxonomy(String aTaxonomy)
public String getForeignDescription()
public void setForeignDescription(String aForeignDescription)
public String getRest()
public void setRest(String aRest)
public String getRawHeader()
public void setRawHeader(String aRawHeader)
public String getSimpleProteinDescription()
public String getAbbreviatedFASTAHeader()
public String getAbbreviatedFASTAHeader(String decoyTag)
decoyTag
- the decoy tag to addpublic String toString()
public String toString(String decoyTag)
decoyTag
- the decoy tag to addpublic int getScore()
public String getCoreHeader()
[ID]|[accession_string]This is mostly useful for appending this core as an addendum to another header.
public void addAddendum(String aAddendum)
aAddendum
- String with the addendum, facultatively preceded by
'^A'.public String getAddenda()
public boolean hasAddenda()
public String getFullHeaderWithAddenda()
public String getAbbreviatedFASTAHeaderWithAddenda()
public void setLocation(int aStart, int aEnd)
[id]|[accession_string] ([startindex]-[endindex])|...Please note the following:
aStart
- int with the startindex.aEnd
- int with the endindex.public int getStartLocation()
public int getEndLocation()
public Object clone()
public static String[] getDatabaseTypesAsString()
public static String getDatabaseTypeAsString(Header.DatabaseType databaseType)
databaseType
- the database typeCopyright © 2016. All rights reserved.