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()
Returns the accession.
|
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()
Returns the database type as inferred from the header structure.
|
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()
Returns the description.
|
String |
getDescriptionProteinName()
Returns the protein name as inferred from the description.
|
String |
getDescriptionShort()
Returns the short description.
|
int |
getEndLocation()
This method reports on the end index of the header.
|
String |
getForeignAccession()
Returns the foreign accession.
|
String |
getForeignDescription()
Returns the foreign description.
|
String |
getForeignID()
Returns the foreign ID.
|
String |
getFullHeaderWithAddenda()
This method reports on the full header, with the addenda (if present).
|
String |
getGeneName()
Returns the gene name.
|
String |
getID()
Returns the ID.
|
static String |
getProteinEvidencAsString(Integer type)
Return the UniProt protein evidence type as text.
|
String |
getProteinEvidence()
Returns the protein evidence level.
|
String |
getRawHeader()
Returns the entire header.
|
String |
getRest()
Returns the rest of the header.
|
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()
Returns the taxonomy.
|
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)
Sets the accession.
|
void |
setDatabaseType(Header.DatabaseType aDatabaseType)
Sets the database type.
|
void |
setDescription(String aDescription)
Sets the description.
|
void |
setDescriptionProteinName(String aDescriptionProteinName)
Sets the protein name.
|
void |
setDescriptionShort(String aDescriptionShort)
Sets the short description.
|
void |
setForeignAccession(String aForeignAccession)
Sets the foreign accession.
|
void |
setForeignDescription(String aForeignDescription)
Sets the foreign description.
|
void |
setForeignID(String aForeignID)
Sets the foreign ID.
|
void |
setGeneName(String aGeneName)
Set the gene name.
|
void |
setID(String aID)
Sets the ID.
|
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)
Sets the protein evidence level.
|
void |
setRawHeader(String aRawHeader)
Sets the entire header.
|
void |
setRest(String aRest)
Sets the rest of the header.
|
void |
setTaxonomy(String aTaxonomy)
Sets the taxonomy.
|
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)
aID
- the IDpublic String getForeignID()
public void setForeignID(String aForeignID)
aForeignID
- the foreign IDpublic String getAccession()
public void setAccession(String aAccession)
aAccession
- the accessionpublic String getAccessionOrRest()
public Header.DatabaseType getDatabaseType()
public void setDatabaseType(Header.DatabaseType aDatabaseType)
aDatabaseType
- the database typepublic String getForeignAccession()
public void setForeignAccession(String aForeignAccession)
aForeignAccession
- the foreign accessionpublic String getDescription()
public void setDescription(String aDescription)
aDescription
- the descriptionpublic String getDescriptionShort()
public void setDescriptionShort(String aDescriptionShort)
aDescriptionShort
- the short descriptionpublic String getDescriptionProteinName()
public void setDescriptionProteinName(String aDescriptionProteinName)
aDescriptionProteinName
- the protein namepublic String getGeneName()
public void setGeneName(String aGeneName)
aGeneName
- the gene namepublic String getProteinEvidence()
public void setProteinEvidence(String aProteinEvidence)
aProteinEvidence
- the protein evidence levelpublic String getTaxonomy()
public void setTaxonomy(String aTaxonomy)
aTaxonomy
- the taxonomypublic String getForeignDescription()
public void setForeignDescription(String aForeignDescription)
aForeignDescription
- the foreign descriptionpublic String getRest()
public void setRest(String aRest)
aRest
- the rest of the headerpublic String getRawHeader()
public void setRawHeader(String aRawHeader)
aRawHeader
- the entire headerpublic 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 © 2019. All rights reserved.