@Override public ProteinUpdateError createMatchSeveralUniprotEntriesError(String proteinAc, String uniprotAc, String taxId, UpdateError errorLabel, Collection<UniprotProtein> identitiesSameOrganism, Collection<UniprotProtein> identitiesDifferentOrganism) { MatchSeveralUniprotEntries error = new MatchSeveralUniprotEntries(null, proteinAc, uniprotAc, taxId, errorLabel); for (UniprotProtein p : identitiesSameOrganism){ error.getUniprotIdentities().add(p.getPrimaryAc()); } for (UniprotProtein p : identitiesDifferentOrganism){ error.getUniprotFromDifferentOrganisms().add(p.getPrimaryAc()); } return error; }
public UniprotFeatureChain retrieveUniprotFeatureChain( UniprotProtein uniProtEntry, String ac) { if (uniProtEntry != null && ac != null){ for (UniprotFeatureChain fc : uniProtEntry.getFeatureChains()){ String acFixed = ac; // if not of type primaryAc-PRO_xxxxx, it is not a feature chain. we have to build the feature chain ac if (ac.indexOf("-") == -1){ acFixed = uniProtEntry.getPrimaryAc() + "-" + ac; } if (acFixed.equals(fc.getPrimaryAc())){ return fc; } } } return null; } }
r.setTremblAccession(tremblEntry.getPrimaryAc());
r.setTremblAccession(tremblEntry.getPrimaryAc());
String uniprotId = evt.getProtein() != null ? evt.getProtein().getPrimaryAc() : null;
r.setTremblAccession(tremblEntry.getPrimaryAc());
@Override @Transactional( "update" ) public void onSecondaryAcsFound(UpdateCaseEvent evt) throws ProcessorException { // reattach the updateProcess to the entity manager ProteinUpdateProcess updateProcess = IntactUpdateContext.getCurrentInstance().getUpdateFactory().getEntityManager().merge(this.updateProcess); Collection<Protein> secondaryProteins = evt.getSecondaryProteins(); Collection<ProteinTranscript> secondaryIsoforms = evt.getSecondaryIsoforms(); Collection<XrefUpdaterReport> secondaryXrefReports = evt.getXrefUpdaterReports(); for (Protein prot : secondaryProteins){ InteractorXref oldPrimary = ProteinUtils.getUniprotXref(prot); String oldAc = oldPrimary != null ? oldPrimary.getPrimaryId() : null; SecondaryProteinEvent protEvt = new SecondaryProteinEvent(updateProcess, prot, oldAc, evt.getProtein().getPrimaryAc()); IntactUpdateContext.getCurrentInstance().getUpdateFactory().getSecondaryProteinEventDao().persist(protEvt); } for (ProteinTranscript protTrans : secondaryIsoforms){ Protein prot = protTrans.getProtein(); InteractorXref oldPrimary = ProteinUtils.getUniprotXref(prot); String oldAc = oldPrimary != null ? oldPrimary.getPrimaryId() : null; SecondaryProteinEvent protEvt = new SecondaryProteinEvent(updateProcess, prot, oldAc, protTrans.getUniprotVariant().getPrimaryAc()); IntactUpdateContext.getCurrentInstance().getUpdateFactory().getSecondaryProteinEventDao().persist(protEvt); } }
r.setTremblAccession(tremblEntry.getPrimaryAc());