public Interaction createInteraction(String ... interactorShortLabels) { Interaction interaction = createInteractionDirect(); Protein prot = null; for (String interactorShortLabel : interactorShortLabels) { prot = createDeterministicProtein(interactorShortLabel, interactorShortLabel); createComponentNeutral(interaction, prot); } if (interactorShortLabels.length == 1) { createComponentNeutral(interaction, prot); } String shortLabel = InteractionUtils.calculateShortLabel(interaction); interaction.setShortLabel(shortLabel); return interaction; }
public Interaction createInteraction(String ... interactorShortLabels) { Interaction interaction = createInteractionDirect(); Protein prot = null; for (String interactorShortLabel : interactorShortLabels) { prot = createDeterministicProtein(interactorShortLabel, interactorShortLabel); createComponentNeutral(interaction, prot); } if (interactorShortLabels.length == 1) { createComponentNeutral(interaction, prot); } 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 ... 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; }