public void onExperimentalRoleUpdate(T entity, CvTerm oldTerm) { experimentalEntityChangeLogger.log(Level.INFO, "The experimental role " + oldTerm + " has been updated with " + entity.getBiologicalRole() + " in the experimental entity " + entity.toString()); }
/** * Method to know if a participant evidence has a putative self experimental or biological role * @param p * @return */ public static boolean isPutativeSelfParticipantEvidence(ParticipantEvidence p){ if (p == null){ return false; } CvTerm experimentalRole = p.getExperimentalRole(); CvTerm biologicalRole = p.getBiologicalRole(); return DefaultCvTermComparator.areEquals(CvTermUtils.getPutativeSelf(), experimentalRole) || DefaultCvTermComparator.areEquals(CvTermUtils.getPutativeSelf(), biologicalRole) ; }
/** * Method to know if a participant evidence has a self experimental or biological role * @param p * @return */ public static boolean isSelfParticipantEvidence(ParticipantEvidence p){ if (p == null){ return false; } CvTerm experimentalRole = p.getExperimentalRole(); CvTerm biologicalRole = p.getBiologicalRole(); return DefaultCvTermComparator.areEquals(CvTermUtils.getSelf(), experimentalRole) || DefaultCvTermComparator.areEquals(CvTermUtils.getSelf(), biologicalRole) ; }
target.setExperimentalRole(source.getExperimentalRole()); target.setExpressedInOrganism(source.getExpressedInOrganism()); target.setBiologicalRole(source.getBiologicalRole()); target.setStoichiometry(source.getStoichiometry());
/** * For each experiment associated with this interaction, collect all respective participants and their biological roles and * check if the dependencies are correct. * * @param participant a participant to check on. * @return a collection of validator messages. * if we fail to retreive the MI Ontology. */ public Collection<ValidatorMessage> check( ParticipantEvidence participant ) throws ValidatorException { Collection<ValidatorMessage> messages = Collections.EMPTY_LIST; CvTerm biolRole = participant.getBiologicalRole(); if (participant.getInteraction() != null){ InteractionEvidence interaction = participant.getInteraction(); Experiment exp = interaction.getExperiment(); if (exp != null){ CvTerm method = exp.getInteractionDetectionMethod(); // build a context in case of error MiContext context = RuleUtils.buildContext(participant, "participant"); context.addAssociatedContext(RuleUtils.buildContext(exp, "experiment")); messages=mapping.check( method, biolRole, context, this ); } } return messages; }
if (p.getBiologicalRole() != null){ checkCv(messages, p.getBiologicalRole(), p, "participant");