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

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

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

Interaction.addComponent介绍

暂无

代码示例

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

public Interaction createInteraction(String shortLabel, Interactor bait, Interactor prey, Experiment experiment) {
  CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
  Interaction interaction = new InteractionImpl(Arrays.asList(experiment), cvInteractionType, null, shortLabel, getInstitution());
  interaction.addComponent(createComponentBait(interaction, bait));
  interaction.addComponent(createComponentPrey(interaction, prey));
  return interaction;
}

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

public Interaction createInteraction(Component ... components) {
  CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
  Experiment experiment = createExperimentEmpty();
  Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)), cvInteractionType, null, "temp", getInstitution());
  for (Component component : components) {
    interaction.addComponent(component);
  }
  String shortLabel = InteractionUtils.calculateShortLabel(interaction);
  interaction.setShortLabel(shortLabel);
  return interaction;
}

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

public Interaction createInteractionRandomBinary() {
  CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
  Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, null, nextString("label"), getInstitution());
  interaction.addComponent(createComponentBait(interaction, createProteinRandom()));
  interaction.addComponent(createComponentPrey(interaction, createProteinRandom()));
  String shortLabel = InteractionUtils.calculateShortLabel(interaction);
  interaction.setShortLabel(shortLabel);
  return interaction;
}

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

public Interaction createInteraction(String ... interactorShortLabels) {
  CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
  Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(createExperimentEmpty())), cvInteractionType, null, nextString("label"), getInstitution());
  for (String interactorShortLabel : interactorShortLabels) {
    interaction.addComponent(createComponentNeutral(interaction, createProtein("uniprotId", interactorShortLabel)));
  }
  if (interactorShortLabels.length == 1) {
    interaction.addComponent(createComponentNeutral(interaction, createProtein("uniprotId", interactorShortLabels[0])));
  }
  String shortLabel = InteractionUtils.calculateShortLabel(interaction);
  interaction.setShortLabel(shortLabel);
  return interaction;
}

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

public Interaction createInteraction(Component ... components) {
  CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
  Experiment experiment = createExperimentEmpty();
  CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION );
  Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)),
                         cvInteractionType, intType, "temp", getInstitution());
  for (Component component : components) {
    interaction.addComponent(component);
  }
  try {
    String shortLabel = InteractionUtils.calculateShortLabel(interaction);
    interaction.setShortLabel(shortLabel);
  } catch (Exception e) {
    interaction.setShortLabel("unk-unk");
  }
  return interaction;
}

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

public Interaction createInteraction(Component ... components) {
  CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
  Experiment experiment = createExperimentEmpty();
  CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION );
  Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experiment)),
                         cvInteractionType, intType, "temp", getInstitution());
  for (Component component : components) {
    interaction.addComponent(component);
  }
  try {
    String shortLabel = InteractionUtils.calculateShortLabel(interaction);
    interaction.setShortLabel(shortLabel);
  } catch (Exception e) {
    interaction.setShortLabel("unk-unk");
  }
  return interaction;
}

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

public Component createComponent(Interaction interaction, Interactor interactor, CvExperimentalRole expRole, CvBiologicalRole bioRole) {
  Component component = new Component(getInstitution(), interaction, interactor, expRole, bioRole);
  CvIdentification cvParticipantDetMethod = createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED);
  component.getParticipantDetectionMethods().add(cvParticipantDetMethod);
  CvExperimentalPreparation cvExperimentalPreparation = createCvObject(CvExperimentalPreparation.class, CvExperimentalPreparation.PURIFIED_REF, CvExperimentalPreparation.PURIFIED);
  component.getExperimentalPreparations().add(cvExperimentalPreparation);
  
  ComponentParameter componentParameter = createDeterministicComponentParameter();
  component.addParameter(componentParameter);
  
  interactor.addActiveInstance( component );
  interaction.addComponent( component );
  return component;
}

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

public Component createComponent(Interaction interaction, Interactor interactor, CvExperimentalRole expRole, CvBiologicalRole bioRole) {
  Component component = new Component(getInstitution(), interaction, interactor, expRole, bioRole);
  CvIdentification cvParticipantDetMethod = createCvObject(CvIdentification.class, CvIdentification.PREDETERMINED_MI_REF, CvIdentification.PREDETERMINED);
  component.getParticipantDetectionMethods().add(cvParticipantDetMethod);
  CvExperimentalPreparation cvExperimentalPreparation = createCvObject(CvExperimentalPreparation.class, CvExperimentalPreparation.PURIFIED_REF, CvExperimentalPreparation.PURIFIED);
  component.getExperimentalPreparations().add(cvExperimentalPreparation);
  
  ComponentParameter componentParameter = createDeterministicComponentParameter();
  component.addParameter(componentParameter);
  
  interactor.addActiveInstance( component );
  interaction.addComponent( component );
  return component;
}

相关文章