public Interaction createInteraction(String shortLabel, Interactor bait, Interactor prey, Experiment experiment) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION ); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, intType, shortLabel, getInstitution()); createComponentBait(interaction, bait); createComponentPrey(interaction, prey); return interaction; }
public Interaction createInteraction(String shortLabel, Interactor bait, Interactor prey, Experiment experiment) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION ); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, intType, shortLabel, getInstitution()); createComponentBait(interaction, bait); createComponentPrey(interaction, prey); return interaction; }
private Interaction createInteractionDirect() { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); return new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, intType, nextString("label"), getInstitution()); }
private Interaction createInteractionDirect() { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); return new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, intType, nextString("label"), getInstitution()); }
public Interaction createInteraction(Component ... components) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Experiment experiment = createExperimentEmpty(); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, null, "temp", getInstitution()); for (Component component : components) { interaction.addComponent(component); } String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); return interaction; }
public Interaction createInteraction(Interactor ... interactors) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Experiment experiment = createExperimentEmpty(); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, intType, "temp", getInstitution()); Component[] components = new Component[interactors.length]; for (int i=0; i<interactors.length; i++) { components[i] = createComponentNeutral(interaction, interactors[i]); components[i].setInteraction(null); } return createInteraction(components); }
public Interaction createInteraction(Interactor ... interactors) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Experiment experiment = createExperimentEmpty(); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, intType, "temp", getInstitution()); Component[] components = new Component[interactors.length]; for (int i=0; i<interactors.length; i++) { components[i] = createComponentNeutral(interaction, interactors[i]); components[i].setInteraction(null); } return createInteraction(components); }
public Interaction createInteraction(String shortLabel, Interactor bait, Interactor prey, Experiment experiment) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Interaction interaction = new InteractionImpl(Arrays.asList(experiment), cvInteractionType, null, shortLabel, getInstitution()); interaction.addComponent(createComponentBait(interaction, bait)); interaction.addComponent(createComponentPrey(interaction, prey)); return interaction; }
public Interaction createInteraction(Component ... components) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Experiment experiment = createExperimentEmpty(); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, intType, "temp", getInstitution()); for (Component component : components) { interaction.addComponent(component); } try { String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); } catch (Exception e) { interaction.setShortLabel("unk-unk"); } return interaction; }
public Interaction createInteraction(Component ... components) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Experiment experiment = createExperimentEmpty(); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, intType, "temp", getInstitution()); for (Component component : components) { interaction.addComponent(component); } try { String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); } catch (Exception e) { interaction.setShortLabel("unk-unk"); } return interaction; }
public Component createComponentNeutral( Interactor interactor ) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); CvExperimentalRole expRole = createCvObject(CvExperimentalRole.class, CvExperimentalRole.NEUTRAL_PSI_REF, CvExperimentalRole.NEUTRAL); CvBiologicalRole bioRole = createCvObject(CvBiologicalRole.class, CvBiologicalRole.UNSPECIFIED_PSI_REF, CvBiologicalRole.UNSPECIFIED); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, intType, nextString("label"), getInstitution()); Component component = createComponent(interaction, interactor, expRole, bioRole); for (int i=0; i<childRandom(0,2); i++) { component.addBindingDomain(createFeatureRandom()); } return component; }
public Component createComponentNeutral( Interactor interactor ) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); CvExperimentalRole expRole = createCvObject(CvExperimentalRole.class, CvExperimentalRole.NEUTRAL_PSI_REF, CvExperimentalRole.NEUTRAL); CvBiologicalRole bioRole = createCvObject(CvBiologicalRole.class, CvBiologicalRole.UNSPECIFIED_PSI_REF, CvBiologicalRole.UNSPECIFIED); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, intType, nextString("label"), getInstitution()); Component component = createComponent(interaction, interactor, expRole, bioRole); for (int i=0; i<childRandom(0,2); i++) { component.addBindingDomain(createFeatureRandom()); } return component; }
public Interaction createInteractionRandomBinary() { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, null, nextString("label"), getInstitution()); interaction.addComponent(createComponentBait(interaction, createProteinRandom())); interaction.addComponent(createComponentPrey(interaction, createProteinRandom())); String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); return interaction; }
public Interaction createInteraction(String ... interactorShortLabels) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, null, nextString("label"), getInstitution()); for (String interactorShortLabel : interactorShortLabels) { interaction.addComponent(createComponentNeutral(interaction, createProtein("uniprotId", interactorShortLabel))); } if (interactorShortLabels.length == 1) { interaction.addComponent(createComponentNeutral(interaction, createProtein("uniprotId", interactorShortLabels[0]))); } String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); return interaction; }
public Interaction createInteractionRandomBinary(String imexId) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Experiment experimentEmpty = createExperimentEmpty(); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experimentEmpty)), cvInteractionType, intType, nextString("label"), getInstitution()); experimentEmpty.getInteractions().add(interaction); createComponentBait(interaction, createProteinRandom()); createComponentPrey(interaction, createProteinRandom()); String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); if (imexId != null) { CvObjectBuilder cvBuilder = new CvObjectBuilder(); CvXrefQualifier idQual = cvBuilder.createIdentityCvXrefQualifier(getInstitution()); CvDatabase imexDb = createCvObject(CvDatabase.class, CvDatabase.IMEX_MI_REF, CvDatabase.IMEX); interaction.addXref(new InteractorXref(getInstitution(), imexDb, imexId, idQual)); } return interaction; }
public Interaction createInteractionRandomBinary(String imexId) { CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION); CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION ); Experiment experimentEmpty = createExperimentEmpty(); Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experimentEmpty)), cvInteractionType, intType, nextString("label"), getInstitution()); experimentEmpty.getInteractions().add(interaction); createComponentBait(interaction, createProteinRandom()); createComponentPrey(interaction, createProteinRandom()); String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); if (imexId != null) { CvObjectBuilder cvBuilder = new CvObjectBuilder(); CvXrefQualifier idQual = cvBuilder.createIdentityCvXrefQualifier(getInstitution()); CvDatabase imexDb = createCvObject(CvDatabase.class, CvDatabase.IMEX_MI_REF, CvDatabase.IMEX); interaction.addXref(new InteractorXref(getInstitution(), imexDb, imexId, idQual)); } return interaction; }
Interaction interaction = new InteractionImpl( myExperiments, components, cvInteractionType,
Interaction interaction = new InteractionImpl( myExperiments, components, cvInteractionType,
public Interaction cloneInteraction(Interaction interaction) throws IntactClonerException { if (interaction == null) return null; Interaction clone = new InteractionImpl();
public Interaction cloneInteraction(Interaction interaction) throws IntactClonerException { if (interaction == null) return null; Interaction clone = new InteractionImpl();