public Confidence createConfidenceRandom() { CvConfidenceType cvConfidenceType = CvObjectUtils.createIntactCvObject(getInstitution(), CvConfidenceType.class, "IA:"+ new Random().nextInt(1000), nextString( "cv")); Confidence conf = createConfidence(cvConfidenceType, Double.toString( new Random().nextDouble())); return conf; }
public Confidence createConfidenceRandom() { CvConfidenceType cvConfidenceType = CvObjectUtils.createIntactCvObject(getInstitution(), CvConfidenceType.class, "IA:"+ new Random().nextInt(1000), nextString( "cv")); Confidence conf = createConfidence(cvConfidenceType, Double.toString( new Random().nextDouble())); return conf; }
public Feature createFeature(String shortLabel, CvFeatureType featureType) { Interaction interaction = createInteractionRandomBinary(); Component component = interaction.getComponents().iterator().next(); Feature feature = new Feature(getInstitution(), shortLabel, component, featureType); return feature; }
public Confidence createDeterministicConfidence() { CvConfidenceType cvConfidenceType = CvObjectUtils.createIntactCvObject(getInstitution(), CvConfidenceType.class, "IA:9974", "intact confidence"); Confidence conf = createConfidence( cvConfidenceType, "0.8"); return conf; }
public BioSource createBioSource(int taxId, String shortLabel) { BioSource bioSource = new BioSource(getInstitution(), shortLabel, String.valueOf(taxId)); CvDatabase newt = createCvObject(CvDatabase.class, CvDatabase.NEWT_MI_REF, CvDatabase.NEWT); BioSourceXref newtXref = createIdentityXref(bioSource, String.valueOf(taxId), newt); bioSource.addXref(newtXref); return bioSource; }
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(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()); }
public Component createComponent(Interaction interaction, Interactor interactor, CvExperimentalRole expRole, CvBiologicalRole bioRole) { Component component = new Component(getInstitution(), interaction, interactor, expRole, bioRole); CvIdentification cvParticipantDetMethod = createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED); component.getParticipantDetectionMethods().add(cvParticipantDetMethod); CvExperimentalPreparation cvExperimentalPreparation = createCvObject(CvExperimentalPreparation.class, CvExperimentalPreparation.PURIFIED_REF, CvExperimentalPreparation.PURIFIED); component.getExperimentalPreparations().add(cvExperimentalPreparation); return component; }
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 SmallMolecule createSmallMolecule(String chebiId, String shortLabel) { CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.SMALL_MOLECULE_MI_REF, CvInteractorType.SMALL_MOLECULE); SmallMolecule smallMolecule = new SmallMoleculeImpl(shortLabel, getInstitution(), intType); InteractorXref idXref = createIdentityXrefChebi(smallMolecule, chebiId); smallMolecule.addXref(idXref); InteractorAlias alias = createAliasGeneName(smallMolecule, shortLabel.toUpperCase()); smallMolecule.addAlias(alias); return smallMolecule; }
public NucleicAcid createNucleicAcid( String emblGenbankDdbjId, BioSource biosource, String shortlabel ) { CvInteractorType type = createCvObject(CvInteractorType.class, CvInteractorType.NUCLEIC_ACID_MI_REF, CvInteractorType.NUCLEIC_ACID); NucleicAcid na = new NucleicAcidImpl(getInstitution(), biosource, shortlabel, type); InteractorXref idXref = createIdentityXrefEmblGenbankDdbj(na, emblGenbankDdbjId); na.addXref(idXref); InteractorAlias alias = createAliasGeneName(na, shortlabel.toUpperCase()); na.addAlias(alias); return na; }
public NucleicAcid createNucleicAcid( String emblGenbankDdbjId, BioSource biosource, String shortlabel ) { CvInteractorType type = createCvObject(CvInteractorType.class, CvInteractorType.NUCLEIC_ACID_MI_REF, CvInteractorType.NUCLEIC_ACID); NucleicAcid na = new NucleicAcidImpl(getInstitution(), biosource, shortlabel, type); InteractorXref idXref = createIdentityXrefEmblGenbankDdbj(na, emblGenbankDdbjId); na.addXref(idXref); InteractorAlias alias = createAliasGeneName(na, shortlabel.toUpperCase()); na.addAlias(alias); return na; }
public Component createComponent(Interaction interaction, Interactor interactor, CvExperimentalRole expRole, CvBiologicalRole bioRole) { Component component = new Component(getInstitution(), interaction, interactor, expRole, bioRole); CvIdentification cvParticipantDetMethod = createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED); component.getParticipantDetectionMethods().add(cvParticipantDetMethod); CvExperimentalPreparation cvExperimentalPreparation = createCvObject(CvExperimentalPreparation.class, CvExperimentalPreparation.PURIFIED_REF, CvExperimentalPreparation.PURIFIED); component.getExperimentalPreparations().add(cvExperimentalPreparation); ComponentParameter componentParameter = createDeterministicComponentParameter(); component.addParameter(componentParameter); interactor.addActiveInstance( component ); interaction.addComponent( component ); return component; }
public Component createComponent(Interaction interaction, Interactor interactor, CvExperimentalRole expRole, CvBiologicalRole bioRole) { Component component = new Component(getInstitution(), interaction, interactor, expRole, bioRole); CvIdentification cvParticipantDetMethod = createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED); component.getParticipantDetectionMethods().add(cvParticipantDetMethod); CvExperimentalPreparation cvExperimentalPreparation = createCvObject(CvExperimentalPreparation.class, CvExperimentalPreparation.PURIFIED_REF, CvExperimentalPreparation.PURIFIED); component.getExperimentalPreparations().add(cvExperimentalPreparation); ComponentParameter componentParameter = createDeterministicComponentParameter(); component.addParameter(componentParameter); interactor.addActiveInstance( component ); interaction.addComponent( component ); return component; }
public Publication createPublication(String pmid) { Publication pub = new Publication(getInstitution(), pmid); IntactContext.getCurrentInstance().getLifecycleManager().getStartStatus().create(pub, "Mock builder"); return pub; }
public Experiment createExperimentEmpty(String shortLabel, String pubId) { Experiment experiment = new Experiment(getInstitution(), shortLabel, createBioSourceRandom()); experiment.setCvInteraction(createCvObject(CvInteraction.class, CvInteraction.COSEDIMENTATION_MI_REF, CvInteraction.COSEDIMENTATION)); experiment.setCvIdentification(createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED)); Publication publication = createPublication(pubId); publication.addExperiment(experiment); experiment.addXref(createPrimaryReferenceXref(experiment, pubId)); return experiment; }
public Experiment createExperimentEmpty(String shortLabel, String pubId) { Experiment experiment = new Experiment(getInstitution(), shortLabel, createBioSourceRandom()); experiment.setCvInteraction(createCvObject(CvInteraction.class, CvInteraction.COSEDIMENTATION_MI_REF, CvInteraction.COSEDIMENTATION)); experiment.setCvIdentification(createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED)); Publication publication = createPublication(pubId); publication.addExperiment(experiment); experiment.addXref(createPrimaryReferenceXref(experiment, pubId)); return experiment; }
public Experiment createExperimentEmpty(String shortLabel) { Experiment experiment = new Experiment(getInstitution(), shortLabel, createBioSourceRandom()); experiment.setCvInteraction(createCvObject(CvInteraction.class, CvInteraction.COSEDIMENTATION_MI_REF, CvInteraction.COSEDIMENTATION)); experiment.setCvIdentification(createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED)); experiment.setPublication(createPublicationRandom()); experiment.addXref(createPrimaryReferenceXref(experiment, experiment.getPublication().getShortLabel())); return experiment; }
public Experiment createExperimentEmpty(String shortLabel) { Experiment experiment = new Experiment(getInstitution(), shortLabel, createBioSourceRandom()); experiment.setCvInteraction(createCvObject(CvInteraction.class, CvInteraction.COSEDIMENTATION_MI_REF, CvInteraction.COSEDIMENTATION)); experiment.setCvIdentification(createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED)); final Publication publication = createPublicationRandom(); experiment.setPublication(publication); publication.addExperiment(experiment); experiment.addXref(createPrimaryReferenceXref(experiment, experiment.getPublication().getShortLabel())); return experiment; }