private void xref(DbReference psiref, Set<Xref> bpXrefs) { // process ref type String refType = (psiref.hasRefType()) ? psiref.getRefType() : null; String refTypeAc = (psiref.hasRefTypeAc()) ? psiref.getRefTypeAc() : null; String psiDBRefId = psiref.getId(); String psiDBRefDb = psiref.getDb(); // If multiple ids given with comma separated values, then split them. for (String dbRefId : psiDBRefId.split(",")) { Xref bpXref = null; // Let's not make UnificationXrefs. RelationshipXref is more safe. // Often, a gene or omim ID (can be another species') is a protein's xref id with 'identity' type... if(!"pubmed".equalsIgnoreCase(psiDBRefDb)) { bpXref = relationshipXref(psiDBRefDb, dbRefId, refType, refTypeAc); } else { //TODO shall we skip PublicationXref here (IntAct puts the same PSIMI paper pmid everywhere...)? bpXref = publicationXref(psiDBRefDb, dbRefId); } if (bpXref != null) bpXrefs.add(bpXref); } }
private UnificationXref getPrimaryUnificationXref(psidev.psi.mi.xml.model.Xref psiXref) { if (psiXref==null || psiXref.getPrimaryRef() == null) return null; UnificationXref toReturn = null; DbReference psiDBRef = psiXref.getPrimaryRef(); String refType = (psiDBRef.hasRefType()) ? psiDBRef.getRefType() : null; // If multiple ids given with comma separated values, then split them. if (refType==null || "identity".equals(refType) || "identical object".equals(refType)) { toReturn = unificationXref(psiDBRef.getDb(), psiDBRef.getId()); } return toReturn; }
private RelationshipXref getInteractorPrimaryRef(psidev.psi.mi.xml.model.Xref psiXref) { if (psiXref==null || psiXref.getPrimaryRef() == null) return null; DbReference psiDBRef = psiXref.getPrimaryRef(); String refType = (psiDBRef.hasRefType()) ? psiDBRef.getRefType() : null; String refTypeAc = (psiDBRef.hasRefType()) ? psiDBRef.getRefTypeAc() : null; return relationshipXref(psiDBRef.getDb(), psiDBRef.getId(), refType, refTypeAc); }
if (!ref.hasRefType() ||(ref.hasRefType() && !ref.getRefType().equalsIgnoreCase("identity"))) { CrossReference cr = buildCrossReference(ref); if (!xrefs.contains(cr)) {