/** * @param protein : the protein to check * @return a set of the protein features containing bad ranges (overlapping or out of bound) */ public static Set<Feature> getFeaturesWithBadRanges(Protein protein) { Collection<Component> components = protein.getActiveInstances(); Set<Feature> badFeatures = new HashSet<Feature>(); for (Component component : components) { Collection<Feature> features = component.getBindingDomains(); for (Feature feature : features) { Collection<Range> ranges = feature.getRanges(); for (Range range : ranges) { if (isABadRange(range, protein.getSequence())) { badFeatures.add(feature); break; } } } } return badFeatures; }
/** * @param protein : the protein to check * @return a set of the protein features containing bad ranges (overlapping or out of bound) */ public static Set<Feature> getFeaturesWithBadRanges(Protein protein) { Collection<Component> components = protein.getActiveInstances(); Set<Feature> badFeatures = new HashSet<Feature>(); for (Component component : components) { Collection<Feature> features = component.getBindingDomains(); for (Feature feature : features) { Collection<Range> ranges = feature.getRanges(); for (Range range : ranges) { if (isABadRange(range, protein.getSequence())) { badFeatures.add(feature); break; } } } } return badFeatures; }
for ( Iterator iterator1 = component.getBindingDomains().iterator(); iterator1.hasNext(); ) {
for ( Iterator iterator1 = component.getBindingDomains().iterator(); iterator1.hasNext(); ) {
for ( Iterator iterator1 = component.getBindingDomains().iterator(); iterator1.hasNext(); ) {
protected void copyComponent( Component source, Component target ) { copyProperty(source, "stoichiometry", target); copyProperty(source, "interaction", target); copyProperty(source, "interactor", target); copyProperty(source, "cvBiologicalRole", target); copyProperty(source, "cvExperimentalRole", target); copyProperty(source, "expressedIn", target); copyCollection( source.getBindingDomains(), target.getBindingDomains() ); for (Feature bindingDomain : target.getBindingDomains()) { bindingDomain.setComponent(target); } copyCollection( source.getExperimentalPreparations(), target.getExperimentalPreparations() ); copyCollection( source.getParticipantDetectionMethods(), target.getParticipantDetectionMethods() ); copyCollection( source.getParameters(), target.getParameters() ); }
protected void copyComponent( Component source, Component target ) { copyProperty(source, "stoichiometry", target); copyProperty(source, "interaction", target); copyProperty(source, "interactor", target); copyProperty(source, "cvBiologicalRole", target); copyProperty(source, "cvExperimentalRole", target); copyProperty(source, "expressedIn", target); copyCollection( source.getBindingDomains(), target.getBindingDomains() ); for (Feature bindingDomain : target.getBindingDomains()) { bindingDomain.setComponent(target); } copyCollection( source.getExperimentalPreparations(), target.getExperimentalPreparations() ); copyCollection( source.getParticipantDetectionMethods(), target.getParticipantDetectionMethods() ); copyCollection( source.getParameters(), target.getParameters() ); }
for ( Iterator iterator1 = component.getBindingDomains().iterator(); iterator1.hasNext(); ) { Feature feature = (Feature) iterator1.next();
Collection<Feature> features = new ArrayList<Feature>( intactObject.getBindingDomains().size() ); for ( Feature feature : intactObject.getBindingDomains() ) { features.add( FeaturePersister.getInstance().syncIfTransient( feature ) );
if ( ! component.getBindingDomains().isEmpty() ) { Element featureListElement = session.createElement( "featureList" ); for ( Iterator iterator = component.getBindingDomains().iterator(); iterator.hasNext(); ) { Feature feature = (Feature) iterator.next();
if ( ! component.getBindingDomains().isEmpty() ) { Element featureListElement = session.createElement( "featureList" ); for ( Iterator iterator = component.getBindingDomains().iterator(); iterator.hasNext(); ) { Feature feature = (Feature) iterator.next();
if ( ! component.getBindingDomains().isEmpty() ) { Element featureListElement = session.createElement( "featureList" ); for ( Iterator iterator = component.getBindingDomains().iterator(); iterator.hasNext(); ) { Feature feature = (Feature) iterator.next();
return IntactCore.isInitialized(((Interaction) parent).getParameters()); } else if (parent instanceof Component && child instanceof Feature) { return IntactCore.isInitialized(((Component) parent).getBindingDomains()); } else if (parent instanceof Component && child instanceof ComponentParameter) { return IntactCore.isInitialized(((Component) parent).getParameters());
return IntactCore.isInitialized(((Interaction) parent).getParameters()); } else if (parent instanceof Component && child instanceof Feature) { return IntactCore.isInitialized(((Component) parent).getBindingDomains()); } else if (parent instanceof Component && child instanceof ComponentParameter) { return IntactCore.isInitialized(((Component) parent).getParameters());
List<Feature> features = new ArrayList<Feature>(component.getBindingDomains()); Collections.sort(features, new FeatureComparator());
List<Feature> features = new ArrayList<Feature>(component.getBindingDomains()); Collections.sort(features, new FeatureComparator());
protected void traverseComponent(Component component, IntactVisitor ... visitors) { if (component == null) return; for (IntactVisitor visitor : visitors) { visitor.visitComponent(component); } // check if this element has been traversed already, to avoid cyclic recursion if (recursionChecker.isAlreadyTraversed(component)) { return; } traverse(component.getInteraction(), visitors); traverse(component.getInteractor(), visitors); traverse(component.getCvBiologicalRole(), visitors); traverse(component.getExpressedIn(), visitors); traverse(component.getParameters(), visitors); traverse(component.getParticipantDetectionMethods(), visitors); traverse(component.getExperimentalPreparations(), visitors); traverse(component.getBindingDomains(), visitors); traverse(component.getExperimentalRoles(), visitors); }
protected void traverseComponent(Component component, IntactVisitor ... visitors) { if (component == null) return; for (IntactVisitor visitor : visitors) { visitor.visitComponent(component); } // check if this element has been traversed already, to avoid cyclic recursion if (recursionChecker.isAlreadyTraversed(component)) { return; } traverse(component.getInteraction(), visitors); traverse(component.getInteractor(), visitors); traverse(component.getCvBiologicalRole(), visitors); traverse(component.getExpressedIn(), visitors); traverse(component.getParameters(), visitors); traverse(component.getParticipantDetectionMethods(), visitors); traverse(component.getExperimentalPreparations(), visitors); traverse(component.getBindingDomains(), visitors); traverse(component.getExperimentalRoles(), visitors); }
Collection<Feature> features = c.getBindingDomains(); Interactor i = c.getInteractor();
@Override protected void saveOrUpdateAttributes(Component intactObject) throws PersisterException { super.saveOrUpdateAttributes(intactObject); if (intactObject.getExpressedIn() != null) { BioSourcePersister bioSourcePersister = BioSourcePersister.getInstance(); bioSourcePersister.saveOrUpdate(intactObject.getExpressedIn()); } CvObjectPersister cvPersister = CvObjectPersister.getInstance(); cvPersister.saveOrUpdate(intactObject.getCvBiologicalRole()); cvPersister.saveOrUpdate(intactObject.getCvExperimentalRole()); for (CvIdentification participantDetection : intactObject.getParticipantDetectionMethods()) { cvPersister.saveOrUpdate(participantDetection); } for (CvExperimentalPreparation experimentalPreparation : intactObject.getExperimentalPreparations()) { cvPersister.saveOrUpdate(experimentalPreparation); } InteractionPersister.getInstance().saveOrUpdate(intactObject.getInteraction()); InteractorPersister.getInstance().saveOrUpdate(intactObject.getInteractor()); for (Feature feature : intactObject.getBindingDomains()) { FeaturePersister.getInstance().saveOrUpdate(feature); } }