Class ParticipantUtils


  • public class ParticipantUtils
    extends Object
    Factory for participants
    Since:
    11/02/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • ParticipantUtils

        public ParticipantUtils()
    • Method Detail

      • createUnknownBasicParticipantEvidence

        public static ParticipantEvidence createUnknownBasicParticipantEvidence()

        createUnknownBasicParticipantEvidence

        Returns:
        a ParticipantEvidence object.
      • createUnknownBasicParticipant

        public static Participant createUnknownBasicParticipant()

        createUnknownBasicParticipant

        Returns:
        a Participant 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 - a ParticipantEvidence 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 - a ParticipantEvidence 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 - a Participant 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 - a Participant 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 - a Participant object.
        roleId - a String object.
        roleName - a String 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 - a ParticipantEvidence object.
        roleId - a String object.
        roleName - a String 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 - a ParticipantEvidence 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 - a Participant 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 - a Collection 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 - a Collection object.
        Returns:
        the best participant to use a s a bait in spoke expansion