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 AnnotationcollectComplexExpansionMethodFromAnnotations(Collection<? extends Annotation> annotations)collectComplexExpansionMethodFromAnnotationsstatic BinaryInteractionEvidencecreateAndAddNewSelfBinaryInteractionEvidence(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 ModelledBinaryInteractioncreateAndAddNewSelfModelledBinaryInteraction(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 BinaryInteractionEvidencecreateBinaryInteractionEvidenceFrom(InteractionEvidence interaction)Create a BinaryInteractionEvidenceWrapper from the given interaction evidence which should contain not more than two participantsstatic BinaryInteractioncreateBinaryInteractionFrom(Interaction interaction)Create a BinaryInteractionWrapper from the given interaction which should contain not more than two participants.static InteractionEvidencecreateEmptyBasicExperimentalInteraction()createEmptyBasicExperimentalInteractionstatic ModelledBinaryInteractioncreateModelledBinaryInteractionFrom(ModelledInteraction interaction)Create a ModelledBinaryInteractionWrapper from the given modelled interaction which should contain not more than two participantsstatic BinaryInteractioncreateNewSelfBinaryInteractionFrom(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 ComplexTypefindInteractionCategoryOf(Interaction interaction, boolean checkExperimentalRoleIfInteractionEvidence)The method will find the interactionCategory (binary, self, etc.)static ComplexTypefindInteractionEvidenceCategoryOf(InteractionEvidence interaction)The method will find the interactionCategory (binary, self, etc.)static ComplexTypefindModelledInteractionCategoryOf(ModelledInteraction interaction)The method will find the interactionCategory (binary, self, etc.)
-
-
-
Method Detail
-
createEmptyBasicExperimentalInteraction
public static InteractionEvidence createEmptyBasicExperimentalInteraction()
createEmptyBasicExperimentalInteraction
- Returns:
- a
InteractionEvidenceobject.
-
findInteractionCategoryOf
public static ComplexType findInteractionCategoryOf(Interaction interaction, boolean checkExperimentalRoleIfInteractionEvidence)
The method will find the interactionCategory (binary, self, etc.)- Parameters:
interaction- aInteractionobject.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- aInteractionEvidenceobject.- 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- aModelledInteractionobject.- 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- aInteractionobject.- 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- aInteractionEvidenceobject.- 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- aModelledInteractionobject.- 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- aInteractionobject.- Returns:
- a
BinaryInteractionobject.
-
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- aInteractionEvidenceobject.- Returns:
- a
BinaryInteractionEvidenceobject.
-
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- aModelledInteractionobject.- Returns:
- a
ModelledBinaryInteractionobject.
-
collectComplexExpansionMethodFromAnnotations
public static Annotation collectComplexExpansionMethodFromAnnotations(Collection<? extends Annotation> annotations)
collectComplexExpansionMethodFromAnnotations
- Parameters:
annotations- aCollectionobject.- Returns:
- a
Annotationobject.
-
extractParticipantWithCausalRelationships
public static Collection<Participant> extractParticipantWithCausalRelationships(Interaction interaction)
This method can return all participants having causal relationships in an interaction- Parameters:
interaction- aInteractionobject.- Returns:
- the collection of participants having causal relationships, empty collection if no participants with causal relationships
-
-