本文整理了Java中uk.ac.ebi.intact.model.Interaction.setShortLabel()
方法的一些代码示例,展示了Interaction.setShortLabel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interaction.setShortLabel()
方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Interaction
类名称:Interaction
方法名:setShortLabel
暂无
代码示例来源: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 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/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.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-readonly
public Interaction createInteraction(String ... interactorShortLabels) {
Interaction interaction = createInteractionDirect();
Protein prot = null;
for (String interactorShortLabel : interactorShortLabels) {
prot = createDeterministicProtein(interactorShortLabel, interactorShortLabel);
createComponentNeutral(interaction, prot);
}
if (interactorShortLabels.length == 1) {
createComponentNeutral(interaction, prot);
}
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.core/intact-core
public Interaction createInteraction(String ... interactorShortLabels) {
Interaction interaction = createInteractionDirect();
Protein prot = null;
for (String interactorShortLabel : interactorShortLabels) {
prot = createDeterministicProtein(interactorShortLabel, interactorShortLabel);
createComponentNeutral(interaction, prot);
}
if (interactorShortLabels.length == 1) {
createComponentNeutral(interaction, prot);
}
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-readonly
public Interaction createInteractionRandomBinary(String imexId) {
CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION );
Experiment experimentEmpty = createExperimentEmpty();
Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experimentEmpty)),
cvInteractionType, intType, nextString("label"), getInstitution());
experimentEmpty.getInteractions().add(interaction);
createComponentBait(interaction, createProteinRandom());
createComponentPrey(interaction, createProteinRandom());
String shortLabel = InteractionUtils.calculateShortLabel(interaction);
interaction.setShortLabel(shortLabel);
if (imexId != null) {
CvObjectBuilder cvBuilder = new CvObjectBuilder();
CvXrefQualifier idQual = cvBuilder.createIdentityCvXrefQualifier(getInstitution());
CvDatabase imexDb = createCvObject(CvDatabase.class, CvDatabase.IMEX_MI_REF, CvDatabase.IMEX);
interaction.addXref(new InteractorXref(getInstitution(), imexDb, imexId, idQual));
}
return interaction;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
public Interaction createInteractionRandomBinary(String imexId) {
CvInteractionType cvInteractionType = createCvObject(CvInteractionType.class, CvInteractionType.DIRECT_INTERACTION_MI_REF, CvInteractionType.DIRECT_INTERACTION);
CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.INTERACTION_MI_REF, CvInteractorType.INTERACTION );
Experiment experimentEmpty = createExperimentEmpty();
Interaction interaction = new InteractionImpl(new ArrayList<Experiment>(Arrays.asList(experimentEmpty)),
cvInteractionType, intType, nextString("label"), getInstitution());
experimentEmpty.getInteractions().add(interaction);
createComponentBait(interaction, createProteinRandom());
createComponentPrey(interaction, createProteinRandom());
String shortLabel = InteractionUtils.calculateShortLabel(interaction);
interaction.setShortLabel(shortLabel);
if (imexId != null) {
CvObjectBuilder cvBuilder = new CvObjectBuilder();
CvXrefQualifier idQual = cvBuilder.createIdentityCvXrefQualifier(getInstitution());
CvDatabase imexDb = createCvObject(CvDatabase.class, CvDatabase.IMEX_MI_REF, CvDatabase.IMEX);
interaction.addXref(new InteractorXref(getInstitution(), imexDb, imexId, idQual));
}
return interaction;
}
内容来源于网络,如有侵权,请联系作者删除!