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 Participant
collectBestBaitParticipantForSpokeExpansion(Collection<? extends Participant> participants)
Collect the 'best bait' candidate to be used among this participants.static ParticipantEvidence
collectBestParticipantEvidenceAsBaitForSpokeExpansion(Collection<? extends ParticipantEvidence> participantEvidences)
Collect the 'best bait' candidate to be used among this participantEvidences.static ModelledParticipant
createBasicModelledParticipant()
createBasicModelledParticipantstatic Participant
createUnknownBasicParticipant()
createUnknownBasicParticipantstatic ParticipantEvidence
createUnknownBasicParticipantEvidence()
createUnknownBasicParticipantEvidencestatic boolean
doesParticipantHaveBiologicalRole(Participant participant, String roleId, String roleName)
To know if the participant does have a specific biological rolestatic boolean
doesParticipantHaveExperimentalRole(ParticipantEvidence participant, String roleId, String roleName)
To know if the participant evidence does have a specific experimental rolestatic 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.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.static boolean
isPutativeSelfParticipant(Participant p, boolean checkParticipantEvidence)
Method to know if a participant has a putative self biological role.static boolean
isPutativeSelfParticipantEvidence(ParticipantEvidence p)
Method to know if a participant evidence has a putative self experimental or biological rolestatic 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 rolestatic boolean
isSelfParticipantEvidence(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
ParticipantEvidence
object.
-
createUnknownBasicParticipant
public static Participant createUnknownBasicParticipant()
createUnknownBasicParticipant
- Returns:
- a
Participant
object.
-
createBasicModelledParticipant
public static ModelledParticipant createBasicModelledParticipant()
createBasicModelledParticipant
- Returns:
- a
ModelledParticipant
object.
-
isPutativeSelfParticipantEvidence
public static boolean isPutativeSelfParticipantEvidence(ParticipantEvidence p)
Method to know if a participant evidence has a putative self experimental or biological role- Parameters:
p
- aParticipantEvidence
object.- 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
- aParticipantEvidence
object.- 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
- aParticipant
object.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
- aParticipant
object.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
- aParticipant
object.roleId
- aString
object.roleName
- aString
object.- 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
- aParticipantEvidence
object.roleId
- aString
object.roleName
- aString
object.- 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
- aParticipantEvidence
object.- 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
- aParticipant
object.- 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
- aCollection
object.- 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
- aCollection
object.- Returns:
- the best participant to use a s a bait in spoke expansion
-
-