FeatureTag featureTag = (FeatureTag) iterator1.next(); if ( featureTag.getFeatureType().equals( feature.getFeatureType() ) ) { if ( featureTag.hasFeatureDetection() && feature.hasFeatureDetection() ) { if ( !featureTag.getFeatureDetection().equals( feature.getFeatureDetection() ) ) { if ( featureTag.hasFeatureDetection() ) { } else if ( feature.hasFeatureDetection() ) {
public static void ckeck( FeatureTag feature ) { if ( feature.hasFeatureDetection() ) { checkCvFeatureIdentification( feature ); } checkCvTypeIdentification( feature ); for ( Iterator iterator = feature.getXrefs().iterator(); iterator.hasNext(); ) { XrefTag xref = (XrefTag) iterator.next(); XrefChecker.check( xref ); } }
final Protein protein ) throws IntactException { String typeId = featureTag.getFeatureType().getPsiDefinition().getId(); CvFeatureType featureType = FeatureChecker.getCvFeatureType( typeId ); featureTag.getShortlabel(), component, featureType ); feature.setFullName( featureTag.getFullname() ); if ( featureTag.hasFeatureDetection() ) { detectionId = featureTag.getFeatureDetection().getPsiDefinition().getId(); CvFeatureIdentification featureDetection = FeatureChecker.getCvFeatureIdentification( detectionId ); feature.setCvFeatureIdentification( featureDetection ); for ( Iterator iterator1 = featureTag.getXrefs().iterator(); iterator1.hasNext(); ) { XrefTag xrefTag = (XrefTag) iterator1.next(); LocationTag location = featureTag.getLocation(); if ( location != null ) {
System.out.println( "\t\t\tSelect PSI feature, shortlabel: " + psiFeature.getShortlabel() ); String psiMI = psiFeature.getFeatureType().getPsiDefinition().getId(); String intactMI = getPsiID( intactFeature.getCvFeatureType() ); if ( psiFeature.hasFeatureDetection() ) { psiMI = psiFeature.getFeatureDetection().getPsiDefinition().getId(); if ( intactFeature.getCvFeatureIdentification() != null ) { LocationTag location = psiFeature.getLocation();
sb.append( "type=" ).append( feature.getFeatureType().getPsiDefinition().getId() ); sb.append( ',' ); sb.append( "detection=" ); if ( null != feature.getFeatureDetection() ) { sb.append( feature.getFeatureDetection().getPsiDefinition().getId() ); } else { sb.append( "none" ); LocationTag location = feature.getLocation(); sb.append( " range from=" ).append( location.getFromIntervalEnd() ); sb.append( ".." );
/** * Get from a feature object the primaryId of an Xref having the given database. * * @param feature * @param database * * @return the primaryId of null if we can't find it. */ private String getFeatureId( FeatureTag feature, String database ) { for ( Iterator iterator = feature.getXrefs().iterator(); iterator.hasNext(); ) { XrefTag xref = (XrefTag) iterator.next(); if ( xref.getDb().equalsIgnoreCase( database ) ) { return xref.getId(); } } return null; }
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 ); } }
private static void checkCvFeatureIdentification( FeatureTag feature ) { final XrefTag psiDef = feature.getFeatureDetection().getPsiDefinition(); XrefChecker.check( psiDef ); final String id = psiDef.getId(); if ( !featureIdentificationCache.keySet().contains( id ) ) { CvFeatureIdentification cvFeatureIdentification = null; try { cvFeatureIdentification = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvFeatureIdentification.class,id); if ( cvFeatureIdentification == null ) { MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvFeatureIdentification by PSI definition: " + id ) ); } else { System.out.println( "Found CvFeatureIdentification " + id + " as " + cvFeatureIdentification.getShortLabel() ); } } catch ( IntactException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvFeatureIdentification " + "having the PSI definition: " + id ) ); e.printStackTrace(); } featureIdentificationCache.put( id, cvFeatureIdentification ); } } }
feature = new FeatureTag( descriptionShortLabel, descriptionFullName, featureType, location,
final Protein protein ) throws IntactException { String typeId = featureTag.getFeatureType().getPsiDefinition().getId(); CvFeatureType featureType = FeatureChecker.getCvFeatureType( typeId ); featureTag.getShortlabel(), component, featureType ); feature.setFullName( featureTag.getFullname() ); if ( featureTag.hasFeatureDetection() ) { detectionId = featureTag.getFeatureDetection().getPsiDefinition().getId(); CvFeatureIdentification featureDetection = FeatureChecker.getCvFeatureIdentification( detectionId ); feature.setCvFeatureIdentification( featureDetection ); for ( Iterator iterator1 = featureTag.getXrefs().iterator(); iterator1.hasNext(); ) { XrefTag xrefTag = (XrefTag) iterator1.next(); LocationTag location = featureTag.getLocation(); if ( location != null ) {
System.out.println( "\t\t\tSelect PSI feature, shortlabel: " + psiFeature.getShortlabel() ); String psiMI = psiFeature.getFeatureType().getPsiDefinition().getId(); String intactMI = getPsiID( intactFeature.getCvFeatureType() ); if ( psiFeature.hasFeatureDetection() ) { psiMI = psiFeature.getFeatureDetection().getPsiDefinition().getId(); if ( intactFeature.getCvFeatureIdentification() != null ) { LocationTag location = psiFeature.getLocation();
sb.append( "type=" ).append( feature.getFeatureType().getPsiDefinition().getId() ); sb.append( ',' ); sb.append( "detection=" ); if ( null != feature.getFeatureDetection() ) { sb.append( feature.getFeatureDetection().getPsiDefinition().getId() ); } else { sb.append( "none" ); LocationTag location = feature.getLocation(); sb.append( " range from=" ).append( location.getFromIntervalEnd() ); sb.append( ".." );
/** * Get from a feature object the primaryId of an Xref having the given database. * * @param feature * @param database * * @return the primaryId of null if we can't find it. */ private String getFeatureId( FeatureTag feature, String database ) { for ( Iterator iterator = feature.getXrefs().iterator(); iterator.hasNext(); ) { XrefTag xref = (XrefTag) iterator.next(); if ( xref.getDb().equalsIgnoreCase( database ) ) { return xref.getId(); } } return null; }
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 ); } }
private static void checkCvFeatureIdentification( FeatureTag feature ) { final XrefTag psiDef = feature.getFeatureDetection().getPsiDefinition(); XrefChecker.check( psiDef ); final String id = psiDef.getId(); if ( !featureIdentificationCache.keySet().contains( id ) ) { CvFeatureIdentification cvFeatureIdentification = null; try { cvFeatureIdentification = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvFeatureIdentification.class,id); if ( cvFeatureIdentification == null ) { MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvFeatureIdentification by PSI definition: " + id ) ); } else { System.out.println( "Found CvFeatureIdentification " + id + " as " + cvFeatureIdentification.getShortLabel() ); } } catch ( IntactException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvFeatureIdentification " + "having the PSI definition: " + id ) ); e.printStackTrace(); } featureIdentificationCache.put( id, cvFeatureIdentification ); } } }
feature = new FeatureTag( descriptionShortLabel, descriptionFullName, featureType, location,
final Protein protein ) throws IntactException { String typeId = featureTag.getFeatureType().getPsiDefinition().getId(); CvFeatureType featureType = FeatureChecker.getCvFeatureType( typeId ); featureTag.getShortlabel(), component, featureType ); feature.setFullName( featureTag.getFullname() ); if ( featureTag.hasFeatureDetection() ) { detectionId = featureTag.getFeatureDetection().getPsiDefinition().getId(); CvFeatureIdentification featureDetection = FeatureChecker.getCvFeatureIdentification( detectionId ); feature.setCvFeatureIdentification( featureDetection ); for ( Iterator iterator1 = featureTag.getXrefs().iterator(); iterator1.hasNext(); ) { XrefTag xrefTag = (XrefTag) iterator1.next(); LocationTag location = featureTag.getLocation(); if ( location != null ) {
System.out.println( "\t\t\tSelect PSI feature, shortlabel: " + psiFeature.getShortlabel() ); String psiMI = psiFeature.getFeatureType().getPsiDefinition().getId(); String intactMI = getPsiID( intactFeature.getCvFeatureType() ); if ( psiFeature.hasFeatureDetection() ) { psiMI = psiFeature.getFeatureDetection().getPsiDefinition().getId(); if ( intactFeature.getCvFeatureIdentification() != null ) { LocationTag location = psiFeature.getLocation();
FeatureTag featureTag = (FeatureTag) iterator1.next(); if ( featureTag.getFeatureType().equals( feature.getFeatureType() ) ) { if ( featureTag.hasFeatureDetection() && feature.hasFeatureDetection() ) { if ( !featureTag.getFeatureDetection().equals( feature.getFeatureDetection() ) ) { if ( featureTag.hasFeatureDetection() ) { } else if ( feature.hasFeatureDetection() ) {
sb.append( "type=" ).append( feature.getFeatureType().getPsiDefinition().getId() ); sb.append( ',' ); sb.append( "detection=" ); if ( null != feature.getFeatureDetection() ) { sb.append( feature.getFeatureDetection().getPsiDefinition().getId() ); } else { sb.append( "none" ); LocationTag location = feature.getLocation(); sb.append( " range from=" ).append( location.getFromIntervalEnd() ); sb.append( ".." );