public Experiment createExperimentEmpty() { return createExperimentEmpty(randomExperimentLabel()); }
public Experiment createExperimentEmpty() { return createExperimentEmpty(randomExperimentLabel()); }
public Experiment createExperimentEmpty() { return createExperimentEmpty(randomExperimentLabel()); }
/** * This creates a stable (non-random) experiment */ public Experiment createDeterministicExperiment() { Experiment experiment = createExperimentEmpty("foobar-2006-1","12345"); experiment.setBioSource(createBioSource(5, "lalaorg")); return experiment; }
/** * This creates a stable (non-random) experiment */ public Experiment createDeterministicExperiment() { Experiment experiment = createExperimentEmpty("foobar-2006-1","12345"); experiment.setBioSource(createBioSource(5, "lalaorg")); return experiment; }
public Experiment createExperimentRandom(int interactionNumber) { Experiment exp = createExperimentEmpty(randomExperimentLabel()); for (int i=0; i<interactionNumber; i++) { Interaction interaction = createInteractionRandomBinary(); interaction.setExperiments(new ArrayList<Experiment>(Arrays.asList(exp))); exp.addInteraction(interaction); } return exp; }
public Experiment createExperimentRandom(int interactionNumber) { Experiment exp = createExperimentEmpty(randomExperimentLabel()); for (int i=0; i<interactionNumber; i++) { Interaction interaction = createInteractionRandomBinary(); interaction.setExperiments(new ArrayList<Experiment>(Arrays.asList(exp))); exp.addInteraction(interaction); } return exp; }
public Experiment createExperimentRandom(int interactionNumber) { Experiment exp = createExperimentEmpty(randomExperimentLabel()); for (int i=0; i<interactionNumber; i++) { Interaction interaction = createInteractionRandomBinary(); interaction.setExperiments(new ArrayList<Experiment>(Arrays.asList(exp))); exp.addInteraction(interaction); } return exp; }
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 Experiment createExperimentRandom(String shortLabel, int interactionNumber) { Experiment exp = createExperimentEmpty(randomExperimentLabel()); exp.setShortLabel(shortLabel); for (int i=0; i<interactionNumber; i++) { Interaction interaction = createInteractionRandomBinary(); interaction.setExperiments(new ArrayList<Experiment>(Arrays.asList(exp))); exp.addInteraction(interaction); } return exp; }
public Experiment createExperimentRandom(String shortLabel, int interactionNumber) { Experiment exp = createExperimentEmpty(randomExperimentLabel()); exp.setShortLabel(shortLabel); for (int i=0; i<interactionNumber; i++) { Interaction interaction = createInteractionRandomBinary(); interaction.setExperiments(new ArrayList<Experiment>(Arrays.asList(exp))); exp.addInteraction(interaction); } return exp; }
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(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 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 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 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; }