/** * Search a protein in the cache * * @param id * @param bioSource * * @return */ public static ProteinHolder getProtein( String id, String db, BioSource bioSource ) { String taxid = null; if ( null != bioSource ) { taxid = bioSource.getTaxId(); } // System.out.println( "Search cache using: " + buildID( id, db, taxid ) ); return (ProteinHolder) cache.get( buildID( id, db, taxid ) ); }
public static void check( final ProteinParticipantTag proteinParticipant, final UpdateProteinsI proteinFactory, final BioSourceFactory bioSourceFactory ) { final String role = proteinParticipant.getRole(); RoleChecker.check( role ); final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor(); ProteinInteractorChecker.check( proteinInteractor, proteinFactory, bioSourceFactory ); final Collection features = proteinParticipant.getFeatures(); for ( Iterator iterator = features.iterator(); iterator.hasNext(); ) { FeatureTag feature = (FeatureTag) iterator.next(); FeatureChecker.ckeck( feature ); } // check feature clustering (specific to PSI version 1) try { proteinParticipant.getClusteredFeatures(); } catch ( IllegalArgumentException iae ) { MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while checking if the feature were clusterizable: " + iae.getMessage() ) ); } // TODO check isOverExpressed // TODO check isTaggedProtein: as we have to create a Feature having CvFeatureType(tagged-protein) with undetermined range } }
CvXrefQualifier identity = ControlledVocabularyRepository.getIdentityQualifier(); if ( isSpliceVariant( id ) ) { if ( DEBUG ) { System.out.println( "is splice variant ID" ); if ( hasMultipleBioSource( proteins ) ) { StringBuffer sb = new StringBuffer( 64 ); sb.append( "The uniprot id: " ).append( id ); Collection filteredProteins = filterByTaxid( proteins, taxid ); int count = filteredProteins.size(); if ( count == 1 ) { Collection filtered = filterByTaxid( spliceVariants, taxid ); for ( Iterator iterator = filtered.iterator(); iterator.hasNext(); ) { final Protein sv = (Protein) iterator.next(); if ( hasMultipleBioSource( proteins ) ) { StringBuffer sb = new StringBuffer( 64 ); sb.append( "The uniprot id: " ).append( id ); Collection filteredProteins = filterByTaxid( proteins, taxid ); int count = filteredProteins.size(); if ( count == 1 ) {
String db = proteinInteractor.getPrimaryXref().getDb(); final String cacheId = buildID( proteinId, db, taxId ); checkCvInteractorType( ); if( XrefChecker.getCvDatabase( primary.getDb() ) != null ) { protein = getOrCreateNonUniprotProtein( proteinInteractor ); result = getIntactProtein( proteinId, taxId, proteinInteractor ); } catch ( AmbiguousBioSourceException e ) { result = getIntactProtein( proteinId, taxId, proteinInteractor ); } catch ( AmbiguousBioSourceException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( e.getMessage() ) );
/** * Get an Intact Protein out of a ProteinInteractorTag. * * @param proteinParticipant * * @return the IntAct Protein correcponding to the given ProteinParticipantTag. */ private static ProteinHolder getProtein( final ProteinParticipantTag proteinParticipant ) { final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor(); OrganismTag organism = proteinInteractor.getOrganism(); BioSource bioSource = null; if ( organism != null ) { bioSource = OrganismChecker.getBioSource( proteinInteractor.getOrganism() ); } String proteinId = proteinInteractor.getPrimaryXref().getId(); String db = proteinInteractor.getPrimaryXref().getDb(); // System.out.println( "Search interactor (" + proteinInteractor.getShortlabel() + ") from cache(" + // proteinId + ", " + db + ", " + bioSource.getShortLabel() + ")" ); return ProteinInteractorChecker.getProtein( proteinId, db, bioSource ); } }
createXref( protein, proteinInteractor.getPrimaryXref(), true ); createXref( protein, xrefTag, false );
String db = proteinInteractor.getPrimaryXref().getDb(); final String cacheId = buildID( proteinId, db, taxId ); checkCvInteractorType( ); if( XrefChecker.getCvDatabase( primary.getDb() ) != null ) { protein = getOrCreateNonUniprotProtein( proteinInteractor ); result = getIntactProtein( proteinId, taxId, proteinInteractor ); } catch ( AmbiguousBioSourceException e ) { result = getIntactProtein( proteinId, taxId, proteinInteractor ); } catch ( AmbiguousBioSourceException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( e.getMessage() ) );
/** * Get an Intact Protein out of a ProteinInteractorTag. * * @param proteinParticipant * * @return the IntAct Protein correcponding to the given ProteinParticipantTag. */ private static ProteinHolder getProtein( final ProteinParticipantTag proteinParticipant ) { final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor(); OrganismTag organism = proteinInteractor.getOrganism(); BioSource bioSource = null; if ( organism != null ) { bioSource = OrganismChecker.getBioSource( proteinInteractor.getOrganism() ); } String proteinId = proteinInteractor.getPrimaryXref().getId(); String db = proteinInteractor.getPrimaryXref().getDb(); // System.out.println( "Search interactor (" + proteinInteractor.getShortlabel() + ") from cache(" + // proteinId + ", " + db + ", " + bioSource.getShortLabel() + ")" ); return ProteinInteractorChecker.getProtein( proteinId, db, bioSource ); } }
createXref( protein, proteinInteractor.getPrimaryXref(), true ); createXref( protein, xrefTag, false );
String db = proteinInteractor.getPrimaryXref().getDb(); final String cacheId = buildID( proteinId, db, taxId ); checkCvInteractorType( ); if( XrefChecker.getCvDatabase( primary.getDb() ) != null ) { protein = getOrCreateNonUniprotProtein( proteinInteractor ); result = getIntactProtein( proteinId, taxId, proteinInteractor ); } catch ( AmbiguousBioSourceException e ) { result = getIntactProtein( proteinId, taxId, proteinInteractor ); } catch ( AmbiguousBioSourceException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( e.getMessage() ) );
CvXrefQualifier identity = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvXrefQualifier.class, CvXrefQualifier.IDENTITY_MI_REF); if ( isSpliceVariant( id ) ) { if ( DEBUG ) { System.out.println( "is splice variant ID" ); if ( hasMultipleBioSource( proteins ) ) { StringBuffer sb = new StringBuffer( 64 ); sb.append( "The uniprot id: " ).append( id ); Collection filteredProteins = filterByTaxid( proteins, taxid ); int count = filteredProteins.size(); if ( count == 1 ) { Collection filtered = filterByTaxid( spliceVariants, taxid ); for ( Iterator iterator = filtered.iterator(); iterator.hasNext(); ) { final Protein sv = (Protein) iterator.next(); if ( hasMultipleBioSource( proteins ) ) { StringBuffer sb = new StringBuffer( 64 ); sb.append( "The uniprot id: " ).append( id ); Collection filteredProteins = filterByTaxid( proteins, taxid ); int count = filteredProteins.size(); if ( count == 1 ) {
/** * Get an Intact Protein out of a ProteinInteractorTag. * * @param proteinParticipant * * @return the IntAct Protein correcponding to the given ProteinParticipantTag. */ private static ProteinHolder getProtein( final ProteinParticipantTag proteinParticipant ) { final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor(); OrganismTag organism = proteinInteractor.getOrganism(); BioSource bioSource = null; if ( organism != null ) { bioSource = OrganismChecker.getBioSource( proteinInteractor.getOrganism() ); } String proteinId = proteinInteractor.getPrimaryXref().getId(); String db = proteinInteractor.getPrimaryXref().getDb(); // System.out.println( "Search interactor (" + proteinInteractor.getShortlabel() + ") from cache(" + // proteinId + ", " + db + ", " + bioSource.getShortLabel() + ")" ); return ProteinInteractorChecker.getProtein( proteinId, db, bioSource ); } }
public static void check( final ProteinParticipantTag proteinParticipant, final UpdateProteinsI proteinFactory, final BioSourceFactory bioSourceFactory ) { final String role = proteinParticipant.getRole(); RoleChecker.check( role ); final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor(); ProteinInteractorChecker.check( proteinInteractor, proteinFactory, bioSourceFactory ); final Collection features = proteinParticipant.getFeatures(); for ( Iterator iterator = features.iterator(); iterator.hasNext(); ) { FeatureTag feature = (FeatureTag) iterator.next(); FeatureChecker.ckeck( feature ); } // check feature clustering (specific to PSI version 1) try { proteinParticipant.getClusteredFeatures(); } catch ( IllegalArgumentException iae ) { MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while checking if the feature were clusterizable: " + iae.getMessage() ) ); } // TODO check isOverExpressed // TODO check isTaggedProtein: as we have to create a Feature having CvFeatureType(tagged-protein) with undetermined range } }
/** * Search a protein in the cache * * @param id * @param bioSource * * @return */ public static ProteinHolder getProtein( String id, String db, BioSource bioSource ) { String taxid = null; if ( null != bioSource ) { taxid = bioSource.getTaxId(); } // System.out.println( "Search cache using: " + buildID( id, db, taxid ) ); return (ProteinHolder) cache.get( buildID( id, db, taxid ) ); }
createXref( protein, proteinInteractor.getPrimaryXref(), true ); createXref( protein, xrefTag, false );
CvXrefQualifier identity = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvXrefQualifier.class, CvXrefQualifier.IDENTITY_MI_REF); if ( isSpliceVariant( id ) ) { if ( DEBUG ) { System.out.println( "is splice variant ID" ); if ( hasMultipleBioSource( proteins ) ) { StringBuffer sb = new StringBuffer( 64 ); sb.append( "The uniprot id: " ).append( id ); Collection filteredProteins = filterByTaxid( proteins, taxid ); int count = filteredProteins.size(); if ( count == 1 ) { Collection filtered = filterByTaxid( spliceVariants, taxid ); for ( Iterator iterator = filtered.iterator(); iterator.hasNext(); ) { final Protein sv = (Protein) iterator.next(); if ( hasMultipleBioSource( proteins ) ) { StringBuffer sb = new StringBuffer( 64 ); sb.append( "The uniprot id: " ).append( id ); Collection filteredProteins = filterByTaxid( proteins, taxid ); int count = filteredProteins.size(); if ( count == 1 ) {
final String proteinId = proteinInteractor.getPrimaryXref().getId(); final String db = proteinInteractor.getPrimaryXref().getDb(); final ProteinHolder proteinHolder = ProteinInteractorChecker.getProtein( proteinId, db, bioSource ); final CvExperimentalRole expRole = RoleChecker.getCvExperimentalRole( proteinParticipant.getRole() ); CvBiologicalRole bioRole = RoleChecker.getDefaultCvBiologicalRole();
public static void check( final ProteinParticipantTag proteinParticipant, final UpdateProteinsI proteinFactory, final BioSourceFactory bioSourceFactory ) { final String role = proteinParticipant.getRole(); RoleChecker.check( role ); final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor(); ProteinInteractorChecker.check( proteinInteractor, proteinFactory, bioSourceFactory ); final Collection features = proteinParticipant.getFeatures(); for ( Iterator iterator = features.iterator(); iterator.hasNext(); ) { FeatureTag feature = (FeatureTag) iterator.next(); FeatureChecker.ckeck( feature ); } // check feature clustering (specific to PSI version 1) try { proteinParticipant.getClusteredFeatures(); } catch ( IllegalArgumentException iae ) { MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while checking if the feature were clusterizable: " + iae.getMessage() ) ); } // TODO check isOverExpressed // TODO check isTaggedProtein: as we have to create a Feature having CvFeatureType(tagged-protein) with undetermined range } }
/** * Search a protein in the cache * * @param id * @param bioSource * * @return */ public static ProteinHolder getProtein( String id, String db, BioSource bioSource ) { String taxid = null; if ( null != bioSource ) { taxid = bioSource.getTaxId(); } // System.out.println( "Search cache using: " + buildID( id, db, taxid ) ); return (ProteinHolder) cache.get( buildID( id, db, taxid ) ); }
final String proteinId = proteinInteractor.getPrimaryXref().getId(); final String db = proteinInteractor.getPrimaryXref().getDb(); final ProteinHolder proteinHolder = ProteinInteractorChecker.getProtein( proteinId, db, bioSource ); final CvComponentRole role = RoleChecker.getCvComponentRole( proteinParticipant.getRole() );