Codota Logo
ParticipantEvidence.getExperimentalRole
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now