public static Experiment createExperiment(String pubmedId, CvTerm interactionDetectionMethod, Organism hostOrganism) { Experiment experiment = new DefaultExperiment(new DefaultPublication(pubmedId), interactionDetectionMethod); experiment.setHostOrganism(hostOrganism); return experiment; }
public static Experiment createBasicExperimentForComplexes(int taxid, String name){ Experiment experiment = new DefaultExperiment(PublicationUtils.createBasicPublicationForModelledInteractions(), CvTermUtils.createMICvTerm(Experiment.INFERRED_BY_CURATOR,Experiment.INFERRED_BY_CURATOR_MI)); experiment.setHostOrganism(new DefaultOrganism(taxid, name)); return experiment; }
public static Experiment createBasicExperimentForComplexes(int taxid){ Experiment experiment = new DefaultExperiment(PublicationUtils.createBasicPublicationForModelledInteractions(), CvTermUtils.createMICvTerm(Experiment.INFERRED_BY_CURATOR,Experiment.INFERRED_BY_CURATOR_MI)); experiment.setHostOrganism(new DefaultOrganism(taxid)); return experiment; }
/*** * This method will copy properties of experiment source in experiment target and will override all the other properties of Target experiment. * This method will ignore interaction evidences * It will set the publication but will not add this experiment to the list of experiments of the publication reported in the source experiment * It will fully clone all the VariableParameters and set their experiment to the current experiment target * @param source * @param target */ public static void copyAndOverrideExperimentProperties(Experiment source, Experiment target){ if (source != null && target != null){ target.setHostOrganism(source.getHostOrganism()); target.setInteractionDetectionMethod(source.getInteractionDetectionMethod()); target.setPublication(source.getPublication()); // copy collections target.getAnnotations().clear(); target.getAnnotations().addAll(source.getAnnotations()); target.getXrefs().clear(); target.getXrefs().addAll(source.getXrefs()); target.getConfidences().clear(); target.getConfidences().addAll(source.getConfidences()); target.getVariableParameters().clear(); target.addAllVariableParameters(source.getVariableParameters()); } }
/*** * This method will copy properties of experiment source in experiment target and will override all the other properties of Target experiment. * This method will also move interaction evidences from source to target * It will set the publication but will not add this experiment to the list of experiments of the publication reported in the source experiment * It will fully clone all the VariableParameters and set their experiment to the current experiment target * @param source * @param target */ public static void copyAndOverrideExperimentPropertiesAndInteractionEvidences(Experiment source, Experiment target){ if (source != null && target != null){ target.setHostOrganism(source.getHostOrganism()); target.setInteractionDetectionMethod(source.getInteractionDetectionMethod()); target.setPublication(source.getPublication()); // copy collections target.getAnnotations().clear(); target.getAnnotations().addAll(source.getAnnotations()); target.getXrefs().clear(); target.getXrefs().addAll(source.getXrefs()); target.getConfidences().clear(); target.getConfidences().addAll(source.getConfidences()); target.getVariableParameters().clear(); target.addAllVariableParameters(source.getVariableParameters()); target.getInteractionEvidences().clear(); target.addAllInteractionEvidences(source.getInteractionEvidences()); } } }