public <X extends Xref> X createPrimaryReferenceXref(AnnotatedObject<X,?> parent, String primaryId) { CvXrefQualifier primaryReference = createCvObject(CvXrefQualifier.class, CvXrefQualifier.PRIMARY_REFERENCE_MI_REF, CvXrefQualifier.PRIMARY_REFERENCE); CvDatabase pubmedDb = createCvObject(CvDatabase.class, CvDatabase.PUBMED_MI_REF, CvDatabase.PUBMED); return createXref(parent, primaryId, primaryReference, pubmedDb); }
public <X extends Xref> X createPrimaryReferenceXref(AnnotatedObject<X,?> parent, String primaryId) { CvXrefQualifier primaryReference = createCvObject(CvXrefQualifier.class, CvXrefQualifier.PRIMARY_REFERENCE_MI_REF, CvXrefQualifier.PRIMARY_REFERENCE); CvDatabase pubmedDb = createCvObject(CvDatabase.class, CvDatabase.PUBMED_MI_REF, CvDatabase.PUBMED); return createXref(parent, primaryId, primaryReference, pubmedDb); }
public Component createComponentBait(Interaction interaction, Interactor interactor) { CvExperimentalRole expRole = createCvObject(CvExperimentalRole.class, CvExperimentalRole.BAIT_PSI_REF, CvExperimentalRole.BAIT); CvBiologicalRole bioRole = createCvObject(CvBiologicalRole.class, CvBiologicalRole.UNSPECIFIED_PSI_REF, CvBiologicalRole.UNSPECIFIED); return createComponent(interaction, interactor, expRole, bioRole); }
public Component createComponentBait(Interaction interaction, Interactor interactor) { CvExperimentalRole expRole = createCvObject(CvExperimentalRole.class, CvExperimentalRole.BAIT_PSI_REF, CvExperimentalRole.BAIT); CvBiologicalRole bioRole = createCvObject(CvBiologicalRole.class, CvBiologicalRole.UNSPECIFIED_PSI_REF, CvBiologicalRole.UNSPECIFIED); return createComponent(interaction, interactor, expRole, bioRole); }
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 InteractionParameter createDeterministicInteractionParameter() { CvParameterType cvParameterType = createCvObject( CvParameterType.class, "MI:0836", "temperature"); CvParameterUnit cvParameterUnit = createCvObject( CvParameterUnit.class, "MI:0838", "kelvin"); InteractionParameter param = createInteractionParameter( cvParameterType, cvParameterUnit, new Double(302)); param.setBase(10); param.setExponent(0); param.setUncertainty(0.8); return param; }
public Component createComponentNeutral(Interaction interaction, Interactor interactor) { CvExperimentalRole expRole = createCvObject(CvExperimentalRole.class, CvExperimentalRole.NEUTRAL_PSI_REF, CvExperimentalRole.NEUTRAL); CvBiologicalRole bioRole = createCvObject(CvBiologicalRole.class, CvBiologicalRole.UNSPECIFIED_PSI_REF, CvBiologicalRole.UNSPECIFIED); Component component = createComponent(interaction, interactor, expRole, bioRole); for (int i=0; i<childRandom(0,2); i++) { component.addBindingDomain(createFeatureRandom()); } return component; }
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; }
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 Range createRangeCTerminal(int beginFrom, int endFrom, int beginTo, int endTo) { Range range = new Range(institution, beginFrom, endFrom, beginTo, endTo, null); final CvFuzzyType fuzzyType = createCvObject(CvFuzzyType.class, CvFuzzyType.C_TERMINAL_MI_REF, CvFuzzyType.C_TERMINAL); range.setFromCvFuzzyType(fuzzyType); range.setToCvFuzzyType(fuzzyType); return range; }
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 Range createRange(int beginFrom, int endFrom, int beginTo, int endTo) { if( beginFrom == 0 && endFrom == 0 && beginTo == 0 && endTo == 0 ) { return createRangeUndetermined(); } Range range = new Range(institution, beginFrom, endFrom, beginTo, endTo, null); final CvFuzzyType fuzzyType = createCvObject(CvFuzzyType.class, CvFuzzyType.RANGE_MI_REF, CvFuzzyType.RANGE); range.setFromCvFuzzyType(fuzzyType); range.setToCvFuzzyType(fuzzyType); return range; }
public Range createRange(int beginFrom, int endFrom, int beginTo, int endTo) { if( beginFrom == 0 && endFrom == 0 && beginTo == 0 && endTo == 0 ) { return createRangeUndetermined(); } Range range = new Range(institution, beginFrom, endFrom, beginTo, endTo, null); final CvFuzzyType fuzzyType = createCvObject(CvFuzzyType.class, CvFuzzyType.RANGE_MI_REF, CvFuzzyType.RANGE); range.setFromCvFuzzyType(fuzzyType); range.setToCvFuzzyType(fuzzyType); return range; }
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 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; }