congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ParticipantEvidence.getExperimentalRole
Code IndexAdd Tabnine to your IDE (free)

How to use
getExperimentalRole
method
in
psidev.psi.mi.jami.model.ParticipantEvidence

Best Java code snippets using psidev.psi.mi.jami.model.ParticipantEvidence.getExperimentalRole (Showing top 16 results out of 315)

origin: psidev.psi.mi/psimi-schema-validator

/**
 *
 * @param participants
 * @param roleMi
 * @param roleName
 * @return the number of participants with a specific experimental role
 */
private int getNumberOfParticipantWithExperimentalRole(Collection<? extends ParticipantEvidence> participants, String roleMi, String roleName){
  int num = 0;
  for (ParticipantEvidence p : participants){
    CvTerm experimentRole = p.getExperimentalRole();
    if (checkParticipantRole(experimentRole, roleMi, roleName)){
      num++;
    }
  }
  return num;
}
origin: psidev.psi.mi.jami/jami-mitab

public void writeExperimentalRole(ParticipantEvidence participant) throws IOException {
  if (participant != null){
    writeCvTerm(participant.getExperimentalRole());
  }
  else {
    getWriter().write(MitabUtils.EMPTY_COLUMN);
  }
}
origin: uk.ac.ebi.intact.dataexchange/structured-abstract

@Override
protected boolean isParticipantBait(Participant component) {
  return getBaitMi().contains(((ParticipantEvidence) component)
      .getExperimentalRole().getMIIdentifier());
}
origin: uk.ac.ebi.intact.dataexchange/structured-abstract

@Override
protected boolean isParticipantPrey(Participant component) {
  return getPreyMi().contains(((ParticipantEvidence) component)
      .getExperimentalRole().getMIIdentifier());
}
origin: psidev.psi.mi.jami/jami-core

/**
 * To know if the participant evidence does have a specific experimental role
 * @param participant
 * @param roleId
 * @param roleName
 * @return true if the participant has the experimental role with given name/identifier
 */
public static boolean doesParticipantHaveExperimentalRole(ParticipantEvidence participant, String roleId, String roleName){
  if (participant == null || (roleName == null && roleId == null)){
    return false;
  }
  CvTerm role = participant.getExperimentalRole();
  // we can compare identifiers
  if (roleId != null && role.getMIIdentifier() != null){
    // we have the same topic id
    return role.getMIIdentifier().equals(roleId);
  }
  // we need to compare topic names
  else if (roleName != null) {
    return roleName.equalsIgnoreCase(role.getShortName());
  }
  return false;
}
origin: psidev.psi.mi.jami/jami-core

/**
 * 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) ;
}
origin: psidev.psi.mi.jami/jami-core

/**
 * 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) ;
}
origin: psidev.psi.mi.jami/jami-core

/**
 * Method to know if a participant has a putative self biological role.
 * If checkParticipantEvidence is set to true, it will check if the given p is a ParticipantEvidence and look at the experimental role
 * @param p
 * @param checkParticipantEvidence
 * @return
 */
public static boolean isPutativeSelfParticipant(Participant p, boolean checkParticipantEvidence){
  if (p == null){
    return false;
  }
  CvTerm biologicalRole = p.getBiologicalRole();
  if (DefaultCvTermComparator.areEquals(CvTermUtils.getPutativeSelf(), biologicalRole)){
    return true;
  }
  if (checkParticipantEvidence){
    if (p instanceof ParticipantEvidence){
      CvTerm expRole = ((ParticipantEvidence)p).getExperimentalRole();
      return DefaultCvTermComparator.areEquals(CvTermUtils.getPutativeSelf(), expRole) ;
    }
  }
  return false;
}
origin: psidev.psi.mi.jami/jami-core

/**
 * Method to know if a participant has a self biological role
 * If checkParticipantEvidence is set to true, it will check if the given p is a ParticipantEvidence and look at the experimental role
 * @param p
 * @param checkParticipantEvidence
 * @return
 */
public static boolean isSelfParticipant(Participant p, boolean checkParticipantEvidence){
  if (p == null){
    return false;
  }
  CvTerm biologicalRole = p.getBiologicalRole();
  if (DefaultCvTermComparator.areEquals(CvTermUtils.getSelf(), biologicalRole)){
    return true;
  }
  if (checkParticipantEvidence){
    if (p instanceof ParticipantEvidence){
      CvTerm expRole = ((ParticipantEvidence)p).getExperimentalRole();
      return DefaultCvTermComparator.areEquals(CvTermUtils.getSelf(), expRole) ;
    }
  }
  return false;
}
origin: psidev.psi.mi.jami/jami-core

target.setExperimentalRole(source.getExperimentalRole());
target.setExpressedInOrganism(source.getExpressedInOrganism());
target.setBiologicalRole(source.getBiologicalRole());
origin: psidev.psi.mi/psimi-schema-validator

/**
 * For each experiment associated with this interaction, collect all respective participants and their experimental 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 role = participant.getExperimentalRole();
  if (participant.getInteraction() != null){
    InteractionEvidence interaction = participant.getInteraction();
    Experiment exp = interaction.getExperiment();
    if (exp != null){
      // build a context in case of error
      MiContext context = RuleUtils.buildContext(participant, "participant");
      context.addAssociatedContext(RuleUtils.buildContext(exp, "experiment"));
      final CvTerm method = exp.getInteractionDetectionMethod();
      messages=mapping.check( method, role, context, this );
    }
  }
  return messages;
}
origin: psidev.psi.mi.jami/jami-interactionviewer-json

getCvWriter().write(object.getExperimentalRole());
origin: psidev.psi.mi/psimi-schema-validator

if (p.getExperimentalRole() != null){
  checkCv(messages, p.getExperimentalRole(), p, "participant");
origin: psidev.psi.mi.jami/jami-core

CvTerm expRoles1 = experimentalParticipant1.getExperimentalRole();
CvTerm expRoles2 = experimentalParticipant2.getExperimentalRole();
origin: psidev.psi.mi.jami/jami-core

CvTerm expRoles1 = experimentalParticipant1.getExperimentalRole();
CvTerm expRoles2 = experimentalParticipant2.getExperimentalRole();
origin: psidev.psi.mi.jami/jami-core

CvTerm expRoles1 = experimentalParticipant1.getExperimentalRole();
CvTerm expRoles2 = experimentalParticipant2.getExperimentalRole();
psidev.psi.mi.jami.modelParticipantEvidencegetExperimentalRole

Javadoc

The experimental role of the participant. It is a controlled vocabulary term and cannot be null. It the experimental role role of a participant is not known or not relevant, the method should return unspecified role (MI:0499) Ex: bait, prey, ...

Popular methods of ParticipantEvidence

  • getIdentificationMethods
    The identification methods for this participant. Each identification method is a controlled vocabula
  • getAnnotations
  • getConfidences
    The confidences for this participant. The Collection cannot be null. If the participant does not hav
  • getExpressedInOrganism
    The organisms in which the participant has been expressed. It can be null if not relevant or same as
  • getInteractor
  • getParameters
    Numerical parameters associated with this participant. The Collection cannot be null. If the partici
  • getAliases
  • getBiologicalRole
  • getExperimentalPreparations
    The experimental preparations for this participant. Each experimental preparation is a controlled vo
  • getFeatures
  • getInteraction
  • getXrefs
  • getInteraction,
  • getXrefs,
  • addFeature,
  • getCausalRelationships,
  • getStoichiometry,
  • setBiologicalRole,
  • setExperimentalRole,
  • setExpressedInOrganism,
  • setInteraction

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now