public int compare( Component p1, Component p2 ) { Interactor i1 = p1.getInteractor(); if ( i1 == null ) { throw new IllegalArgumentException( "Both participant should hold a valid interactor." ); } Interactor i2 = p2.getInteractor(); if ( i2 == null ) { throw new IllegalArgumentException( "Both participant should hold a valid interactor." ); } String name1 = i1.getShortLabel(); String name2 = i2.getShortLabel(); int result; if ( name1 == null ) { result = -1; } else if ( name2 == null ) { result = 1; } else { result = name1.compareTo( name2 ); } return result; } } );
return protein.getShortLabel(); geneName = protein.getShortLabel();
return protein.getShortLabel(); geneName = protein.getShortLabel();
return protein.getShortLabel(); geneName = protein.getShortLabel();
protected void copyInteractorCommons( Interactor source, Interactor target ) { if ( target.getBioSource() != null && source.getBioSource() == null ) { throw new PersisterException( "Operation not permitted: nullifying biosource of a " + target.getClass().getSimpleName() + " (" + target.getShortLabel() + ") - " + " current biosource is " + target.getBioSource().getShortLabel() ); } copyProperty(source, "bioSource", target); copyProperty(source, "cvInteractorType", target); }
protected void copyInteractorCommons( Interactor source, Interactor target ) { if ( target.getBioSource() != null && source.getBioSource() == null ) { throw new PersisterException( "Operation not permitted: nullifying biosource of a " + target.getClass().getSimpleName() + " (" + target.getShortLabel() + ") - " + " current biosource is " + target.getBioSource().getShortLabel() ); } copyProperty(source, "bioSource", target); copyProperty(source, "cvInteractorType", target); }
psidev.psi.mi.tab.model.Alias displayLong = new AliasImpl( CvDatabase.PSI_MI, polymer.getShortLabel(), InteractorConverter.DISPLAY_LONG ); mitabInteractor.getAliases().add(displayLong); if (!hasFoundDisplayShort){ psidev.psi.mi.tab.model.Alias altId = new AliasImpl( CvDatabase.PSI_MI, polymer.getShortLabel(),InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(altId); CrossReference id = new CrossReferenceImpl( defaultInstitution, polymer.getShortLabel()); mitabInteractor.getIdentifiers().add(id); psidev.psi.mi.tab.model.Alias altId = new AliasImpl( CvDatabase.PSI_MI, polymer.getShortLabel(),InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(altId); psidev.psi.mi.tab.model.Alias displayLong = new AliasImpl( CvDatabase.PSI_MI, polymer.getShortLabel(),InteractorConverter.DISPLAY_LONG ); mitabInteractor.getAliases().add(displayLong);
psidev.psi.mi.tab.model.Alias displayShort = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(displayShort); psidev.psi.mi.tab.model.Alias displayShort = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(displayShort); CrossReference id = new CrossReferenceImpl( defaultInstitution, mol.getShortLabel()); mitabInteractor.getIdentifiers().add(id); psidev.psi.mi.tab.model.Alias displayShort = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(displayShort); psidev.psi.mi.tab.model.Alias displayLong = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_LONG ); mitabInteractor.getAliases().add(displayLong);
psidev.psi.mi.tab.model.Alias displayShort = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(displayShort); CrossReference id = new CrossReferenceImpl( this.defaultInstitution, mol.getShortLabel()); mitabInteractor.getIdentifiers().add(id); psidev.psi.mi.tab.model.Alias displayLong = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_LONG ); mitabInteractor.getAliases().add(displayLong);
psidev.psi.mi.tab.model.Alias displayLong = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(displayLong); psidev.psi.mi.tab.model.Alias shortLabel = new AliasImpl( CvDatabase.ENSEMBL, mol.getShortLabel(), InteractorConverter.SHORTLABEL ); mitabInteractor.getAliases().add(shortLabel); psidev.psi.mi.tab.model.Alias altId = new AliasImpl( defaultInstitution, mol.getShortLabel(), InteractorConverter.SHORTLABEL ); mitabInteractor.getAliases().add(altId); CrossReference id = new CrossReferenceImpl( defaultInstitution, mol.getShortLabel()); mitabInteractor.getIdentifiers().add(id); psidev.psi.mi.tab.model.Alias displayLong = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_LONG ); mitabInteractor.getAliases().add(displayLong);
@Override protected void processAccessionAndDisplay(uk.ac.ebi.intact.model.Interactor mol, Interactor mitabInteractor, boolean hasFoundEMBLIdentity) { psidev.psi.mi.tab.model.Alias displayShort = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_SHORT ); mitabInteractor.getAliases().add(displayShort); CrossReference id = new CrossReferenceImpl( defaultInstitution, mol.getShortLabel()); mitabInteractor.getIdentifiers().add(id); psidev.psi.mi.tab.model.Alias displayLong = new AliasImpl( CvDatabase.PSI_MI, mol.getShortLabel(), InteractorConverter.DISPLAY_LONG ); mitabInteractor.getAliases().add(displayLong);
interactor.getAc() + " / " + interactor.getShortLabel() + " / " + component.getClass() + "). ");
interactor.getAc() + " / " + interactor.getShortLabel() + " / " + component.getClass() + "). ");
sb.append(interactor.getShortLabel());
sb.append(interactor.getShortLabel());
bait = interactor.getShortLabel(); String prey = interactor.getShortLabel(); stmt.executeUpdate("INSERT INTO ia_payg_current_edge " + "VALUES(\'" + bait + "\',\'" + prey + "\',0,0,\'" + species + "\')"); "AC: " + interactor.getAc() + " Shortlabel:" + interactor.getShortLabel());
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; }
protected void indexInteractorNames(Interactor interactor, SolrInputDocument solrDocument){ // shortname solrDocument.addField ( ComplexFieldNames.INTERACTOR_ALIAS, interactor.getShortLabel ( ) ) ; // fullname if (interactor.getFullName() != null){ solrDocument.addField ( ComplexFieldNames.INTERACTOR_ALIAS, interactor.getFullName ( ) ) ; } // aliases for ( Alias alias : interactor.getAliases ( ) ) { if (alias.getName() != null){ if (alias.getCvAliasType() != null){ CvAliasType type = alias.getCvAliasType(); solrDocument.addField ( ComplexFieldNames.INTERACTOR_ALIAS, type.getShortLabel() ) ; solrDocument.addField ( ComplexFieldNames.INTERACTOR_ALIAS, alias.getName() ) ; solrDocument.addField ( ComplexFieldNames.INTERACTOR_ALIAS, type.getShortLabel()+":"+alias.getName()) ; } else{ solrDocument.addField ( ComplexFieldNames.INTERACTOR_ALIAS, alias.getName()); } } } }
log.error("Interactor not considered as polymer but which contains a sequence : " + interactor.getShortLabel() + ". The sequence will be ignored.");
log.error("Interactor without interactor type : " + intactObject.getShortLabel());