Package psidev.psi.mi.jami.utils
Class InteractionUtils
- java.lang.Object
-
- psidev.psi.mi.jami.utils.InteractionUtils
-
public class InteractionUtils extends Object
Factory for experimental interactions- Since:
11/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description InteractionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Annotation
collectComplexExpansionMethodFromAnnotations(Collection<? extends Annotation> annotations)
collectComplexExpansionMethodFromAnnotationsstatic BinaryInteractionEvidence
createAndAddNewSelfBinaryInteractionEvidence(InteractionEvidence interaction)
Creates a new BinaryInteractionEvidence from the given interactionEvidence which should only contain one participant with a stoichiometry >= 2 or participant stoichiometry null and participant is not self/putative self.static ModelledBinaryInteraction
createAndAddNewSelfModelledBinaryInteraction(ModelledInteraction interaction)
Creates a new ModelledBinaryInteraction from the given interaction which should only contain one participant with a stoichiometry >= 2 or participant stoichiometry null and participant is not self/putative self.static BinaryInteractionEvidence
createBinaryInteractionEvidenceFrom(InteractionEvidence interaction)
Create a BinaryInteractionEvidenceWrapper from the given interaction evidence which should contain not more than two participantsstatic BinaryInteraction
createBinaryInteractionFrom(Interaction interaction)
Create a BinaryInteractionWrapper from the given interaction which should contain not more than two participants.static InteractionEvidence
createEmptyBasicExperimentalInteraction()
createEmptyBasicExperimentalInteractionstatic ModelledBinaryInteraction
createModelledBinaryInteractionFrom(ModelledInteraction interaction)
Create a ModelledBinaryInteractionWrapper from the given modelled interaction which should contain not more than two participantsstatic BinaryInteraction
createNewSelfBinaryInteractionFrom(Interaction interaction)
Creates a new BinaryInteraction from the given interaction which should only contain one participant with a stoichiometry >= 2 or participant stoichiometry null and participant is not self/putative self.static Collection<Participant>
extractParticipantWithCausalRelationships(Interaction interaction)
This method can return all participants having causal relationships in an interactionstatic ComplexType
findInteractionCategoryOf(Interaction interaction, boolean checkExperimentalRoleIfInteractionEvidence)
The method will find the interactionCategory (binary, self, etc.)static ComplexType
findInteractionEvidenceCategoryOf(InteractionEvidence interaction)
The method will find the interactionCategory (binary, self, etc.)static ComplexType
findModelledInteractionCategoryOf(ModelledInteraction interaction)
The method will find the interactionCategory (binary, self, etc.)
-
-
-
Method Detail
-
createEmptyBasicExperimentalInteraction
public static InteractionEvidence createEmptyBasicExperimentalInteraction()
createEmptyBasicExperimentalInteraction
- Returns:
- a
InteractionEvidence
object.
-
findInteractionCategoryOf
public static ComplexType findInteractionCategoryOf(Interaction interaction, boolean checkExperimentalRoleIfInteractionEvidence)
The method will find the interactionCategory (binary, self, etc.)- Parameters:
interaction
- aInteraction
object.checkExperimentalRoleIfInteractionEvidence
- a boolean.- Returns:
- the ComplexType, null if the given interaction is null
-
findInteractionEvidenceCategoryOf
public static ComplexType findInteractionEvidenceCategoryOf(InteractionEvidence interaction)
The method will find the interactionCategory (binary, self, etc.)- Parameters:
interaction
- aInteractionEvidence
object.- Returns:
- the ComplexType, null if the given interaction is null
-
findModelledInteractionCategoryOf
public static ComplexType findModelledInteractionCategoryOf(ModelledInteraction interaction)
The method will find the interactionCategory (binary, self, etc.)- Parameters:
interaction
- aModelledInteraction
object.- Returns:
- the ComplexType, null if the given interaction is null
-
createBinaryInteractionFrom
public static BinaryInteraction createBinaryInteractionFrom(Interaction interaction)
Create a BinaryInteractionWrapper from the given interaction which should contain not more than two participants.- Parameters:
interaction
- aInteraction
object.- Returns:
- the new BinaryInteractionWrapper for this interaction
- Throws:
IllegalArgumentException
- if the interaction contains more than two participants or interaction is null
-
createBinaryInteractionEvidenceFrom
public static BinaryInteractionEvidence createBinaryInteractionEvidenceFrom(InteractionEvidence interaction)
Create a BinaryInteractionEvidenceWrapper from the given interaction evidence which should contain not more than two participants- Parameters:
interaction
- aInteractionEvidence
object.- Returns:
- the new BinaryInteractionWrapper for this interaction
- Throws:
IllegalArgumentException
- if the interaction contains more than two participants or interaction is null
-
createModelledBinaryInteractionFrom
public static ModelledBinaryInteraction createModelledBinaryInteractionFrom(ModelledInteraction interaction)
Create a ModelledBinaryInteractionWrapper from the given modelled interaction which should contain not more than two participants- Parameters:
interaction
- aModelledInteraction
object.- Returns:
- the new BinaryInteractionWrapper for this interaction
- Throws:
IllegalArgumentException
- if the interaction contains more than two participants
-
createNewSelfBinaryInteractionFrom
public static BinaryInteraction createNewSelfBinaryInteractionFrom(Interaction interaction)
Creates a new BinaryInteraction from the given interaction which should only contain one participant with a stoichiometry >= 2 or participant stoichiometry null and participant is not self/putative self. The new Binary interaction will have a participantB which is a copy of participantA with stoichiometry 0- Parameters:
interaction
- aInteraction
object.- Returns:
- a
BinaryInteraction
object.
-
createAndAddNewSelfBinaryInteractionEvidence
public static BinaryInteractionEvidence createAndAddNewSelfBinaryInteractionEvidence(InteractionEvidence interaction)
Creates a new BinaryInteractionEvidence from the given interactionEvidence which should only contain one participant with a stoichiometry >= 2 or participant stoichiometry null and participant is not self/putative self. The new Binary interaction evidence will have a participantB which is a copy of participantA with stoichiometry 0- Parameters:
interaction
- aInteractionEvidence
object.- Returns:
- a
BinaryInteractionEvidence
object.
-
createAndAddNewSelfModelledBinaryInteraction
public static ModelledBinaryInteraction createAndAddNewSelfModelledBinaryInteraction(ModelledInteraction interaction)
Creates a new ModelledBinaryInteraction from the given interaction which should only contain one participant with a stoichiometry >= 2 or participant stoichiometry null and participant is not self/putative self. The new Binary interaction evidence will have a participantB which is a copy of participantA with stoichiometry 0- Parameters:
interaction
- aModelledInteraction
object.- Returns:
- a
ModelledBinaryInteraction
object.
-
collectComplexExpansionMethodFromAnnotations
public static Annotation collectComplexExpansionMethodFromAnnotations(Collection<? extends Annotation> annotations)
collectComplexExpansionMethodFromAnnotations
- Parameters:
annotations
- aCollection
object.- Returns:
- a
Annotation
object.
-
extractParticipantWithCausalRelationships
public static Collection<Participant> extractParticipantWithCausalRelationships(Interaction interaction)
This method can return all participants having causal relationships in an interaction- Parameters:
interaction
- aInteraction
object.- Returns:
- the collection of participants having causal relationships, empty collection if no participants with causal relationships
-
-