public Protein createProteinChain(Protein masterProt, String uniprotId, String shortLabel) { Protein chain = createProtein(uniprotId, shortLabel); if (masterProt.getAc() == null) { throw new IllegalArgumentException("Cannot create a chain if the master protein does not have an AC: "+masterProt.getShortLabel()); } CvXrefQualifier chainParent = createCvObject(CvXrefQualifier.class, CvXrefQualifier.CHAIN_PARENT_MI_REF, CvXrefQualifier.CHAIN_PARENT); CvDatabase uniprotKb = createCvObject(CvDatabase.class, CvDatabase.INTACT_MI_REF, CvDatabase.INTACT); InteractorXref isoformXref = createXref(chain, masterProt.getAc(), chainParent, uniprotKb); chain.addXref(isoformXref); return chain; }
public Protein createProteinSpliceVariant(Protein masterProt, String uniprotId, String shortLabel) { Protein spliceVariant = createProtein(uniprotId, shortLabel); if (masterProt.getAc() == null) { throw new IllegalArgumentException("Cannot create an splice variant if the master protein does not have an AC: "+masterProt.getShortLabel()); } CvXrefQualifier isoformParent = createCvObject(CvXrefQualifier.class, CvXrefQualifier.ISOFORM_PARENT_MI_REF, CvXrefQualifier.ISOFORM_PARENT); CvDatabase uniprotKb = createCvObject(CvDatabase.class, CvDatabase.INTACT_MI_REF, CvDatabase.INTACT); InteractorXref isoformXref = createXref(spliceVariant, masterProt.getAc(), isoformParent, uniprotKb); spliceVariant.addXref(isoformXref); return spliceVariant; }
public Protein createProteinChain(Protein masterProt, String uniprotId, String shortLabel) { Protein chain = createProtein(uniprotId, shortLabel); if (masterProt.getAc() == null) { throw new IllegalArgumentException("Cannot create a chain if the master protein does not have an AC: "+masterProt.getShortLabel()); } CvXrefQualifier chainParent = createCvObject(CvXrefQualifier.class, CvXrefQualifier.CHAIN_PARENT_MI_REF, CvXrefQualifier.CHAIN_PARENT); CvDatabase uniprotKb = createCvObject(CvDatabase.class, CvDatabase.INTACT_MI_REF, CvDatabase.INTACT); InteractorXref isoformXref = createXref(chain, masterProt.getAc(), chainParent, uniprotKb); chain.addXref(isoformXref); return chain; }
public Protein createProteinSpliceVariant(Protein masterProt, String uniprotId, String shortLabel) { Protein spliceVariant = createProtein(uniprotId, shortLabel); if (masterProt.getAc() == null) { throw new IllegalArgumentException("Cannot create an splice variant if the master protein does not have an AC: "+masterProt.getShortLabel()); } CvXrefQualifier isoformParent = createCvObject(CvXrefQualifier.class, CvXrefQualifier.ISOFORM_PARENT_MI_REF, CvXrefQualifier.ISOFORM_PARENT); CvDatabase uniprotKb = createCvObject(CvDatabase.class, CvDatabase.INTACT_MI_REF, CvDatabase.INTACT); InteractorXref isoformXref = createXref(spliceVariant, masterProt.getAc(), isoformParent, uniprotKb); spliceVariant.addXref(isoformXref); return spliceVariant; }
public Protein createProtein(String uniprotId, String shortLabel, BioSource bioSource) { CvInteractorType intType = createCvObject(CvInteractorType.class, CvInteractorType.PROTEIN_MI_REF, CvInteractorType.PROTEIN); Protein protein = new ProteinImpl(getInstitution(), bioSource, shortLabel, intType); InteractorXref idXref = createIdentityXrefUniprot(protein, uniprotId); protein.addXref(idXref); InteractorAlias alias = createAliasGeneName(protein, shortLabel.toUpperCase()); protein.addAlias(alias); String sequence = randomPeptideSequence(); String crc64 = Crc64.getCrc64(sequence); protein.setSequence(sequence); protein.setCrc64(crc64); return protein; }
private Protein createProtein(String uniprotId, String shortLabel, String geneName, BioSource bioSource, CvInteractorType intType) { Protein protein = new ProteinImpl(getInstitution(), bioSource, shortLabel, intType); InteractorXref idXref = createIdentityXrefUniprot(protein, uniprotId); protein.addXref(idXref); InteractorAlias alias = createAliasGeneName(protein, geneName); protein.addAlias(alias); String sequence = randomPeptideSequence(); String crc64 = Crc64.getCrc64(sequence); protein.setSequence(sequence); protein.setCrc64(crc64); return protein; }
private Protein createProtein(String uniprotId, String shortLabel, String geneName, BioSource bioSource, CvInteractorType intType) { Protein protein = new ProteinImpl(getInstitution(), bioSource, shortLabel, intType); InteractorXref idXref = createIdentityXrefUniprot(protein, uniprotId); protein.addXref(idXref); InteractorAlias alias = createAliasGeneName(protein, geneName); protein.addAlias(alias); String sequence = randomPeptideSequence(); String crc64 = Crc64.getCrc64(sequence); protein.setSequence(sequence); protein.setCrc64(crc64); return protein; }
private static void createXref( Protein protein, XrefTag xrefTag, boolean identity ) throws IntactException { CvXrefQualifier qualifier = null; if ( identity ) { qualifier = ControlledVocabularyRepository.getIdentityQualifier(); } CvDatabase database = XrefChecker.getCvDatabase( xrefTag.getDb() ); if ( database == null ) { // failed to find the database, skip the Xref creation } else { InteractorXref xref = new InteractorXref( IntactContext.getCurrentInstance().getInstitution(), database, xrefTag.getId(), xrefTag.getSecondary(), xrefTag.getVersion(), qualifier ); protein.addXref( xref ); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getXrefDao().persist( xref ); } }
private static void createXref( Protein protein, XrefTag xrefTag, boolean identity ) throws IntactException { CvXrefQualifier qualifier = null; if ( identity ) { qualifier = ControlledVocabularyRepository.getIdentityQualifier(); } CvDatabase database = XrefChecker.getCvDatabase( xrefTag.getDb() ); if ( database == null ) { // failed to find the database, skip the Xref creation } else { InteractorXref xref = new InteractorXref( IntactContext.getCurrentInstance().getInstitution(), database, xrefTag.getId(), xrefTag.getSecondary(), xrefTag.getVersion(), qualifier ); protein.addXref( xref ); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getXrefDao().persist( xref ); } }
private static void createXref( Protein protein, XrefTag xrefTag, boolean identity ) throws IntactException { CvXrefQualifier qualifier = null; if ( identity ) { qualifier = ControlledVocabularyRepository.getIdentityQualifier(); } CvDatabase database = XrefChecker.getCvDatabase( xrefTag.getDb() ); if ( database == null ) { // failed to find the database, skip the Xref creation } else { InteractorXref xref = new InteractorXref( IntactContext.getCurrentInstance().getInstitution(), database, xrefTag.getId(), xrefTag.getSecondary(), xrefTag.getVersion(), qualifier ); protein.addXref( xref ); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getXrefDao().persist( xref ); } }