object = new ChecksumImpl(result[0], result[1]); } else throw new IllegalFormatException("String cannot be parsed to create a checksum (check the syntax): " + Arrays.asList(result).toString());
Checksum checksum = new ChecksumImpl(InteractionConverter.RIGID, rigid); interactions.iterator().next().getChecksums().add(checksum);
/** * Enrich the mitab interactor following data best practices for small molecules * @param smallMolecule * @param mitabInteractor * @return the standard InchiKey for the small molecule. Can be null if no standard inchi key available */ public String enrichSmallMoleculeFromIntact(SmallMolecule smallMolecule, Interactor mitabInteractor){ if (smallMolecule != null && mitabInteractor != null){ Collection<InteractorXref> interactorXrefs = smallMolecule.getXrefs(); Collection<InteractorAlias> aliases = smallMolecule.getAliases(); // xrefs boolean hasFoundCHEBIdentity = processXrefs(mitabInteractor, interactorXrefs); // ac and display long processAccessionAndDisplay(smallMolecule, mitabInteractor, hasFoundCHEBIdentity); // convert aliases if (!aliases.isEmpty()){ processAliases(mitabInteractor, aliases); } // convert checksum (standard inchi key : only if available in annotation) String inchiKey = extractStandardInchiKeyFrom(smallMolecule); if (inchiKey != null){ mitabInteractor.getChecksums().add( new ChecksumImpl(STANDARD_INCHI_KEY, inchiKey)); } return inchiKey; } return null; }
/** * Enrich the mitab interactor following data best practices for nucleic acids * @param nucleicAcid * @param mitabInteractor * @return the standard InchiKey for the small molecule. Can be null if no standard inchi key available */ public void enrichNucleicAcidFromIntact(NucleicAcid nucleicAcid, Interactor mitabInteractor){ if (nucleicAcid != null && mitabInteractor != null){ Collection<InteractorXref> interactorXrefs = nucleicAcid.getXrefs(); Collection<InteractorAlias> aliases = nucleicAcid.getAliases(); // xrefs boolean hasFoundEMBLdentity = processXrefs(mitabInteractor, interactorXrefs); // ac and display long processAccessionAndDisplay(nucleicAcid, mitabInteractor, hasFoundEMBLdentity); // convert aliases if (!aliases.isEmpty()){ processAliases(mitabInteractor, aliases); } // uses crc64 for checksum if (nucleicAcid.getCrc64() != null){ Checksum checksum = new ChecksumImpl(InteractorConverter.CRC64, nucleicAcid.getCrc64()); mitabInteractor.getChecksums().add(checksum); } } }
Checksum checksum = new ChecksumImpl(RIGID, rigid); bi.getChecksums().add(checksum);
/** * Enrich the mitab interactor following data best practices for nucleic acids * @param interactor * @param mitabInteractor * @return the standard InchiKey for the small molecule. Can be null if no standard inchi key available */ public void enrichInteractorFromIntact(uk.ac.ebi.intact.model.Interactor interactor, Interactor mitabInteractor){ if (interactor != null && mitabInteractor != null){ Collection<InteractorXref> interactorXrefs = interactor.getXrefs(); Collection<InteractorAlias> aliases = interactor.getAliases(); // xrefs boolean hasFoundIdentity = processXrefs(mitabInteractor, interactorXrefs); // ac and display long processAccessionAndDisplay(interactor, mitabInteractor, hasFoundIdentity); // convert aliases if (!aliases.isEmpty()){ processAliases(mitabInteractor, aliases); } // uses crc64 for checksum if (interactor instanceof Polymer){ Polymer polymer = (Polymer) interactor; if (polymer.getCrc64() != null){ Checksum checksum = new ChecksumImpl(InteractorConverter.CRC64, polymer.getCrc64()); mitabInteractor.getChecksums().add(checksum); } } } }
/** * Enrich the mitab interactor following data best practices for nucleic acids * @param gene * @param mitabInteractor * @return the standard InchiKey for the small molecule. Can be null if no standard inchi key available */ public void enrichGeneFromIntact(uk.ac.ebi.intact.model.Interactor gene, Interactor mitabInteractor){ hasFoundDisplayShort = false; if (gene != null && mitabInteractor != null){ Collection<InteractorXref> interactorXrefs = gene.getXrefs(); Collection<InteractorAlias> aliases = gene.getAliases(); // xrefs boolean hasFoundENSEMBLIdentity = processXrefs(mitabInteractor, interactorXrefs); // convert aliases if (!aliases.isEmpty()){ processAliases(mitabInteractor, aliases); } // ac and display long processAccessionAndDisplay(gene, mitabInteractor, hasFoundENSEMBLIdentity); // uses crc64 for checksum if (gene instanceof Polymer){ Polymer polymer = (Polymer) gene; if (polymer.getCrc64() != null){ Checksum checksum = new ChecksumImpl(InteractorConverter.CRC64, polymer.getCrc64()); mitabInteractor.getChecksums().add(checksum); } } } }
final String rogA = rogidGenerator.calculateRogid(rig.getSequence(), rig.getTaxid()); mitabInteractor.getChecksums().add( new ChecksumImpl(ROGID, rogA));
Checksum checksum = new ChecksumImpl(InteractionConverter.RIGID, rigid); expandedBinary.getChecksums().add(checksum); Checksum checksum = new ChecksumImpl(InteractionConverter.RIGID, rigid); interactions.iterator().next().getChecksums().add(checksum);
Checksum checksum = new ChecksumImpl(InteractionConverter.RIGID, rigid); expandedBinary.getChecksums().add(checksum); Checksum checksum = new ChecksumImpl(InteractionConverter.RIGID, rigid); interactions.iterator().next().getChecksums().add(checksum);
Checksum crc = new ChecksumImpl(CRC, interaction.getCrc()); binary.getChecksums().add(crc);
if (checksumNames.contains(name.toLowerCase())) { iChecksums.add(new ChecksumImpl(name, text)); } else {
if (checksumNames.contains(name.toLowerCase())) { checksums.add(new ChecksumImpl(name, text)); } else { if (checksumNames.contains(name.toLowerCase())) { checksums.add(new ChecksumImpl(name, text)); } else {