Class UniprotProteinAPIClient
- java.lang.Object
-
- psidev.psi.mi.jami.bridges.uniprot.rest.UniprotProteinAPIClient
-
public class UniprotProteinAPIClient extends Object
Client for the Uniprot Protein API
-
-
Constructor Summary
Constructors Constructor Description UniprotProteinAPIClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getSwissprotIdsForAccession(String accession, String taxonId)Finds the list of swissProtIds for a provided ID and taxonIdList<String>getSwissprotIdsForSequence(String sequence, String taxonId)Finds the list of swissProtIds for a provided sequence and taxonIdList<String>getTremblIdsForAccession(String accession, String taxonId)Finds the list of termblIds for a provided ID and taxonIdList<String>getTremblIdsForSequence(String sequence, String taxonId)Finds the list of termblIds for a provided sequence and taxonIdList<Entry>getUniparcEntries(String accession, String taxonId)Gets the list of uniparcId matching this accession numberList<uk.ac.ebi.kraken.interfaces.uniparc.UniParcEntry>getUniparcEntryForAccession(String accession)Get the UniparcEntry with an accession numberStringgetUniparcIdFromSequence(String sequence, String taxonId)Gets the uniparcId matching this sequenceString[]getUniprotBestGuessFor(String accession, String taxonId)Get an Unique uniprot Id for this accessionList<uk.ac.ebi.kraken.interfaces.uniprot.UniProtEntry>getUniprotEntryForAccession(String accession)Get the UniprotEntry with its accession numberList<Entry>getUPEntriesForAccession(String accession, String taxonId, SearchDatabase... databases)Finds the list of UPEntries for a provided ID and organism from the provided list of databasesEntrygetUPEntriesForSequence(String sequence, String taxonId, SearchDatabase... databases)Get the Entry which matches the sequence and taxonId in the given databases
-
-
-
Field Detail
-
log
public static final Logger log
Sets up a logger for that class.
-
-
Method Detail
-
getSwissprotIdsForAccession
public List<String> getSwissprotIdsForAccession(String accession, String taxonId) throws UniprotProteinAPIClientException
Finds the list of swissProtIds for a provided ID and taxonId- Parameters:
accession- the accession to look fortaxonId- the organism of the protein- Returns:
- the swissprotIds if found, empty list otherwise
- Throws:
UniprotProteinAPIClientException- an exception if the given accession is null
-
getTremblIdsForAccession
public List<String> getTremblIdsForAccession(String accession, String taxonId) throws UniprotProteinAPIClientException
Finds the list of termblIds for a provided ID and taxonId- Parameters:
accession- the accession to look fortaxonId- the organism of the protein- Returns:
- the tremblId if found, empty list otherwise
- Throws:
UniprotProteinAPIClientException- an exception if the given accession is null
-
getUniparcEntries
public List<Entry> getUniparcEntries(String accession, String taxonId) throws UniprotProteinAPIClientException
Gets the list of uniparcId matching this accession number- Parameters:
accession- the accession to look fortaxonId- : the organism of the protein- Returns:
- the list of uniparc Id or empty list if the accession doesn't match any Uniparc sequence
- Throws:
UniprotProteinAPIClientException- an exception if the given accession is null
-
getUPEntriesForAccession
public List<Entry> getUPEntriesForAccession(String accession, String taxonId, SearchDatabase... databases) throws UniprotProteinAPIClientException
Finds the list of UPEntries for a provided ID and organism from the provided list of databases- Parameters:
accession- the accession to look fortaxonId- the organism of the proteindatabases- the databases to query- Returns:
- the uniprot ID if found, null otherwise
- Throws:
UniprotProteinAPIClientException- an exception if the given accession is null
-
getSwissprotIdsForSequence
public List<String> getSwissprotIdsForSequence(String sequence, String taxonId) throws UniprotProteinAPIClientException
Finds the list of swissProtIds for a provided sequence and taxonId- Parameters:
sequence- the sequence to look fortaxonId- the organism of the protein- Returns:
- the swissprotIds if found, empty list otherwise
- Throws:
UniprotProteinAPIClientException- an exception if the given sequence is null
-
getTremblIdsForSequence
public List<String> getTremblIdsForSequence(String sequence, String taxonId) throws UniprotProteinAPIClientException
Finds the list of termblIds for a provided sequence and taxonId- Parameters:
sequence- the sequence to look fortaxonId- the organism of the protein- Returns:
- the tremblId if found, empty list otherwise
- Throws:
UniprotProteinAPIClientException- an exception if the given sequence is null
-
getUniparcIdFromSequence
public String getUniparcIdFromSequence(String sequence, String taxonId) throws UniprotProteinAPIClientException
Gets the uniparcId matching this sequence- Parameters:
sequence- the sequence to look fortaxonId- the organism of the sequence- Returns:
- the uniparc Id or null if the sequence doesn't match any Uniparc sequence
- Throws:
UniprotProteinAPIClientException- an exception if the given sequence is null
-
getUPEntriesForSequence
public Entry getUPEntriesForSequence(String sequence, String taxonId, SearchDatabase... databases) throws UniprotProteinAPIClientException
Get the Entry which matches the sequence and taxonId in the given databases- Parameters:
sequence- sequence of the protein to retrievetaxonId- organism of the sequencedatabases- the databases to look into- Returns:
- an Entry instance matching the sequence, taxonId in the specific databases
- Throws:
UniprotProteinAPIClientException- if the given sequence is null
-
getUniprotEntryForAccession
public List<uk.ac.ebi.kraken.interfaces.uniprot.UniProtEntry> getUniprotEntryForAccession(String accession)
Get the UniprotEntry with its accession number- Parameters:
accession- the Uniprot identifier of the protein we want to retrieve- Returns:
- A list of UniprotEntry instances for this identifier
-
getUniparcEntryForAccession
public List<uk.ac.ebi.kraken.interfaces.uniparc.UniParcEntry> getUniparcEntryForAccession(String accession)
Get the UniparcEntry with an accession number- Parameters:
accession- the identifier of the protein we want to retrieve- Returns:
- a list of UniparcEntry instances for this accession
-
getUniprotBestGuessFor
public String[] getUniprotBestGuessFor(String accession, String taxonId) throws UniprotProteinAPIClientException
Get an Unique uniprot Id for this accession- Parameters:
accession- the accession to look attaxonId- the organism- Returns:
- an Unique uniprot Id
- Throws:
UniprotProteinAPIClientException- if the given accession is null
-
-