public CvExperimentalRole getEnzymeTarget() throws IntactException { return getByMiRef( CvExperimentalRole.class, CvExperimentalRole.ENZYME_TARGET_PSI_REF ); }
public CvExperimentalRole getPrey() throws IntactException { return getByMiRef( CvExperimentalRole.class, CvExperimentalRole.PREY_PSI_REF ); }
public CvExperimentalRole getEnzyme() throws IntactException { return getByMiRef( CvExperimentalRole.class, CvExperimentalRole.ENZYME_PSI_REF ); }
public CvExperimentalRole getUnspecified() throws IntactException { return getByMiRef( CvExperimentalRole.class, CvExperimentalRole.UNSPECIFIED_PSI_REF ); }
public <T extends CvObject> T getByMiRef( Class<T> cvType, String miRef ) { return getByMiRef( cvType, miRef, false ); }
public CvExperimentalRole getBait() throws IntactException { return getByMiRef( CvExperimentalRole.class, CvExperimentalRole.BAIT_PSI_REF ); }
public CvExperimentalRole getNeutral() throws IntactException { return getByMiRef( CvExperimentalRole.class, CvExperimentalRole.NEUTRAL_PSI_REF ); }
public CvExperimentalRole getSelf() throws IntactException { return getByMiRef( CvExperimentalRole.class, CvExperimentalRole.SELF_PSI_REF ); }
public void loadCommonCvObjects() { getByMiRef( CvDatabase.class, CvDatabase.INTACT_MI_REF ); getByMiRef( CvDatabase.class, CvDatabase.GO_MI_REF ); getByMiRef( CvDatabase.class, CvDatabase.INTERPRO_MI_REF ); getByMiRef( CvDatabase.class, CvDatabase.FLYBASE_MI_REF ); getByMiRef( CvDatabase.class, CvDatabase.REACTOME_PROTEIN_PSI_REF ); getByMiRef( CvDatabase.class, CvDatabase.HUGE_MI_REF ); getByMiRef( CvXrefQualifier.class, CvXrefQualifier.IDENTITY_MI_REF ); getByMiRef( CvXrefQualifier.class, CvXrefQualifier.SECONDARY_AC_MI_REF ); getByMiRef( CvXrefQualifier.class, CvXrefQualifier.ISOFORM_PARENT_MI_REF ); // only one search by shortlabel as it still doesn't have MI number. getByLabel( CvTopic.class, CvTopic.ISOFORM_COMMENT ); getByLabel( CvTopic.class, CvTopic.NON_UNIPROT ); getByMiRef( CvAliasType.class, CvAliasType.GENE_NAME_MI_REF ); getByMiRef( CvAliasType.class, CvAliasType.GENE_NAME_SYNONYM_MI_REF ); getByMiRef( CvAliasType.class, CvAliasType.ISOFORM_SYNONYM_MI_REF ); getByMiRef( CvAliasType.class, CvAliasType.LOCUS_NAME_MI_REF ); getByMiRef( CvAliasType.class, CvAliasType.ORF_NAME_MI_REF ); getByMiRef( CvInteractorType.class, CvInteractorType.getProteinMI() ); }
private static void initialise( ) { if ( initialisationDone == false ) { CvContext cvContext = IntactContext.getCurrentInstance().getCvContext(); // load CVs by shortlabel authorConfidenceTopic = cvContext.getByMiRef(CvTopic.class, CvTopic.AUTHOR_CONFIDENCE_MI_REF); noUniprotUpdate = cvContext.getByLabel(CvTopic.class, CvTopic.NON_UNIPROT); // load CVs by MI reference primaryReferenceXrefQualifier = cvContext.getByMiRef( CvXrefQualifier.class, CvXrefQualifier.PRIMARY_REFERENCE_MI_REF ); seeAlsoXrefQualifier = cvContext.getByMiRef( CvXrefQualifier.class, CvXrefQualifier.SEE_ALSO_MI_REF ); identityXrefQualifier = cvContext.getByMiRef( CvXrefQualifier.class, CvXrefQualifier.IDENTITY_MI_REF ); geneName = cvContext.getByMiRef(CvAliasType.class, CvAliasType.GENE_NAME_MI_REF ); initialisationDone = true; } } // init
private static void initialise( ) { if ( initialisationDone == false ) { CvContext cvContext = IntactContext.getCurrentInstance().getCvContext(); // load CVs by shortlabel authorConfidenceTopic = cvContext.getByMiRef(CvTopic.class, CvTopic.AUTHOR_CONFIDENCE_MI_REF); noUniprotUpdate = cvContext.getByLabel(CvTopic.class, CvTopic.NON_UNIPROT); // load CVs by MI reference primaryReferenceXrefQualifier = cvContext.getByMiRef( CvXrefQualifier.class, CvXrefQualifier.PRIMARY_REFERENCE_MI_REF ); seeAlsoXrefQualifier = cvContext.getByMiRef( CvXrefQualifier.class, CvXrefQualifier.SEE_ALSO_MI_REF ); identityXrefQualifier = cvContext.getByMiRef( CvXrefQualifier.class, CvXrefQualifier.IDENTITY_MI_REF ); geneName = cvContext.getByMiRef(CvAliasType.class, CvAliasType.GENE_NAME_MI_REF ); initialisationDone = true; } } // init
private CvXrefQualifier getIdentity() throws IntactException { CvXrefQualifier identity = IntactContext.getCurrentInstance().getCvContext().getByMiRef( CvXrefQualifier.class, CvXrefQualifier.IDENTITY_MI_REF ); if ( identity == null ) { throw new IllegalStateException( "Could not find the qualifier(identity) in the Database. Please update your controlled vocabularies." ); } return identity; }
/** * Returns CvDatabase(newt) * * @return * * @throws IntactException */ private CvDatabase getNewt() throws IntactException { CvDatabase newt = IntactContext.getCurrentInstance().getCvContext().getByMiRef( CvDatabase.class, CvDatabase.NEWT_MI_REF ); if ( newt == null ) { throw new IllegalStateException( "Could not find newt in the Database. Please update your controlled vocabularies." ); } return newt; }
public Set getPumedIds(Set experiments) { Set pubmeds = new HashSet(); for (Iterator iterator = experiments.iterator(); iterator.hasNext();) { Experiment experiment = (Experiment) iterator.next(); boolean found = false; for (Iterator iterator1 = experiment.getXrefs().iterator(); iterator1.hasNext() && !found;) { Xref xref = (Xref) iterator1.next(); if (getCvContext().getByMiRef(CvDatabase.class, CvDatabase.PUBMED_MI_REF).equals(xref.getCvDatabase()) && getCvContext().getByMiRef(CvXrefQualifier.class, CvXrefQualifier.PRIMARY_REFERENCE_MI_REF).equals(xref.getCvXrefQualifier())) { found = true; pubmeds.add(xref.getPrimaryId()); } } // xref if (found == false) { getOut().println("ERROR: " + experiment.getShortLabel() + " " + CvDatabase.PUBMED + " has no (" + CvXrefQualifier.PRIMARY_REFERENCE + ") assigned."); } } // experiments return pubmeds; }
/** * Get the intact master AC from the given Splice variant. * * @param protein the splice variant (Protein) for which we its intact master AC. * * @return the intact AC */ public final String getMasterAc(final Protein protein) { String ac = null; Collection<InteractorXref> xrefs = protein.getXrefs(); boolean found = false; for (Iterator<InteractorXref> iterator = xrefs.iterator(); iterator.hasNext() && !found;) { Xref xref = iterator.next(); if (getCvContext().getByMiRef(CvDatabase.class, CvDatabase.INTACT_MI_REF).equals(xref.getCvDatabase()) && getCvContext().getByMiRef(CvXrefQualifier.class, CvXrefQualifier.ISOFORM_PARENT_MI_REF).equals(xref.getCvXrefQualifier())) { ac = xref.getPrimaryId(); found = true; } } return ac; }
public static void checkCvInteractorType( ) { if ( false == interatorTypeChecked ) { // Load CvInteractorType( interaction / MI: ) cvProteinType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI()); if ( cvProteinType == null ) { MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) ); } interatorTypeChecked = true; } }
public static void checkCvInteractorType( ) { if ( false == interatorTypeChecked ) { // Load CvInteractorType( interaction / MI: ) cvProteinType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI()); if ( cvProteinType == null ) { MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) ); } interatorTypeChecked = true; } }
public static void checkCvInteractorType( ) { if ( false == interatorTypeChecked ) { // Load CvInteractorType( interaction / MI: ) cvInteractionType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI()); if ( cvInteractionType == null ) { MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) ); } interatorTypeChecked = true; } }
public static void checkCvInteractorType( ) { if ( false == interatorTypeChecked ) { // Load CvInteractorType( interaction / MI: ) cvInteractionType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI()); if ( cvInteractionType == null ) { MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) ); } interatorTypeChecked = true; } }
private static void checkCvTypeIdentification( FeatureTag feature ) { XrefTag psiDef = feature.getFeatureType().getPsiDefinition(); XrefChecker.check( psiDef ); final String id = psiDef.getId(); if ( !featureTypeCache.keySet().contains( id ) ) { CvFeatureType featureType = null; try { featureType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvFeatureType.class,id); if ( featureType == null ) { MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvFeatureType by PSI definition: " + id ) ); } else { System.out.println( "Found CvFeatureType " + id + " as " + featureType.getShortLabel() ); } } catch ( IntactException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvFeatureType " + "having the PSI definition: " + id ) ); e.printStackTrace(); } featureTypeCache.put( id, featureType ); } }