uk.ac.ebi.intact.model.Interaction.getShortLabel()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(10.5k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中uk.ac.ebi.intact.model.Interaction.getShortLabel()方法的一些代码示例,展示了Interaction.getShortLabel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interaction.getShortLabel()方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Interaction
类名称:Interaction
方法名:getShortLabel

Interaction.getShortLabel介绍

暂无

代码示例

代码示例来源:origin: uk.ac.ebi.intact.core/intact-persister

public void onPrePersist(Interaction objToPersist)
{
  String shortLabel = objToPersist.getShortLabel();
  String newShortLabel = InteractionUtils.syncShortLabelWithDb(shortLabel);
  if (!shortLabel.equals(newShortLabel)) {
    if (log.isDebugEnabled()) log.debug("Interaction with label '"+shortLabel+"' renamed '"+newShortLabel+"'" );
    objToPersist.setShortLabel(newShortLabel);
  }
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

public String crc64(Interaction interaction) {
  UniquenessStringBuilder sb = createUniquenessString(interaction);
  final String uniquenessString = sb.toString().toLowerCase();
  String crc64 = Crc64.getCrc64(uniquenessString);
  if (log.isDebugEnabled())
    log.debug("Created CRC for interaction '" + interaction.getShortLabel() + "': " + crc64 + " (" + uniquenessString + ")");
  return crc64;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

public String crc64(Interaction interaction) {
  UniquenessStringBuilder sb = createUniquenessString(interaction);
  final String uniquenessString = sb.toString().toLowerCase();
  String crc64 = Crc64.getCrc64(uniquenessString);
  if (log.isDebugEnabled())
    log.debug("Created CRC for interaction '" + interaction.getShortLabel() + "': " + crc64 + " (" + uniquenessString + ")");
  return crc64;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

/**
 * Gets the Interactor Identifiers for that interaction
 *
 * @since 1.7.2
 */
public static List<String> getInteractorPrimaryIDs(Interaction interaction) {
  final Collection<Component> components = interaction.getComponents();
  List<String> ids = new ArrayList<String>(components.size());
  for (Component component : components) {
    Interactor interactor = component.getInteractor();
    final Collection<InteractorXref> idXrefs = XrefUtils.getIdentityXrefs(interactor);
    if (idXrefs.size() > 0) {
      final Iterator<InteractorXref> iterator = idXrefs.iterator();
      ids.add(iterator.next().getPrimaryId());
      if (log.isDebugEnabled()) {
        if (iterator.hasNext()) {
          log.debug("Interaction contains interactor with more than one identities. Interaction: " + interaction.getShortLabel() + "(" + interaction.getAc() + ") " +
              " - Xrefs: " + idXrefs);
        }
      }
    }
  }
  return ids;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Gets the Interactor Identifiers for that interaction
 *
 * @since 1.7.2
 */
public static List<String> getInteractorPrimaryIDs(Interaction interaction) {
  final Collection<Component> components = interaction.getComponents();
  List<String> ids = new ArrayList<String>(components.size());
  for (Component component : components) {
    Interactor interactor = component.getInteractor();
    final Collection<InteractorXref> idXrefs = XrefUtils.getIdentityXrefs(interactor);
    if (idXrefs.size() > 0) {
      final Iterator<InteractorXref> iterator = idXrefs.iterator();
      ids.add(iterator.next().getPrimaryId());
      if (log.isDebugEnabled()) {
        if (iterator.hasNext()) {
          log.debug("Interaction contains interactor with more than one identities. Interaction: " + interaction.getShortLabel() + "(" + interaction.getAc() + ") " +
              " - Xrefs: " + idXrefs);
        }
      }
    }
  }
  return ids;
}

代码示例来源:origin: uk.ac.ebi.intact.util/data-conversion

for ( Iterator iterator1 = createdInteractions.iterator(); iterator1.hasNext(); ) {
  Interaction interaction1 = (Interaction) iterator1.next();
  sb.append( interaction1.getShortLabel() ).append( ' ' );

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

for ( Iterator iterator1 = createdInteractions.iterator(); iterator1.hasNext(); ) {
  Interaction interaction1 = (Interaction) iterator1.next();
  sb.append( interaction1.getShortLabel() ).append( ' ' );

代码示例来源:origin: uk.ac.ebi.intact.app/data-conversion

for ( Iterator iterator1 = createdInteractions.iterator(); iterator1.hasNext(); ) {
  Interaction interaction1 = (Interaction) iterator1.next();
  sb.append( interaction1.getShortLabel() ).append( ' ' );

代码示例来源:origin: uk.ac.ebi.intact.core/intact-persister

syncedInteractionLabels.add(syncedInteraction.getShortLabel());
if (!syncedInteractionLabels.contains(candidateInteraction.getShortLabel())) {
  return BehaviourType.UPDATE;

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.uniprotexport/intact-uniprot-export

/**
 * Filter the binary interactions of a given list of interactions and return a list composed with only binary interactions
 * @param interactionAcs : the list of interaction accessions
 * @param eligibleInteractions : the list of eligible interactions for uniprot export
 */
private void filterTrueBinaryInteractions(List<String> interactionAcs, List<String> eligibleInteractions) {
  // process each interaction of the list
  final int interactionCount = interactionAcs.size();
  for (int i = 0; i < interactionCount; i++) {
    TransactionStatus status = IntactContext.getCurrentInstance().getDataContext().beginTransaction();
    // get the IntAct interaction object
    String interactionAc = interactionAcs.get(i);
    Interaction interaction = IntactContext.getCurrentInstance().getDaoFactory().getInteractionDao().getByAc(interactionAc);
    // the interaction exists in IntAct
    if (interaction != null){
      logger.info("\t\t Interaction: Shortlabel:" + interaction.getShortLabel() + "  AC: " + interaction.getAc());
      if (InteractionUtils.isBinaryInteraction(interaction)){
        eligibleInteractions.add(interactionAc);
      }
    }
    IntactContext.getCurrentInstance().getDataContext().commitTransaction(status);
  } // i
}

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.uniprotexport/intact-uniprot-export

getOut().println("  (" + (i + 1) + ") Interaction: Shortlabel:" + interaction.getShortLabel() + "  AC: " + interaction.getAc());

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.uniprotexport/intact-uniprot-export

logger.error("The interaction " + interactionAc + ", " + intactInteraction.getShortLabel() + " cannot be converted into binary interactions and is excluded.", e);
logger.info("The interaction " + interactionAc + ", " + intactInteraction.getShortLabel() + " cannot be converted into binary interactions and is excluded.");

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.uniprotexport/intact-uniprot-export

logger.info("The interaction " + interaction + ", " + intactInteraction.getShortLabel() + " is not a true binary interaction and is excluded.");
  logger.error("The interaction " + interaction + ", " + intactInteraction.getShortLabel() + " cannot be converted into binary interactions and is excluded.", e);
logger.info("The interaction " + interaction + ", " + intactInteraction.getShortLabel() + " cannot be converted into binary interactions.");

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-exchange

if (log.isDebugEnabled()) log.debug("Persisting: "+interaction.getShortLabel());
PersisterStatistics localImportStats = importIntoIntact(interaction);

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.uniprotexport/intact-uniprot-export

logger.error("The interaction " + interactionAc + ", " + intactInteraction.getShortLabel() + " cannot be converted into binary interactions and is excluded.", e);
logger.info("The interaction " + interactionAc + ", " + intactInteraction.getShortLabel() + " cannot be converted into binary interactions.");

代码示例来源:origin: uk.ac.ebi.intact/intact-ebi-search-engine-export

out.write( ii + "<name>" + interaction.getShortLabel() + "</name>" + NEW_LINE );
if ( interaction.getFullName() != null ) {
  out.write( ii + "<description>" + escapeXml( interaction.getFullName() ) + "</description>" + NEW_LINE );

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

private void updateExperimentParticipantDetectionMethod(Interaction interaction) {
  for (Experiment experiment : interaction.getExperiments()) {
    if (experiment.getCvIdentification() == null) {
      String partDetMethod = calculateParticipantDetMethod(interaction.getComponents());
      if (partDetMethod != null) {
        final String message = "Experiment ("+ experiment.getShortLabel() +") without participant detection method. One was calculated from the components: " + partDetMethod;
        addMessageToContext(MessageLevel.INFO, message, true);
        if (log.isWarnEnabled()) {
          log.warn(message);
        }
        CvIdentification detMethod = CvObjectUtils.createCvObject(experiment.getOwner(), CvIdentification.class, partDetMethod, "undefined");
        experiment.setCvIdentification(detMethod);
      } else {
        final String message = "Neither the Experiment nor its participants have CvIdentification (participant detection method). Using the term \"experimental particp\" (MI:0661).";
        if (log.isWarnEnabled()) log.warn(": Experiment '"+experiment.getShortLabel()+
            "', Interaction '"+interaction.getShortLabel()+"' - Location: "+ConverterContext.getInstance().getLocation().getCurrentLocation().pathFromRootAsString());
        addMessageToContext(MessageLevel.WARN, message, true);
        CvIdentification detMethod = CvObjectUtils.createCvObject(experiment.getOwner(), CvIdentification.class, "MI:0661", "experimental particp");
        experiment.setCvIdentification(detMethod);
      }
    }
  }
}

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-exchange

if (log.isDebugEnabled()) log.debug("Persisting: " + interaction.getShortLabel());

代码示例来源:origin: uk.ac.ebi.intact.core/intact-persister

public static String createKey(AnnotatedObject ao) {
  String key;
  final String normalizedClassName = normalizeClassName(ao.getClass());
  
  if (ao instanceof Component) {
    // So far, components have as shorltabel N/A => we need to create one that allows to discriminate them
    Component comp = (Component)ao;
    String label = comp.getInteraction().getShortLabel()+"_"+comp.getInteractor().getShortLabel();
    key = normalizedClassName +":"+label;
  } else if (ao instanceof BioSource) {
    key = normalizedClassName +":"+((BioSource)ao).getTaxId();
  } else if (ao instanceof CvObject) {
    CvObject cv = (CvObject)ao;
    CvObjectXref identity = CvObjectUtils.getPsiMiIdentityXref(cv);
    if (identity != null) {
      key = normalizedClassName +":"+identity.getPrimaryId();
    } else {
      key = normalizedClassName +":"+ao.getShortLabel();
    }
  } else if (ao instanceof Feature) {
    String label = ao.getShortLabel()+"_"+createKey(((Feature)ao).getComponent());
    key = normalizedClassName+":"+label;
  } else {
    key = normalizedClassName +":"+ao.getShortLabel();
  }
  return key;
}

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

log.error("Interaction without any participants : " + interaction.getShortLabel());

相关文章