/** * Get all interaction related to the given Protein. * * @param protein the protein of which we want the interactions. * * @return a Collection if Interaction. */ protected final List<Interaction> getInteractions(final Protein protein) { Collection<Component> components = protein.getActiveInstances(); int componentsSize = components.size(); List<Interaction> interactions = new ArrayList<Interaction>(componentsSize); out.println("Found " + componentsSize + " components for protein " + protein.getShortLabel() + ". Starting to get the interactions from those components."); for (Component component : components) { Interaction interaction = component.getInteraction(); if (!interactions.contains(interaction)) { interactions.add(interaction); } } return interactions; // return IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getInteractionDao().getInteractionsByInteractorAc(protein.getAc()); }
/** * Get all interaction related to the given Protein. * * @param protein the protein of which we want the interactions. * * @return a Collection if Interaction. */ protected final List<Interaction> getInteractions(final Protein protein) { Collection<Component> components = protein.getActiveInstances(); int componentsSize = components.size(); List<Interaction> interactions = new ArrayList<Interaction>(componentsSize); out.println("Found " + componentsSize + " components for protein " + protein.getShortLabel() + ". Starting to get the interactions from those components."); for (Component component : components) { Interaction interaction = component.getInteraction(); if (!interactions.contains(interaction)) { interactions.add(interaction); } } return interactions; // return IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getInteractionDao().getInteractionsByInteractorAc(protein.getAc()); }
/** * @param protein : the protein to check * @return a set of the protein feature ranges which are overlapping or out of bound */ public static Set<Range> getBadRanges(Protein protein) { Collection<Component> components = protein.getActiveInstances(); Set<Range> badRanges = new HashSet<Range>(); for (Component component : components) { Collection<Feature> features = component.getFeatures(); for (Feature feature : features) { Collection<Range> ranges = feature.getRanges(); for (Range range : ranges) { if (isABadRange(range, protein.getSequence())) { badRanges.add(range); } } } } return badRanges; }
/** * @param protein : the protein to check * @return a set of the protein feature ranges which are overlapping or out of bound */ public static Set<Range> getBadRanges(Protein protein) { Collection<Component> components = protein.getActiveInstances(); Set<Range> badRanges = new HashSet<Range>(); for (Component component : components) { Collection<Feature> features = component.getFeatures(); for (Feature feature : features) { Collection<Range> ranges = feature.getRanges(); for (Range range : ranges) { if (isABadRange(range, protein.getSequence())) { badRanges.add(range); } } } } return badRanges; }
/** * @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; }