Class MinimalProteinEnricher
- java.lang.Object
-
- psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher<T>
-
- psidev.psi.mi.jami.enricher.impl.AbstractInteractorEnricher<Protein>
-
- psidev.psi.mi.jami.enricher.impl.minimal.MinimalProteinEnricher
-
- All Implemented Interfaces:
InteractorEnricher<Protein>
,MIEnricher<Protein>
,ProteinEnricher
- Direct Known Subclasses:
FullProteinEnricher
public class MinimalProteinEnricher extends AbstractInteractorEnricher<Protein> implements ProteinEnricher
Enriches a protein to the minimum level. As an enricher, no data will be overwritten in the protein being enriched. See description of minimal enrichment in AbstractInteractorEnricher If the protein remapper is not null and the enricher cannot find a uniprot identifier, it will remap to uniprot using the proteinMapper. In case of dead uniprot entries, it will move the dead uniprot identifier to the xrefs and add a caution in the annotations. If the remapping is successfull, it will remove any cautions left because of dead entry and set the uniprot identifier of the protein The protein fetcher is require to enrich proteins- Since:
- 14/05/13
- Author:
- Gabriel Aldam (galdam@ebi.ac.uk)
-
-
Field Summary
Fields Modifier and Type Field Description static String
CAUTION_MESSAGE
ConstantCAUTION_MESSAGE="This sequence has been withdrawn from U"{trunked}
-
Constructor Summary
Constructors Constructor Description MinimalProteinEnricher(ProteinFetcher fetcher)
The only constructor, fulfilling the requirement of a protein fetcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEnrichInteractor(Protein entityToEnrich, Protein fetchedEntity)
canEnrichInteractor.Protein
find(Protein proteinToEnrich)
find.ProteinFetcher
getInteractorFetcher()
The fetcher to be used for used to collect data.ProteinMapper
getProteinMapper()
The protein remapper has no default and can be left nullprotected boolean
isFullEnrichment()
isFullEnrichment.protected void
onCompletedEnrichment(Protein objectToEnrich)
onCompletedEnrichment.protected void
onEnrichedVersionNotFound(Protein objectToEnrich)
onEnrichedVersionNotFound.protected void
onInteractorCheckFailure(Protein objectToEnrich, Protein fetchedObject)
onInteractorCheckFailure.protected void
processDeadUniprotIdentity(Protein proteinToEnrich, Xref uniprotIdentity)
processDeadUniprotIdentity.protected boolean
remapProtein(Protein proteinToEnrich)
Attempts to remap the protein using the provided proteinRemapper.void
setProteinMapper(ProteinMapper proteinMapper)
setProteinMapper.-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.AbstractInteractorEnricher
enrich, getCvTermEnricher, getListener, getOrganismEnricher, getRetryCount, processAliases, processAnnotations, processChecksums, processFullName, processIdentifiers, processInteractorType, processInteractorType, processOrganism, processOrganism, processOtherProperties, processShortLabel, processXrefs, setCvTermEnricher, setListener, setOrganismEnricher, setRetryCount
-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher
enrich, enrich
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface psidev.psi.mi.jami.enricher.InteractorEnricher
getCvTermEnricher, getListener, getOrganismEnricher, setCvTermEnricher, setListener, setOrganismEnricher
-
Methods inherited from interface psidev.psi.mi.jami.enricher.MIEnricher
enrich, enrich, enrich
-
-
-
-
Field Detail
-
CAUTION_MESSAGE
public static final String CAUTION_MESSAGE
ConstantCAUTION_MESSAGE="This sequence has been withdrawn from U"{trunked}
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MinimalProteinEnricher
public MinimalProteinEnricher(ProteinFetcher fetcher)
The only constructor, fulfilling the requirement of a protein fetcher. If the protein fetcher is null, an illegal state exception will be thrown at the next enrichment.- Parameters:
fetcher
- The fetcher used to collect protein records.
-
-
Method Detail
-
getInteractorFetcher
public ProteinFetcher getInteractorFetcher()
The fetcher to be used for used to collect data.- Specified by:
getInteractorFetcher
in interfaceInteractorEnricher<Protein>
- Overrides:
getInteractorFetcher
in classAbstractInteractorEnricher<Protein>
- Returns:
- The fetcher which is currently being used for fetching.
-
setProteinMapper
public void setProteinMapper(ProteinMapper proteinMapper)
setProteinMapper.
The protein mapper to be used when a protein doesn't have a uniprot id or the uniprotID is dead.- Specified by:
setProteinMapper
in interfaceProteinEnricher
- Parameters:
proteinMapper
- aProteinMapper
object.
-
getProteinMapper
public ProteinMapper getProteinMapper()
The protein remapper has no default and can be left null- Specified by:
getProteinMapper
in interfaceProteinEnricher
- Returns:
- The current remapper.
-
find
public Protein find(Protein proteinToEnrich) throws EnricherException
find.
- Specified by:
find
in classAbstractInteractorEnricher<Protein>
- Parameters:
proteinToEnrich
- a T object.- Returns:
- a T object.
- Throws:
EnricherException
- if any.
-
onEnrichedVersionNotFound
protected void onEnrichedVersionNotFound(Protein objectToEnrich) throws EnricherException
onEnrichedVersionNotFound.
- Overrides:
onEnrichedVersionNotFound
in classAbstractInteractorEnricher<Protein>
- Parameters:
objectToEnrich
- a T object.- Throws:
EnricherException
- if any.
-
isFullEnrichment
protected boolean isFullEnrichment()
isFullEnrichment.
- Specified by:
isFullEnrichment
in classAbstractInteractorEnricher<Protein>
- Returns:
- a boolean.
-
onCompletedEnrichment
protected void onCompletedEnrichment(Protein objectToEnrich)
onCompletedEnrichment.
- Specified by:
onCompletedEnrichment
in classAbstractInteractorEnricher<Protein>
- Parameters:
objectToEnrich
- a T object.
-
onInteractorCheckFailure
protected void onInteractorCheckFailure(Protein objectToEnrich, Protein fetchedObject) throws EnricherException
onInteractorCheckFailure.
- Specified by:
onInteractorCheckFailure
in classAbstractInteractorEnricher<Protein>
- Parameters:
objectToEnrich
- a T object.fetchedObject
- a T object.- Throws:
EnricherException
- if any.
-
canEnrichInteractor
protected boolean canEnrichInteractor(Protein entityToEnrich, Protein fetchedEntity) throws EnricherException
canEnrichInteractor.
- Overrides:
canEnrichInteractor
in classAbstractInteractorEnricher<Protein>
- Parameters:
entityToEnrich
- a T object.fetchedEntity
- a T object.- Returns:
- a boolean.
- Throws:
EnricherException
- if any.
-
processDeadUniprotIdentity
protected void processDeadUniprotIdentity(Protein proteinToEnrich, Xref uniprotIdentity)
processDeadUniprotIdentity.
-
remapProtein
protected boolean remapProtein(Protein proteinToEnrich) throws EnricherException
Attempts to remap the protein using the provided proteinRemapper. If one has not been included, this method returns false and reports a failure to the listener. If after remapping, the protein still has no entry, this entry returns false.- Parameters:
proteinToEnrich
- The protein to find a remapping for.- Returns:
- Whether the remapping was successful.
- Throws:
EnricherException
- if any.
-
-