Package psidev.psi.mi.jami.utils
Class ParticipantUtils
- java.lang.Object
-
- psidev.psi.mi.jami.utils.ParticipantUtils
-
public class ParticipantUtils extends Object
Factory for participants- Since:
11/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ParticipantUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ParticipantcollectBestBaitParticipantForSpokeExpansion(Collection<? extends Participant> participants)Collect the 'best bait' candidate to be used among this participants.static ParticipantEvidencecollectBestParticipantEvidenceAsBaitForSpokeExpansion(Collection<? extends ParticipantEvidence> participantEvidences)Collect the 'best bait' candidate to be used among this participantEvidences.static ModelledParticipantcreateBasicModelledParticipant()createBasicModelledParticipantstatic ParticipantcreateUnknownBasicParticipant()createUnknownBasicParticipantstatic ParticipantEvidencecreateUnknownBasicParticipantEvidence()createUnknownBasicParticipantEvidencestatic booleandoesParticipantHaveBiologicalRole(Participant participant, String roleId, String roleName)To know if the participant does have a specific biological rolestatic booleandoesParticipantHaveExperimentalRole(ParticipantEvidence participant, String roleId, String roleName)To know if the participant evidence does have a specific experimental rolestatic booleanisParticipantAnAlternativeBaitForSpokeExpansion(Participant participant)Check if the biological role of this participant is an alternative bait for spoke expansion in case there are no baits: donor or enzyme.static booleanisParticipantEvidenceAnAlternativeBaitForSpokeExpansion(ParticipantEvidence participant)Check if the experimental role of this participant is an alternative bait for spoke expansion in case there are no baits: fluorescence donor or suppressor gene.static booleanisPutativeSelfParticipant(Participant p, boolean checkParticipantEvidence)Method to know if a participant has a putative self biological role.static booleanisPutativeSelfParticipantEvidence(ParticipantEvidence p)Method to know if a participant evidence has a putative self experimental or biological rolestatic booleanisSelfParticipant(Participant p, boolean checkParticipantEvidence)Method to know if a participant has a self biological role If checkParticipantEvidence is set to true, it will check if the given p is a ParticipantEvidence and look at the experimental rolestatic booleanisSelfParticipantEvidence(ParticipantEvidence p)Method to know if a participant evidence has a self experimental or biological role
-
-
-
Method Detail
-
createUnknownBasicParticipantEvidence
public static ParticipantEvidence createUnknownBasicParticipantEvidence()
createUnknownBasicParticipantEvidence
- Returns:
- a
ParticipantEvidenceobject.
-
createUnknownBasicParticipant
public static Participant createUnknownBasicParticipant()
createUnknownBasicParticipant
- Returns:
- a
Participantobject.
-
createBasicModelledParticipant
public static ModelledParticipant createBasicModelledParticipant()
createBasicModelledParticipant
- Returns:
- a
ModelledParticipantobject.
-
isPutativeSelfParticipantEvidence
public static boolean isPutativeSelfParticipantEvidence(ParticipantEvidence p)
Method to know if a participant evidence has a putative self experimental or biological role- Parameters:
p- aParticipantEvidenceobject.- Returns:
- a boolean.
-
isSelfParticipantEvidence
public static boolean isSelfParticipantEvidence(ParticipantEvidence p)
Method to know if a participant evidence has a self experimental or biological role- Parameters:
p- aParticipantEvidenceobject.- Returns:
- a boolean.
-
isPutativeSelfParticipant
public static boolean isPutativeSelfParticipant(Participant p, boolean checkParticipantEvidence)
Method to know if a participant has a putative self biological role. If checkParticipantEvidence is set to true, it will check if the given p is a ParticipantEvidence and look at the experimental role- Parameters:
p- aParticipantobject.checkParticipantEvidence- a boolean.- Returns:
- a boolean.
-
isSelfParticipant
public static boolean isSelfParticipant(Participant p, boolean checkParticipantEvidence)
Method to know if a participant has a self biological role If checkParticipantEvidence is set to true, it will check if the given p is a ParticipantEvidence and look at the experimental role- Parameters:
p- aParticipantobject.checkParticipantEvidence- a boolean.- Returns:
- a boolean.
-
doesParticipantHaveBiologicalRole
public static boolean doesParticipantHaveBiologicalRole(Participant participant, String roleId, String roleName)
To know if the participant does have a specific biological role- Parameters:
participant- aParticipantobject.roleId- aStringobject.roleName- aStringobject.- Returns:
- true if the participant has the biological role with given name/identifier
-
doesParticipantHaveExperimentalRole
public static boolean doesParticipantHaveExperimentalRole(ParticipantEvidence participant, String roleId, String roleName)
To know if the participant evidence does have a specific experimental role- Parameters:
participant- aParticipantEvidenceobject.roleId- aStringobject.roleName- aStringobject.- Returns:
- true if the participant has the experimental role with given name/identifier
-
isParticipantEvidenceAnAlternativeBaitForSpokeExpansion
public static boolean isParticipantEvidenceAnAlternativeBaitForSpokeExpansion(ParticipantEvidence participant)
Check if the experimental role of this participant is an alternative bait for spoke expansion in case there are no baits: fluorescence donor or suppressor gene.- Parameters:
participant- aParticipantEvidenceobject.- Returns:
- true if the participant can be used as an alternative bait for spoke expansion
-
isParticipantAnAlternativeBaitForSpokeExpansion
public static boolean isParticipantAnAlternativeBaitForSpokeExpansion(Participant participant)
Check if the biological role of this participant is an alternative bait for spoke expansion in case there are no baits: donor or enzyme.- Parameters:
participant- aParticipantobject.- Returns:
- true if the participant can be used as an alternative bait for spoke expansion
-
collectBestParticipantEvidenceAsBaitForSpokeExpansion
public static ParticipantEvidence collectBestParticipantEvidenceAsBaitForSpokeExpansion(Collection<? extends ParticipantEvidence> participantEvidences)
Collect the 'best bait' candidate to be used among this participantEvidences. - The first choice is the first participant with bait as experimental role - The second choice is the first participant having fluorescence donor or suppressor gene as experimental role - The third choice is the first participant having enzyme or donor as biological role - the last choice is the participant coming first in the alphabetical order (compare interactor shortname case insensitive)- Parameters:
participantEvidences- aCollectionobject.- Returns:
- the best participantEvidence to use a s a bait in spoke expansion
-
collectBestBaitParticipantForSpokeExpansion
public static Participant collectBestBaitParticipantForSpokeExpansion(Collection<? extends Participant> participants)
Collect the 'best bait' candidate to be used among this participants. - The first choice is the first participant having enzyme or donor as biological role - the last choice is the participant coming first in the alphabetical order (compare interactor shortname case insensitive)- Parameters:
participants- aCollectionobject.- Returns:
- the best participant to use a s a bait in spoke expansion
-
-