id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
10,800 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java | BFS.processNode | protected void processNode(Node current)
{
// Do not process the node if it is ubique
if (current.isUbique())
{
setColor(current, BLACK);
return;
}
// System.out.println("processing = " + current);
// Process edges towards the direction
for (Edge edge : direction == Direction.DOWNS... | java | protected void processNode(Node current)
{
// Do not process the node if it is ubique
if (current.isUbique())
{
setColor(current, BLACK);
return;
}
// System.out.println("processing = " + current);
// Process edges towards the direction
for (Edge edge : direction == Direction.DOWNS... | [
"protected",
"void",
"processNode",
"(",
"Node",
"current",
")",
"{",
"// Do not process the node if it is ubique\r",
"if",
"(",
"current",
".",
"isUbique",
"(",
")",
")",
"{",
"setColor",
"(",
"current",
",",
"BLACK",
")",
";",
"return",
";",
"}",
"//\t\tSyst... | Processes a node.
@param current The current node | [
"Processes",
"a",
"node",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java#L142-L220 |
10,801 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java | BFS.labelEquivRecursive | protected void labelEquivRecursive(Node node, boolean up, int dist,
boolean enqueue, boolean head)
{
if(node == null) {
LOG.error("labelEquivRecursive: null (Node)");
return;
}
for (Node equiv : up ? node.getUpperEquivalent() : node.getLowerEquivalent())
{
if (getColor(equiv) == WHITE)
... | java | protected void labelEquivRecursive(Node node, boolean up, int dist,
boolean enqueue, boolean head)
{
if(node == null) {
LOG.error("labelEquivRecursive: null (Node)");
return;
}
for (Node equiv : up ? node.getUpperEquivalent() : node.getLowerEquivalent())
{
if (getColor(equiv) == WHITE)
... | [
"protected",
"void",
"labelEquivRecursive",
"(",
"Node",
"node",
",",
"boolean",
"up",
",",
"int",
"dist",
",",
"boolean",
"enqueue",
",",
"boolean",
"head",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"LOG",
".",
"error",
"(",
"\"labelEquivRecu... | Labels equivalent nodes recursively.
@param node Node to label equivalents
@param up Traversing direction. Up means towards parents, if false then towards children
@param dist The label
@param enqueue Whether to enqueue equivalents
@param head Where to enqueue. Head or tail. | [
"Labels",
"equivalent",
"nodes",
"recursively",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java#L230-L259 |
10,802 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java | BFS.getColor | protected int getColor(Node node)
{
if (!colors.containsKey(node))
{
// Absence of color is interpreted as white
return WHITE;
}
else
{
return colors.get(node);
}
} | java | protected int getColor(Node node)
{
if (!colors.containsKey(node))
{
// Absence of color is interpreted as white
return WHITE;
}
else
{
return colors.get(node);
}
} | [
"protected",
"int",
"getColor",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"!",
"colors",
".",
"containsKey",
"(",
"node",
")",
")",
"{",
"// Absence of color is interpreted as white\r",
"return",
"WHITE",
";",
"}",
"else",
"{",
"return",
"colors",
".",
"get"... | Gets color tag of the node
@param node Node to get color tag
@return color tag | [
"Gets",
"color",
"tag",
"of",
"the",
"node"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java#L296-L307 |
10,803 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java | BFS.getLabel | public int getLabel(GraphObject go)
{
if (!dist.containsKey(go))
{
// Absence of label is interpreted as infinite
return Integer.MAX_VALUE-(limit*2);
}
else
{
return dist.get(go);
}
} | java | public int getLabel(GraphObject go)
{
if (!dist.containsKey(go))
{
// Absence of label is interpreted as infinite
return Integer.MAX_VALUE-(limit*2);
}
else
{
return dist.get(go);
}
} | [
"public",
"int",
"getLabel",
"(",
"GraphObject",
"go",
")",
"{",
"if",
"(",
"!",
"dist",
".",
"containsKey",
"(",
"go",
")",
")",
"{",
"// Absence of label is interpreted as infinite\r",
"return",
"Integer",
".",
"MAX_VALUE",
"-",
"(",
"limit",
"*",
"2",
")"... | Gets the distance label of the object.
@param go object to get the distance
@return the distance label | [
"Gets",
"the",
"distance",
"label",
"of",
"the",
"object",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java#L324-L335 |
10,804 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ControlsNotParticipant.java | ControlsNotParticipant.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
Control ctrl = (Control) match.get(ind[0]);
for (Process process : ctrl.getControlled())
{
if (process instanceof Interaction)
{
Interaction inter = (Interaction) process;
Set<Entity> participant = inter.getParticipant();
for (Cont... | java | @Override
public boolean satisfies(Match match, int... ind)
{
Control ctrl = (Control) match.get(ind[0]);
for (Process process : ctrl.getControlled())
{
if (process instanceof Interaction)
{
Interaction inter = (Interaction) process;
Set<Entity> participant = inter.getParticipant();
for (Cont... | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Control",
"ctrl",
"=",
"(",
"Control",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";",
"for",
"(",
"Process",
"process",
"... | Checks if the controlled Interaction contains a controller as a participant. This constraint
filters out such cases.
@param match current pattern match
@param ind mapped indices
@return true if participants of teh controlled Interactions not also a controller of the
Control. | [
"Checks",
"if",
"the",
"controlled",
"Interaction",
"contains",
"a",
"controller",
"as",
"a",
"participant",
".",
"This",
"constraint",
"filters",
"out",
"such",
"cases",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ControlsNotParticipant.java#L35-L53 |
10,805 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/BindingFeatureImpl.java | BindingFeatureImpl.setBindsTo | public void setBindsTo(BindingFeature bindsTo)
{
//Check if we need to update
if (this.bindsTo != bindsTo)
{
//ok go ahead - first get a pointer to the old binds to as we will swap this soon.
BindingFeature old = this.bindsTo;
//swap it
this.bindsTo = bindsTo;
//make sure old feature no longer po... | java | public void setBindsTo(BindingFeature bindsTo)
{
//Check if we need to update
if (this.bindsTo != bindsTo)
{
//ok go ahead - first get a pointer to the old binds to as we will swap this soon.
BindingFeature old = this.bindsTo;
//swap it
this.bindsTo = bindsTo;
//make sure old feature no longer po... | [
"public",
"void",
"setBindsTo",
"(",
"BindingFeature",
"bindsTo",
")",
"{",
"//Check if we need to update",
"if",
"(",
"this",
".",
"bindsTo",
"!=",
"bindsTo",
")",
"{",
"//ok go ahead - first get a pointer to the old binds to as we will swap this soon.",
"BindingFeature",
"o... | This method will set the paired binding feature that binds to this feature.
This method will preserve the symmetric bidirectional semantics. If not-null old feature's
bindsTo will be set to null and if not null new feature's binds to will set to this
@param bindsTo paired binding feature. | [
"This",
"method",
"will",
"set",
"the",
"paired",
"binding",
"feature",
"that",
"binds",
"to",
"this",
"feature",
".",
"This",
"method",
"will",
"preserve",
"the",
"symmetric",
"bidirectional",
"semantics",
".",
"If",
"not",
"-",
"null",
"old",
"feature",
"s... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/BindingFeatureImpl.java#L46-L67 |
10,806 | lightoze/gwt-i18n-server | src/main/java/net/lightoze/gwt/i18n/LocaleFactoryProvider.java | LocaleFactoryProvider.create | public <T extends LocalizableResource> T create(Class<T> cls, String locale) {
Locale l = null;
if (locale != null) {
String[] parts = locale.split("_", 3);
l = new Locale(
parts[0],
parts.length > 1 ? parts[1] : "",
par... | java | public <T extends LocalizableResource> T create(Class<T> cls, String locale) {
Locale l = null;
if (locale != null) {
String[] parts = locale.split("_", 3);
l = new Locale(
parts[0],
parts.length > 1 ? parts[1] : "",
par... | [
"public",
"<",
"T",
"extends",
"LocalizableResource",
">",
"T",
"create",
"(",
"Class",
"<",
"T",
">",
"cls",
",",
"String",
"locale",
")",
"{",
"Locale",
"l",
"=",
"null",
";",
"if",
"(",
"locale",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"part... | Create the resource using the Locale provided. If the locale is null, the locale is retrieved from the
LocaleProvider in LocaleProxy.
@param cls localization interface class
@param <T> localization interface class
@param locale locale string
@return object implementing specified class | [
"Create",
"the",
"resource",
"using",
"the",
"Locale",
"provided",
".",
"If",
"the",
"locale",
"is",
"null",
"the",
"locale",
"is",
"retrieved",
"from",
"the",
"LocaleProvider",
"in",
"LocaleProxy",
"."
] | 96de53288e9bf31721d7b0e2a1d9f7b6ce1a7e83 | https://github.com/lightoze/gwt-i18n-server/blob/96de53288e9bf31721d7b0e2a1d9f7b6ce1a7e83/src/main/java/net/lightoze/gwt/i18n/LocaleFactoryProvider.java#L25-L36 |
10,807 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/EntityFeatureImpl.java | EntityFeatureImpl.atEquivalentLocation | public boolean atEquivalentLocation(EntityFeature that) {
return getEntityFeatureOf() != null &&
getEntityFeatureOf().isEquivalent(that.getEntityFeatureOf()) &&
getFeatureLocation() != null &&
getFeatureLocation().isEquivalent(that.getFeatureLocation());
} | java | public boolean atEquivalentLocation(EntityFeature that) {
return getEntityFeatureOf() != null &&
getEntityFeatureOf().isEquivalent(that.getEntityFeatureOf()) &&
getFeatureLocation() != null &&
getFeatureLocation().isEquivalent(that.getFeatureLocation());
} | [
"public",
"boolean",
"atEquivalentLocation",
"(",
"EntityFeature",
"that",
")",
"{",
"return",
"getEntityFeatureOf",
"(",
")",
"!=",
"null",
"&&",
"getEntityFeatureOf",
"(",
")",
".",
"isEquivalent",
"(",
"that",
".",
"getEntityFeatureOf",
"(",
")",
")",
"&&",
... | This method returns true if and only if two entity features are on the same known location on a known ER.
Unknown location or ER on any one of the features results in a false. | [
"This",
"method",
"returns",
"true",
"if",
"and",
"only",
"if",
"two",
"entity",
"features",
"are",
"on",
"the",
"same",
"known",
"location",
"on",
"a",
"known",
"ER",
".",
"Unknown",
"location",
"or",
"ER",
"on",
"any",
"one",
"of",
"the",
"features",
... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/EntityFeatureImpl.java#L125-L130 |
10,808 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.search | public static List<Match> search(Match m, Pattern pattern)
{
assert pattern.getStartingClass().isAssignableFrom(m.get(0).getModelInterface());
return searchRecursive(m, pattern.getConstraints(), 0);
} | java | public static List<Match> search(Match m, Pattern pattern)
{
assert pattern.getStartingClass().isAssignableFrom(m.get(0).getModelInterface());
return searchRecursive(m, pattern.getConstraints(), 0);
} | [
"public",
"static",
"List",
"<",
"Match",
">",
"search",
"(",
"Match",
"m",
",",
"Pattern",
"pattern",
")",
"{",
"assert",
"pattern",
".",
"getStartingClass",
"(",
")",
".",
"isAssignableFrom",
"(",
"m",
".",
"get",
"(",
"0",
")",
".",
"getModelInterface... | Searches the pattern starting from the given match. The first element of the match should be
assigned. Others are optional.
@param m match to start from
@param pattern pattern to search
@return result matches | [
"Searches",
"the",
"pattern",
"starting",
"from",
"the",
"given",
"match",
".",
"The",
"first",
"element",
"of",
"the",
"match",
"should",
"be",
"assigned",
".",
"Others",
"are",
"optional",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L38-L43 |
10,809 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.search | public static List<Match> search(BioPAXElement ele, Pattern pattern)
{
assert pattern.getStartingClass().isAssignableFrom(ele.getModelInterface());
Match m = new Match(pattern.size());
m.set(ele, 0);
return search(m, pattern);
} | java | public static List<Match> search(BioPAXElement ele, Pattern pattern)
{
assert pattern.getStartingClass().isAssignableFrom(ele.getModelInterface());
Match m = new Match(pattern.size());
m.set(ele, 0);
return search(m, pattern);
} | [
"public",
"static",
"List",
"<",
"Match",
">",
"search",
"(",
"BioPAXElement",
"ele",
",",
"Pattern",
"pattern",
")",
"{",
"assert",
"pattern",
".",
"getStartingClass",
"(",
")",
".",
"isAssignableFrom",
"(",
"ele",
".",
"getModelInterface",
"(",
")",
")",
... | Searches the pattern starting from the given element.
@param ele element to start from
@param pattern pattern to search
@return matching results | [
"Searches",
"the",
"pattern",
"starting",
"from",
"the",
"given",
"element",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L51-L58 |
10,810 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchRecursive | public static List<Match> searchRecursive(Match match, List<MappedConst> mc, int index)
{
List<Match> result = new ArrayList<Match>();
Constraint con = mc.get(index).getConstr();
int[] ind = mc.get(index).getInds();
int lastInd = ind[ind.length-1];
if (con.canGenerate() && match.get(lastInd) == null)
{
... | java | public static List<Match> searchRecursive(Match match, List<MappedConst> mc, int index)
{
List<Match> result = new ArrayList<Match>();
Constraint con = mc.get(index).getConstr();
int[] ind = mc.get(index).getInds();
int lastInd = ind[ind.length-1];
if (con.canGenerate() && match.get(lastInd) == null)
{
... | [
"public",
"static",
"List",
"<",
"Match",
">",
"searchRecursive",
"(",
"Match",
"match",
",",
"List",
"<",
"MappedConst",
">",
"mc",
",",
"int",
"index",
")",
"{",
"List",
"<",
"Match",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"Match",
">",
"(",
... | Continues searching with the mapped constraint at the given index.
@param match match to start from
@param mc mapped constraints of the pattern
@param index index of the current mapped constraint
@return matching results | [
"Continues",
"searching",
"with",
"the",
"mapped",
"constraint",
"at",
"the",
"given",
"index",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L67-L110 |
10,811 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchPlain | public static List<Match> searchPlain(Model model, Pattern pattern)
{
List<Match> list = new LinkedList<Match>();
Map<BioPAXElement, List<Match>> map = search(model, pattern);
for (List<Match> matches : map.values())
{
list.addAll(matches);
}
return list;
} | java | public static List<Match> searchPlain(Model model, Pattern pattern)
{
List<Match> list = new LinkedList<Match>();
Map<BioPAXElement, List<Match>> map = search(model, pattern);
for (List<Match> matches : map.values())
{
list.addAll(matches);
}
return list;
} | [
"public",
"static",
"List",
"<",
"Match",
">",
"searchPlain",
"(",
"Model",
"model",
",",
"Pattern",
"pattern",
")",
"{",
"List",
"<",
"Match",
">",
"list",
"=",
"new",
"LinkedList",
"<",
"Match",
">",
"(",
")",
";",
"Map",
"<",
"BioPAXElement",
",",
... | Searches the pattern in a given model, but instead of a match map, returns all matches in a
list.
@param model model to search in
@param pattern pattern to search for
@return matching results | [
"Searches",
"the",
"pattern",
"in",
"a",
"given",
"model",
"but",
"instead",
"of",
"a",
"match",
"map",
"returns",
"all",
"matches",
"in",
"a",
"list",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L119-L129 |
10,812 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchPlain | public static List<Match> searchPlain(Collection<? extends BioPAXElement> eles, Pattern pattern)
{
List<Match> list = new LinkedList<Match>();
Map<BioPAXElement, List<Match>> map = search(eles, pattern);
for (List<Match> matches : map.values())
{
list.addAll(matches);
}
return list;
} | java | public static List<Match> searchPlain(Collection<? extends BioPAXElement> eles, Pattern pattern)
{
List<Match> list = new LinkedList<Match>();
Map<BioPAXElement, List<Match>> map = search(eles, pattern);
for (List<Match> matches : map.values())
{
list.addAll(matches);
}
return list;
} | [
"public",
"static",
"List",
"<",
"Match",
">",
"searchPlain",
"(",
"Collection",
"<",
"?",
"extends",
"BioPAXElement",
">",
"eles",
",",
"Pattern",
"pattern",
")",
"{",
"List",
"<",
"Match",
">",
"list",
"=",
"new",
"LinkedList",
"<",
"Match",
">",
"(",
... | Searches the pattern starting from given elements, but instead of a match map, returns all
matches in a list.
@param eles elements to start from
@param pattern pattern to search for
@return matching results | [
"Searches",
"the",
"pattern",
"starting",
"from",
"given",
"elements",
"but",
"instead",
"of",
"a",
"match",
"map",
"returns",
"all",
"matches",
"in",
"a",
"list",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L138-L148 |
10,813 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.search | public static Map<BioPAXElement, List<Match>> search(final Collection<? extends BioPAXElement> eles,
final Pattern pattern)
{
final Map<BioPAXElement, List<Match>> map = new ConcurrentHashMap<BioPAXElement, List<Match>>();
final ExecutorService exec = Executors.newFixedThreadPool(10);
for (final ... | java | public static Map<BioPAXElement, List<Match>> search(final Collection<? extends BioPAXElement> eles,
final Pattern pattern)
{
final Map<BioPAXElement, List<Match>> map = new ConcurrentHashMap<BioPAXElement, List<Match>>();
final ExecutorService exec = Executors.newFixedThreadPool(10);
for (final ... | [
"public",
"static",
"Map",
"<",
"BioPAXElement",
",",
"List",
"<",
"Match",
">",
">",
"search",
"(",
"final",
"Collection",
"<",
"?",
"extends",
"BioPAXElement",
">",
"eles",
",",
"final",
"Pattern",
"pattern",
")",
"{",
"final",
"Map",
"<",
"BioPAXElement... | Searches the given pattern starting from the given elements.
@param eles elements to start from
@param pattern pattern to search for
@return map from starting element to the matching results | [
"Searches",
"the",
"given",
"pattern",
"starting",
"from",
"the",
"given",
"elements",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L208-L237 |
10,814 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchAndCollect | public static <T extends BioPAXElement> Set<T> searchAndCollect(
Model model, Pattern pattern, int index, Class<T> c)
{
return searchAndCollect(model.getObjects(pattern.getStartingClass()), pattern, index, c);
} | java | public static <T extends BioPAXElement> Set<T> searchAndCollect(
Model model, Pattern pattern, int index, Class<T> c)
{
return searchAndCollect(model.getObjects(pattern.getStartingClass()), pattern, index, c);
} | [
"public",
"static",
"<",
"T",
"extends",
"BioPAXElement",
">",
"Set",
"<",
"T",
">",
"searchAndCollect",
"(",
"Model",
"model",
",",
"Pattern",
"pattern",
",",
"int",
"index",
",",
"Class",
"<",
"T",
">",
"c",
")",
"{",
"return",
"searchAndCollect",
"(",... | Searches a model for the given pattern, then collects the specified elements of the matches
and returns.
@param <T> BioPAX type
@param model model to search in
@param pattern pattern to search for
@param index index of the element in the match to collect
@param c type of the element to collect
@return set of the eleme... | [
"Searches",
"a",
"model",
"for",
"the",
"given",
"pattern",
"then",
"collects",
"the",
"specified",
"elements",
"of",
"the",
"matches",
"and",
"returns",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L250-L254 |
10,815 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchAndCollect | public static <T extends BioPAXElement> Set<T> searchAndCollect(
Collection<? extends BioPAXElement> eles, Pattern pattern, int index, Class<T> c)
{
Set<T> set = new HashSet<T>();
for (Match match : searchPlain(eles, pattern))
{
set.add((T) match.get(index));
}
return set;
} | java | public static <T extends BioPAXElement> Set<T> searchAndCollect(
Collection<? extends BioPAXElement> eles, Pattern pattern, int index, Class<T> c)
{
Set<T> set = new HashSet<T>();
for (Match match : searchPlain(eles, pattern))
{
set.add((T) match.get(index));
}
return set;
} | [
"public",
"static",
"<",
"T",
"extends",
"BioPAXElement",
">",
"Set",
"<",
"T",
">",
"searchAndCollect",
"(",
"Collection",
"<",
"?",
"extends",
"BioPAXElement",
">",
"eles",
",",
"Pattern",
"pattern",
",",
"int",
"index",
",",
"Class",
"<",
"T",
">",
"c... | Searches the given pattern starting from the given elements, then collects the specified
elements of the matches and returns.
@param <T> BioPAX type
@param eles elements to start from
@param pattern pattern to search for
@param index index of the element in the match to collect
@param c type of the element to collect
... | [
"Searches",
"the",
"given",
"pattern",
"starting",
"from",
"the",
"given",
"elements",
"then",
"collects",
"the",
"specified",
"elements",
"of",
"the",
"matches",
"and",
"returns",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L267-L277 |
10,816 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchAndCollect | public static <T extends BioPAXElement> Set<T> searchAndCollect(
BioPAXElement ele, Pattern pattern, int index, Class<T> c)
{
Set<T> set = new HashSet<T>();
for (Match match : search(ele, pattern))
{
set.add((T) match.get(index));
}
return set;
} | java | public static <T extends BioPAXElement> Set<T> searchAndCollect(
BioPAXElement ele, Pattern pattern, int index, Class<T> c)
{
Set<T> set = new HashSet<T>();
for (Match match : search(ele, pattern))
{
set.add((T) match.get(index));
}
return set;
} | [
"public",
"static",
"<",
"T",
"extends",
"BioPAXElement",
">",
"Set",
"<",
"T",
">",
"searchAndCollect",
"(",
"BioPAXElement",
"ele",
",",
"Pattern",
"pattern",
",",
"int",
"index",
",",
"Class",
"<",
"T",
">",
"c",
")",
"{",
"Set",
"<",
"T",
">",
"s... | Searches the given pattern starting from the given element, then collects the specified
elements of the matches and returns.
@param <T> BioPAX type
@param ele element to start from
@param pattern pattern to search for
@param index index of the element in the match to collect
@param c type of the element to collect
@re... | [
"Searches",
"the",
"given",
"pattern",
"starting",
"from",
"the",
"given",
"element",
"then",
"collects",
"the",
"specified",
"elements",
"of",
"the",
"matches",
"and",
"returns",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L290-L300 |
10,817 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.hasSolution | public boolean hasSolution(Pattern p, BioPAXElement ... ele)
{
Match m = new Match(p.size());
for (int i = 0; i < ele.length; i++)
{
m.set(ele[i], i);
}
return !search(m, p).isEmpty();
} | java | public boolean hasSolution(Pattern p, BioPAXElement ... ele)
{
Match m = new Match(p.size());
for (int i = 0; i < ele.length; i++)
{
m.set(ele[i], i);
}
return !search(m, p).isEmpty();
} | [
"public",
"boolean",
"hasSolution",
"(",
"Pattern",
"p",
",",
"BioPAXElement",
"...",
"ele",
")",
"{",
"Match",
"m",
"=",
"new",
"Match",
"(",
"p",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ele",
".",
"l... | Checks if there is any match for the given pattern if search starts from the given element.
@param p pattern to search for
@param ele element to start from
@return true if there is a match | [
"Checks",
"if",
"there",
"is",
"any",
"match",
"for",
"the",
"given",
"pattern",
"if",
"search",
"starts",
"from",
"the",
"given",
"element",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L308-L317 |
10,818 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchInFile | public static void searchInFile(Pattern p, String inFile, String outFile) throws FileNotFoundException
{
searchInFile(p, inFile, outFile, Integer.MAX_VALUE, Integer.MAX_VALUE);
} | java | public static void searchInFile(Pattern p, String inFile, String outFile) throws FileNotFoundException
{
searchInFile(p, inFile, outFile, Integer.MAX_VALUE, Integer.MAX_VALUE);
} | [
"public",
"static",
"void",
"searchInFile",
"(",
"Pattern",
"p",
",",
"String",
"inFile",
",",
"String",
"outFile",
")",
"throws",
"FileNotFoundException",
"{",
"searchInFile",
"(",
"p",
",",
"inFile",
",",
"outFile",
",",
"Integer",
".",
"MAX_VALUE",
",",
"... | Searches a pattern reading the model from the given file, and creates another model that is
excised using the matching patterns.
@param p pattern to search for
@param inFile filename for the model to search in
@param outFile filename for the result model
@throws FileNotFoundException when no file exists | [
"Searches",
"a",
"pattern",
"reading",
"the",
"model",
"from",
"the",
"given",
"file",
"and",
"creates",
"another",
"model",
"that",
"is",
"excised",
"using",
"the",
"matching",
"patterns",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L327-L330 |
10,819 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.searchInFile | public static void searchInFile(Pattern p, String inFile, String outFile, int seedLimit,
int graphPerSeed) throws FileNotFoundException
{
SimpleIOHandler h = new SimpleIOHandler();
Model model = h.convertFromOWL(new FileInputStream(inFile));
Map<BioPAXElement,List<Match>> matchMap = Searcher.search(model, p);... | java | public static void searchInFile(Pattern p, String inFile, String outFile, int seedLimit,
int graphPerSeed) throws FileNotFoundException
{
SimpleIOHandler h = new SimpleIOHandler();
Model model = h.convertFromOWL(new FileInputStream(inFile));
Map<BioPAXElement,List<Match>> matchMap = Searcher.search(model, p);... | [
"public",
"static",
"void",
"searchInFile",
"(",
"Pattern",
"p",
",",
"String",
"inFile",
",",
"String",
"outFile",
",",
"int",
"seedLimit",
",",
"int",
"graphPerSeed",
")",
"throws",
"FileNotFoundException",
"{",
"SimpleIOHandler",
"h",
"=",
"new",
"SimpleIOHan... | Searches a pattern reading the model from the given file, and creates another model that is
excised using the matching patterns. Users can limit the max number of starting element, and
max number of matches for any starting element. These parameters is good for limiting the
size of the result graph.
@param p pattern to... | [
"Searches",
"a",
"pattern",
"reading",
"the",
"model",
"from",
"the",
"given",
"file",
"and",
"creates",
"another",
"model",
"that",
"is",
"excised",
"using",
"the",
"matching",
"patterns",
".",
"Users",
"can",
"limit",
"the",
"max",
"number",
"of",
"startin... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L344-L409 |
10,820 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.getLeadingZeros | private static String getLeadingZeros(int i, int size)
{
assert i <= size;
int w1 = (int) Math.floor(Math.log10(size));
int w2 = (int) Math.floor(Math.log10(i));
String s = "";
for (int j = w2; j < w1; j++)
{
s += "0";
}
return s;
} | java | private static String getLeadingZeros(int i, int size)
{
assert i <= size;
int w1 = (int) Math.floor(Math.log10(size));
int w2 = (int) Math.floor(Math.log10(i));
String s = "";
for (int j = w2; j < w1; j++)
{
s += "0";
}
return s;
} | [
"private",
"static",
"String",
"getLeadingZeros",
"(",
"int",
"i",
",",
"int",
"size",
")",
"{",
"assert",
"i",
"<=",
"size",
";",
"int",
"w1",
"=",
"(",
"int",
")",
"Math",
".",
"floor",
"(",
"Math",
".",
"log10",
"(",
"size",
")",
")",
";",
"in... | Prepares an int for printing with leading zeros for the given size.
@param i the int to prepare
@param size max value for i
@return printable string for i with leading zeros | [
"Prepares",
"an",
"int",
"for",
"printing",
"with",
"leading",
"zeros",
"for",
"the",
"given",
"size",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L417-L430 |
10,821 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.excise | private static Model excise(Set<BioPAXElement> result)
{
Completer c = new Completer(EM);
result = c.complete(result);
Cloner cln = new Cloner(EM, BioPAXLevel.L3.getDefaultFactory());
return cln.clone(result);
} | java | private static Model excise(Set<BioPAXElement> result)
{
Completer c = new Completer(EM);
result = c.complete(result);
Cloner cln = new Cloner(EM, BioPAXLevel.L3.getDefaultFactory());
return cln.clone(result);
} | [
"private",
"static",
"Model",
"excise",
"(",
"Set",
"<",
"BioPAXElement",
">",
"result",
")",
"{",
"Completer",
"c",
"=",
"new",
"Completer",
"(",
"EM",
")",
";",
"result",
"=",
"c",
".",
"complete",
"(",
"result",
")",
";",
"Cloner",
"cln",
"=",
"ne... | Excises a model to the given elements.
@param result elements to excise to
@return excised model | [
"Excises",
"a",
"model",
"to",
"the",
"given",
"elements",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L459-L465 |
10,822 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.getInter | private static Set<Interaction> getInter(Match match)
{
Set<Interaction> set = new HashSet<Interaction>();
for (BioPAXElement ele : match.getVariables())
{
if (ele instanceof Interaction)
{
set.add((Interaction) ele);
addControlsRecursive((Interaction) ele, set);
}
}
return set;
} | java | private static Set<Interaction> getInter(Match match)
{
Set<Interaction> set = new HashSet<Interaction>();
for (BioPAXElement ele : match.getVariables())
{
if (ele instanceof Interaction)
{
set.add((Interaction) ele);
addControlsRecursive((Interaction) ele, set);
}
}
return set;
} | [
"private",
"static",
"Set",
"<",
"Interaction",
">",
"getInter",
"(",
"Match",
"match",
")",
"{",
"Set",
"<",
"Interaction",
">",
"set",
"=",
"new",
"HashSet",
"<",
"Interaction",
">",
"(",
")",
";",
"for",
"(",
"BioPAXElement",
"ele",
":",
"match",
".... | Gets all interactions in a match.
@param match match to search
@return all interaction in the match | [
"Gets",
"all",
"interactions",
"in",
"a",
"match",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L472-L484 |
10,823 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.addControlsRecursive | private static void addControlsRecursive(Interaction inter, Set<Interaction> set)
{
for (Control ctrl : inter.getControlledOf())
{
set.add(ctrl);
addControlsRecursive(ctrl, set);
}
} | java | private static void addControlsRecursive(Interaction inter, Set<Interaction> set)
{
for (Control ctrl : inter.getControlledOf())
{
set.add(ctrl);
addControlsRecursive(ctrl, set);
}
} | [
"private",
"static",
"void",
"addControlsRecursive",
"(",
"Interaction",
"inter",
",",
"Set",
"<",
"Interaction",
">",
"set",
")",
"{",
"for",
"(",
"Control",
"ctrl",
":",
"inter",
".",
"getControlledOf",
"(",
")",
")",
"{",
"set",
".",
"add",
"(",
"ctrl... | Adds controls of the given interactions recursively to the given set.
@param inter interaction to add its controls
@param set set to add to | [
"Adds",
"controls",
"of",
"the",
"given",
"interactions",
"recursively",
"to",
"the",
"given",
"set",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L491-L498 |
10,824 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java | Searcher.hashSum | private static Integer hashSum(Set<Interaction> set)
{
int x = 0;
for (Interaction inter : set)
{
x += inter.hashCode();
}
return x;
} | java | private static Integer hashSum(Set<Interaction> set)
{
int x = 0;
for (Interaction inter : set)
{
x += inter.hashCode();
}
return x;
} | [
"private",
"static",
"Integer",
"hashSum",
"(",
"Set",
"<",
"Interaction",
">",
"set",
")",
"{",
"int",
"x",
"=",
"0",
";",
"for",
"(",
"Interaction",
"inter",
":",
"set",
")",
"{",
"x",
"+=",
"inter",
".",
"hashCode",
"(",
")",
";",
"}",
"return",... | Creates a hash code for a set of interactions.
@param set interactions
@return sum of hashes | [
"Creates",
"a",
"hash",
"code",
"for",
"a",
"set",
"of",
"interactions",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L505-L513 |
10,825 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Empty.java | Empty.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
assertIndLength(ind);
return con.generate(match, ind).isEmpty();
} | java | @Override
public boolean satisfies(Match match, int... ind)
{
assertIndLength(ind);
return con.generate(match, ind).isEmpty();
} | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"assertIndLength",
"(",
"ind",
")",
";",
"return",
"con",
".",
"generate",
"(",
"match",
",",
"ind",
")",
".",
"isEmpty",
"(",
")",
";",
"}"... | Checks if the wrapped Constraint can generate any elements. This satisfies if it cannot.
@param match current pattern match
@param ind mapped indices
@return true if the wrapped Constraint generates nothing | [
"Checks",
"if",
"the",
"wrapped",
"Constraint",
"can",
"generate",
"any",
"elements",
".",
"This",
"satisfies",
"if",
"it",
"cannot",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Empty.java#L56-L62 |
10,826 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/EventWrapper.java | EventWrapper.addToUpstream | protected void addToUpstream(BioPAXElement ele, Graph graph)
{
AbstractNode node = (AbstractNode) graph.getGraphObject(ele);
if (node == null) return;
Edge edge = new EdgeL3(node, this, graph);
if (isTranscription())
{
if (node instanceof ControlWrapper)
{
((ControlWrapper) node).setTranscripti... | java | protected void addToUpstream(BioPAXElement ele, Graph graph)
{
AbstractNode node = (AbstractNode) graph.getGraphObject(ele);
if (node == null) return;
Edge edge = new EdgeL3(node, this, graph);
if (isTranscription())
{
if (node instanceof ControlWrapper)
{
((ControlWrapper) node).setTranscripti... | [
"protected",
"void",
"addToUpstream",
"(",
"BioPAXElement",
"ele",
",",
"Graph",
"graph",
")",
"{",
"AbstractNode",
"node",
"=",
"(",
"AbstractNode",
")",
"graph",
".",
"getGraphObject",
"(",
"ele",
")",
";",
"if",
"(",
"node",
"==",
"null",
")",
"return",... | Bind the wrapper of the given element to the upstream.
@param ele Element to bind
@param graph Owner graph. | [
"Bind",
"the",
"wrapper",
"of",
"the",
"given",
"element",
"to",
"the",
"upstream",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/EventWrapper.java#L67-L84 |
10,827 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java | GraphL3Undirected.passesFilters | private boolean passesFilters(Level3Element ele)
{
if (filters == null) return true;
for (Filter filter : filters)
{
if (!filter.okToTraverse(ele)) return false;
}
return true;
} | java | private boolean passesFilters(Level3Element ele)
{
if (filters == null) return true;
for (Filter filter : filters)
{
if (!filter.okToTraverse(ele)) return false;
}
return true;
} | [
"private",
"boolean",
"passesFilters",
"(",
"Level3Element",
"ele",
")",
"{",
"if",
"(",
"filters",
"==",
"null",
")",
"return",
"true",
";",
"for",
"(",
"Filter",
"filter",
":",
"filters",
")",
"{",
"if",
"(",
"!",
"filter",
".",
"okToTraverse",
"(",
... | There must be no filter opposing to traverse this object to traverse it.
@param ele element to check
@return true if ok to traverse | [
"There",
"must",
"be",
"no",
"filter",
"opposing",
"to",
"traverse",
"this",
"object",
"to",
"traverse",
"it",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java#L57-L66 |
10,828 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java | GraphL3Undirected.getKey | @Override
public String getKey(Object wrapped)
{
if (wrapped instanceof BioPAXElement)
{
return ((BioPAXElement) wrapped).getUri();
}
throw new IllegalArgumentException("Object cannot be wrapped: " + wrapped);
} | java | @Override
public String getKey(Object wrapped)
{
if (wrapped instanceof BioPAXElement)
{
return ((BioPAXElement) wrapped).getUri();
}
throw new IllegalArgumentException("Object cannot be wrapped: " + wrapped);
} | [
"@",
"Override",
"public",
"String",
"getKey",
"(",
"Object",
"wrapped",
")",
"{",
"if",
"(",
"wrapped",
"instanceof",
"BioPAXElement",
")",
"{",
"return",
"(",
"(",
"BioPAXElement",
")",
"wrapped",
")",
".",
"getUri",
"(",
")",
";",
"}",
"throw",
"new",... | RDF IDs of elements is used as key in the object map.
@param wrapped Object to wrap
@return Key | [
"RDF",
"IDs",
"of",
"elements",
"is",
"used",
"as",
"key",
"in",
"the",
"object",
"map",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java#L112-L121 |
10,829 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java | GraphL3Undirected.getWrapperSet | public Set<Node> getWrapperSet(Set<?> objects)
{
Set<Node> wrapped = new HashSet<Node>();
for (Object object : objects)
{
Node node = (Node) getGraphObject(object);
if (node != null)
{
wrapped.add(node);
}
}
return wrapped;
} | java | public Set<Node> getWrapperSet(Set<?> objects)
{
Set<Node> wrapped = new HashSet<Node>();
for (Object object : objects)
{
Node node = (Node) getGraphObject(object);
if (node != null)
{
wrapped.add(node);
}
}
return wrapped;
} | [
"public",
"Set",
"<",
"Node",
">",
"getWrapperSet",
"(",
"Set",
"<",
"?",
">",
"objects",
")",
"{",
"Set",
"<",
"Node",
">",
"wrapped",
"=",
"new",
"HashSet",
"<",
"Node",
">",
"(",
")",
";",
"for",
"(",
"Object",
"object",
":",
"objects",
")",
"... | Gets wrappers of given elements
@param objects Wrapped objects
@return wrappers | [
"Gets",
"wrappers",
"of",
"given",
"elements"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java#L128-L141 |
10,830 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java | GraphL3Undirected.getWrapperMap | public Map<Object, Node> getWrapperMap(Set<?> objects)
{
Map<Object, Node> map = new HashMap<Object, Node>();
for (Object object : objects)
{
Node node = (Node) getGraphObject(object);
if (node != null)
{
map.put(object, node);
}
}
return map;
} | java | public Map<Object, Node> getWrapperMap(Set<?> objects)
{
Map<Object, Node> map = new HashMap<Object, Node>();
for (Object object : objects)
{
Node node = (Node) getGraphObject(object);
if (node != null)
{
map.put(object, node);
}
}
return map;
} | [
"public",
"Map",
"<",
"Object",
",",
"Node",
">",
"getWrapperMap",
"(",
"Set",
"<",
"?",
">",
"objects",
")",
"{",
"Map",
"<",
"Object",
",",
"Node",
">",
"map",
"=",
"new",
"HashMap",
"<",
"Object",
",",
"Node",
">",
"(",
")",
";",
"for",
"(",
... | Gets an element-to-wrapper map for the given elements.
@param objects Wrapped objects
@return object-to-wrapper map | [
"Gets",
"an",
"element",
"-",
"to",
"-",
"wrapper",
"map",
"for",
"the",
"given",
"elements",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/GraphL3Undirected.java#L148-L161 |
10,831 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/AND.java | AND.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement> (
con[0].generate(match, ind));
for (int i = 1; i < con.length; i++)
{
if (gen.isEmpty()) break;
gen.retainAll(con[i].generate(match, ind));
}
return gen;
} | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement> (
con[0].generate(match, ind));
for (int i = 1; i < con.length; i++)
{
if (gen.isEmpty()) break;
gen.retainAll(con[i].generate(match, ind));
}
return gen;
} | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Collection",
"<",
"BioPAXElement",
">",
"gen",
"=",
"new",
"HashSet",
"<",
"BioPAXElement",
">",
"(",
"con",
"[",
... | Gets intersection of the generated elements by the member constraints.
@param match match to process
@param ind mapped indices
@return satisfying elements | [
"Gets",
"intersection",
"of",
"the",
"generated",
"elements",
"by",
"the",
"member",
"constraints",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/AND.java#L48-L61 |
10,832 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java | LinkedPE.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]);
Set<BioPAXElement> set = getLinkedElements(pe);
return set;
} | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]);
Set<BioPAXElement> set = getLinkedElements(pe);
return set;
} | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"PhysicalEntity",
"pe",
"=",
"(",
"PhysicalEntity",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";"... | Gets to the linked PhysicalEntity.
@param match current pattern match
@param ind mapped indices
@return linked PhysicalEntity | [
"Gets",
"to",
"the",
"linked",
"PhysicalEntity",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java#L94-L101 |
10,833 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java | LinkedPE.enrichWithGenerics | protected void enrichWithGenerics(Set<BioPAXElement> seed, Set<BioPAXElement> all)
{
Set addition;
if (type == Type.TO_GENERAL) addition = access(upperGenAcc, seed, all);
else addition = access(lowerGenAcc, seed, all);
all.addAll(addition);
seed.addAll(addition);
enrichWithCM(seed, all);
} | java | protected void enrichWithGenerics(Set<BioPAXElement> seed, Set<BioPAXElement> all)
{
Set addition;
if (type == Type.TO_GENERAL) addition = access(upperGenAcc, seed, all);
else addition = access(lowerGenAcc, seed, all);
all.addAll(addition);
seed.addAll(addition);
enrichWithCM(seed, all);
} | [
"protected",
"void",
"enrichWithGenerics",
"(",
"Set",
"<",
"BioPAXElement",
">",
"seed",
",",
"Set",
"<",
"BioPAXElement",
">",
"all",
")",
"{",
"Set",
"addition",
";",
"if",
"(",
"type",
"==",
"Type",
".",
"TO_GENERAL",
")",
"addition",
"=",
"access",
... | Gets the linked homologies and then switches to complex-relationship mode. These two enrich
methods call each other recursively.
@param seed to get the linked elements from
@param all already found links | [
"Gets",
"the",
"linked",
"homologies",
"and",
"then",
"switches",
"to",
"complex",
"-",
"relationship",
"mode",
".",
"These",
"two",
"enrich",
"methods",
"call",
"each",
"other",
"recursively",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java#L117-L127 |
10,834 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java | LinkedPE.enrichWithCM | protected void enrichWithCM(Set<BioPAXElement> seed, Set<BioPAXElement> all)
{
Set addition = access(type == Type.TO_GENERAL ? complexAcc : memberAcc, seed, all);
if (blacklist != null) addition = blacklist.getNonUbiqueObjects(addition);
if (!addition.isEmpty())
{
all.addAll(addition);
enrichWithGeneri... | java | protected void enrichWithCM(Set<BioPAXElement> seed, Set<BioPAXElement> all)
{
Set addition = access(type == Type.TO_GENERAL ? complexAcc : memberAcc, seed, all);
if (blacklist != null) addition = blacklist.getNonUbiqueObjects(addition);
if (!addition.isEmpty())
{
all.addAll(addition);
enrichWithGeneri... | [
"protected",
"void",
"enrichWithCM",
"(",
"Set",
"<",
"BioPAXElement",
">",
"seed",
",",
"Set",
"<",
"BioPAXElement",
">",
"all",
")",
"{",
"Set",
"addition",
"=",
"access",
"(",
"type",
"==",
"Type",
".",
"TO_GENERAL",
"?",
"complexAcc",
":",
"memberAcc",... | Gets parent complexes or complex members recursively according to the type of the linkage.
@param seed elements to link
@param all already found links | [
"Gets",
"parent",
"complexes",
"or",
"complex",
"members",
"recursively",
"according",
"to",
"the",
"type",
"of",
"the",
"linkage",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java#L134-L145 |
10,835 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractPropertyEditor.java | AbstractPropertyEditor.createPropertyEditor | public static <D extends BioPAXElement, R> PropertyEditor<D, R> createPropertyEditor(Class<D> domain,
String property)
{
PropertyEditor editor = null;
try
{
Method getMethod = detectGetMethod(domain, property);
boolean mu... | java | public static <D extends BioPAXElement, R> PropertyEditor<D, R> createPropertyEditor(Class<D> domain,
String property)
{
PropertyEditor editor = null;
try
{
Method getMethod = detectGetMethod(domain, property);
boolean mu... | [
"public",
"static",
"<",
"D",
"extends",
"BioPAXElement",
",",
"R",
">",
"PropertyEditor",
"<",
"D",
",",
"R",
">",
"createPropertyEditor",
"(",
"Class",
"<",
"D",
">",
"domain",
",",
"String",
"property",
")",
"{",
"PropertyEditor",
"editor",
"=",
"null",... | This method creates a property reflecting on the domain and property. Proper subclass is chosen
based on the range of the property.
@param domain paxtools level2 interface that maps to the corresponding owl level2.
@param property to be managed by the constructed controller.
@param <D> domain
@param <R> range
@return a... | [
"This",
"method",
"creates",
"a",
"property",
"reflecting",
"on",
"the",
"domain",
"and",
"property",
".",
"Proper",
"subclass",
"is",
"chosen",
"based",
"on",
"the",
"range",
"of",
"the",
"property",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractPropertyEditor.java#L120-L149 |
10,836 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractPropertyEditor.java | AbstractPropertyEditor.getJavaName | private static String getJavaName(String owlName)
{
// Since java does not allow '-' replace them all with '_'
String s = owlName.replaceAll("-", "_");
s = s.substring(0, 1).toUpperCase() + s.substring(1);
return s;
} | java | private static String getJavaName(String owlName)
{
// Since java does not allow '-' replace them all with '_'
String s = owlName.replaceAll("-", "_");
s = s.substring(0, 1).toUpperCase() + s.substring(1);
return s;
} | [
"private",
"static",
"String",
"getJavaName",
"(",
"String",
"owlName",
")",
"{",
"// Since java does not allow '-' replace them all with '_'",
"String",
"s",
"=",
"owlName",
".",
"replaceAll",
"(",
"\"-\"",
",",
"\"_\"",
")",
";",
"s",
"=",
"s",
".",
"substring",... | Given the name of a property's name as indicated in the OWL file, this method converts the name
to a Java compatible name.
@param owlName the property name as a string
@return the Java compatible name of the property | [
"Given",
"the",
"name",
"of",
"a",
"property",
"s",
"name",
"as",
"indicated",
"in",
"the",
"OWL",
"file",
"this",
"method",
"converts",
"the",
"name",
"to",
"a",
"Java",
"compatible",
"name",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractPropertyEditor.java#L170-L176 |
10,837 | BioPAX/Paxtools | normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java | MiriamLink.getDataTypeDef | public static String getDataTypeDef(String datatypeKey)
{
Datatype datatype = getDatatype(datatypeKey);
return datatype.getDefinition();
} | java | public static String getDataTypeDef(String datatypeKey)
{
Datatype datatype = getDatatype(datatypeKey);
return datatype.getDefinition();
} | [
"public",
"static",
"String",
"getDataTypeDef",
"(",
"String",
"datatypeKey",
")",
"{",
"Datatype",
"datatype",
"=",
"getDatatype",
"(",
"datatypeKey",
")",
";",
"return",
"datatype",
".",
"getDefinition",
"(",
")",
";",
"}"
] | Retrieves the definition of a data type.
@param datatypeKey - ID, name or URI (URN or URL) of a data type
@return definition of the data type
@throws IllegalArgumentException when datatype not found | [
"Retrieves",
"the",
"definition",
"of",
"a",
"data",
"type",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java#L217-L221 |
10,838 | BioPAX/Paxtools | normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java | MiriamLink.getDataResources | public static String[] getDataResources(String datatypeKey)
{
Set<String> locations = new HashSet<String>();
Datatype datatype = getDatatype(datatypeKey);
for (Resource resource : getResources(datatype)) {
String link = resource.getDataResource();
locations.add(link);
}
return locations.... | java | public static String[] getDataResources(String datatypeKey)
{
Set<String> locations = new HashSet<String>();
Datatype datatype = getDatatype(datatypeKey);
for (Resource resource : getResources(datatype)) {
String link = resource.getDataResource();
locations.add(link);
}
return locations.... | [
"public",
"static",
"String",
"[",
"]",
"getDataResources",
"(",
"String",
"datatypeKey",
")",
"{",
"Set",
"<",
"String",
">",
"locations",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"Datatype",
"datatype",
"=",
"getDatatype",
"(",
"datatype... | Retrieves home page URLs of a datatype.
@param datatypeKey - name (can be a synonym), ID, or URI (URL or URN) of a data type
@return array of strings containing all the address of the main page of the resources of the data type
@throws IllegalArgumentException when datatype not found | [
"Retrieves",
"home",
"page",
"URLs",
"of",
"a",
"datatype",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java#L258-L267 |
10,839 | BioPAX/Paxtools | normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java | MiriamLink.isDeprecated | public static boolean isDeprecated(String uri)
{
Datatype datatype = datatypesHash.get(uri);
String urn = getOfficialDataTypeURI(datatype);
return !uri.equalsIgnoreCase(urn);
} | java | public static boolean isDeprecated(String uri)
{
Datatype datatype = datatypesHash.get(uri);
String urn = getOfficialDataTypeURI(datatype);
return !uri.equalsIgnoreCase(urn);
} | [
"public",
"static",
"boolean",
"isDeprecated",
"(",
"String",
"uri",
")",
"{",
"Datatype",
"datatype",
"=",
"datatypesHash",
".",
"get",
"(",
"uri",
")",
";",
"String",
"urn",
"=",
"getOfficialDataTypeURI",
"(",
"datatype",
")",
";",
"return",
"!",
"uri",
... | To know if a URI of a data type is deprecated.
@param uri (URN or URL) of a data type
@return answer ("true" or "false") to the question: is this URI deprecated? | [
"To",
"know",
"if",
"a",
"URI",
"of",
"a",
"data",
"type",
"is",
"deprecated",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java#L276-L281 |
10,840 | BioPAX/Paxtools | normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java | MiriamLink.getName | public static String getName(String datatypeKey)
{
Datatype datatype = getDatatype(datatypeKey);
return datatype.getName();
} | java | public static String getName(String datatypeKey)
{
Datatype datatype = getDatatype(datatypeKey);
return datatype.getName();
} | [
"public",
"static",
"String",
"getName",
"(",
"String",
"datatypeKey",
")",
"{",
"Datatype",
"datatype",
"=",
"getDatatype",
"(",
"datatypeKey",
")",
";",
"return",
"datatype",
".",
"getName",
"(",
")",
";",
"}"
] | Retrieves the preferred name of a data type.
@param datatypeKey URI (URL or URN), ID, or nickname of a data type
@return the common name of the data type
@throws IllegalArgumentException when not found | [
"Retrieves",
"the",
"preferred",
"name",
"of",
"a",
"data",
"type",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java#L307-L311 |
10,841 | BioPAX/Paxtools | normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java | MiriamLink.getDataTypesName | public static String[] getDataTypesName()
{
Set<String> dataTypeNames = new HashSet<String>();
for(Datatype datatype : miriam.getDatatype()) {
dataTypeNames.add(datatype.getName());
}
return dataTypeNames.toArray(ARRAY_OF_STRINGS);
} | java | public static String[] getDataTypesName()
{
Set<String> dataTypeNames = new HashSet<String>();
for(Datatype datatype : miriam.getDatatype()) {
dataTypeNames.add(datatype.getName());
}
return dataTypeNames.toArray(ARRAY_OF_STRINGS);
} | [
"public",
"static",
"String",
"[",
"]",
"getDataTypesName",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"dataTypeNames",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"Datatype",
"datatype",
":",
"miriam",
".",
"getDatatype",
"(",
... | Retrieves the list of preferred names of all the data types available.
@return list of names of all the data types | [
"Retrieves",
"the",
"list",
"of",
"preferred",
"names",
"of",
"all",
"the",
"data",
"types",
"available",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java#L339-L346 |
10,842 | BioPAX/Paxtools | normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java | MiriamLink.convertUrn | public static String convertUrn(String urn) {
String[] tokens = urn.split(":");
return "http://identifiers.org/" + tokens[tokens.length-2]
+ "/" + URLDecoder.decode(tokens[tokens.length-1]);
} | java | public static String convertUrn(String urn) {
String[] tokens = urn.split(":");
return "http://identifiers.org/" + tokens[tokens.length-2]
+ "/" + URLDecoder.decode(tokens[tokens.length-1]);
} | [
"public",
"static",
"String",
"convertUrn",
"(",
"String",
"urn",
")",
"{",
"String",
"[",
"]",
"tokens",
"=",
"urn",
".",
"split",
"(",
"\":\"",
")",
";",
"return",
"\"http://identifiers.org/\"",
"+",
"tokens",
"[",
"tokens",
".",
"length",
"-",
"2",
"]... | Converts a MIRIAM URN into its equivalent Identifiers.org URL.
@see #getURI(String, String) - use this to get the URN
@see #getIdentifiersOrgURI(String, String) - prefered URI
@param urn - an existing Miriam URN, e.g., "urn:miriam:obo.go:GO%3A0045202"
@return the Identifiers.org URL corresponding to the data URN, e.g... | [
"Converts",
"a",
"MIRIAM",
"URN",
"into",
"its",
"equivalent",
"Identifiers",
".",
"org",
"URL",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/normalizer/src/main/java/org/biopax/paxtools/normalizer/MiriamLink.java#L553-L557 |
10,843 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/XOR.java | XOR.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
int x = -1;
for (MappedConst mc : con)
{
if (mc.satisfies(match, ind)) x *= -1;
}
return x == 1;
} | java | @Override
public boolean satisfies(Match match, int... ind)
{
int x = -1;
for (MappedConst mc : con)
{
if (mc.satisfies(match, ind)) x *= -1;
}
return x == 1;
} | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"int",
"x",
"=",
"-",
"1",
";",
"for",
"(",
"MappedConst",
"mc",
":",
"con",
")",
"{",
"if",
"(",
"mc",
".",
"satisfies",
"(",
"match",
... | Checks if constraints satisfy in xor pattern.
@param match match to validate
@param ind mapped indices
@return true if all satisfy | [
"Checks",
"if",
"constraints",
"satisfy",
"in",
"xor",
"pattern",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/XOR.java#L34-L43 |
10,844 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/XOR.java | XOR.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement> (
con[0].generate(match, ind));
for (int i = 1; i < con.length; i++)
{
if (gen.isEmpty()) break;
Collection<BioPAXElement> subset = con[i].generate(match, ind);
... | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement> (
con[0].generate(match, ind));
for (int i = 1; i < con.length; i++)
{
if (gen.isEmpty()) break;
Collection<BioPAXElement> subset = con[i].generate(match, ind);
... | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Collection",
"<",
"BioPAXElement",
">",
"gen",
"=",
"new",
"HashSet",
"<",
"BioPAXElement",
">",
"(",
"con",
"[",
... | Gets xor of the generated elements by the member constraints.
@param match match to process
@param ind mapped indices
@return satisfying elements | [
"Gets",
"xor",
"of",
"the",
"generated",
"elements",
"by",
"the",
"member",
"constraints",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/XOR.java#L51-L69 |
10,845 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Type.java | Type.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
assert ind.length == 1;
return clazz.isAssignableFrom(match.get(ind[0]).getModelInterface());
} | java | @Override
public boolean satisfies(Match match, int... ind)
{
assert ind.length == 1;
return clazz.isAssignableFrom(match.get(ind[0]).getModelInterface());
} | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"assert",
"ind",
".",
"length",
"==",
"1",
";",
"return",
"clazz",
".",
"isAssignableFrom",
"(",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
... | Checks if the element is assignable to a variable of the desired type.
@param match current pattern match
@param ind mapped indices
@return true if the element is assignable to a variable of the desired type | [
"Checks",
"if",
"the",
"element",
"is",
"assignable",
"to",
"a",
"variable",
"of",
"the",
"desired",
"type",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Type.java#L34-L40 |
10,846 | BioPAX/Paxtools | psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/EntryMapper.java | EntryMapper.run | public void run(Entry entry) {
// get availabilities
final Set<String> avail = new HashSet<String>();
if(entry.hasAvailabilities()) {
for (Availability a : entry.getAvailabilities())
if (a.hasValue())
avail.add(a.getValue());
}
// get data source
final Provenance pro = createProvenance(... | java | public void run(Entry entry) {
// get availabilities
final Set<String> avail = new HashSet<String>();
if(entry.hasAvailabilities()) {
for (Availability a : entry.getAvailabilities())
if (a.hasValue())
avail.add(a.getValue());
}
// get data source
final Provenance pro = createProvenance(... | [
"public",
"void",
"run",
"(",
"Entry",
"entry",
")",
"{",
"// get availabilities",
"final",
"Set",
"<",
"String",
">",
"avail",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"if",
"(",
"entry",
".",
"hasAvailabilities",
"(",
")",
")",
"{",
... | Convert a PSIMI entry to BioPAX
interactions, participants, etc. objects
and add to the target BioPAX model.
@param entry | [
"Convert",
"a",
"PSIMI",
"entry",
"to",
"BioPAX",
"interactions",
"participants",
"etc",
".",
"objects",
"and",
"add",
"to",
"the",
"target",
"BioPAX",
"model",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/EntryMapper.java#L128-L162 |
10,847 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/InterToPartER.java | InterToPartER.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Interaction inter = (Interaction) match.get(ind[0]);
Set<Entity> taboo = new HashSet<Entity>();
for (int i = 1; i < getVariableSize() - 1; i++)
{
taboo.add((Entity) match.get(ind[i]));
}
if (direction == null) return gene... | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Interaction inter = (Interaction) match.get(ind[0]);
Set<Entity> taboo = new HashSet<Entity>();
for (int i = 1; i < getVariableSize() - 1; i++)
{
taboo.add((Entity) match.get(ind[i]));
}
if (direction == null) return gene... | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Interaction",
"inter",
"=",
"(",
"Interaction",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";",
... | Iterated over non-taboo participants and collectes related ER.
@param match current pattern match
@param ind mapped indices
@return related participants | [
"Iterated",
"over",
"non",
"-",
"taboo",
"participants",
"and",
"collectes",
"related",
"ER",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/InterToPartER.java#L106-L120 |
10,848 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/InterToPartER.java | InterToPartER.generate | protected Collection<BioPAXElement> generate(Interaction inter, Set<Entity> taboo)
{
Set<BioPAXElement> simples = new HashSet<BioPAXElement>();
for (Entity part : inter.getParticipant())
{
if (part instanceof PhysicalEntity && !taboo.contains(part))
{
simples.addAll(linker.getLinkedElements((PhysicalE... | java | protected Collection<BioPAXElement> generate(Interaction inter, Set<Entity> taboo)
{
Set<BioPAXElement> simples = new HashSet<BioPAXElement>();
for (Entity part : inter.getParticipant())
{
if (part instanceof PhysicalEntity && !taboo.contains(part))
{
simples.addAll(linker.getLinkedElements((PhysicalE... | [
"protected",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Interaction",
"inter",
",",
"Set",
"<",
"Entity",
">",
"taboo",
")",
"{",
"Set",
"<",
"BioPAXElement",
">",
"simples",
"=",
"new",
"HashSet",
"<",
"BioPAXElement",
">",
"(",
")",
";",
... | Gets the related entity references of the given interaction.
@param inter interaction
@param taboo entities to ignore/skip
@return entity references | [
"Gets",
"the",
"related",
"entity",
"references",
"of",
"the",
"given",
"interaction",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/InterToPartER.java#L128-L141 |
10,849 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/InterToPartER.java | InterToPartER.generate | protected Collection<BioPAXElement> generate(Conversion conv, Direction direction,
Set<Entity> taboo)
{
if (direction == null) throw new IllegalArgumentException("Direction cannot be null");
if (!(direction == Direction.BOTHSIDERS || direction == Direction.ONESIDERS))
{
Set<BioPAXElement> simples = new Has... | java | protected Collection<BioPAXElement> generate(Conversion conv, Direction direction,
Set<Entity> taboo)
{
if (direction == null) throw new IllegalArgumentException("Direction cannot be null");
if (!(direction == Direction.BOTHSIDERS || direction == Direction.ONESIDERS))
{
Set<BioPAXElement> simples = new Has... | [
"protected",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Conversion",
"conv",
",",
"Direction",
"direction",
",",
"Set",
"<",
"Entity",
">",
"taboo",
")",
"{",
"if",
"(",
"direction",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException"... | Gets the related entity references of the given interaction,
@param conv conversion interaction
@param direction which side(s) participants of the conversion to consider
@param taboo skip list of entities
@return entity references | [
"Gets",
"the",
"related",
"entity",
"references",
"of",
"the",
"given",
"interaction"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/InterToPartER.java#L150-L203 |
10,850 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/FilteredPropertyAccessor.java | FilteredPropertyAccessor.create | public static <D extends BioPAXElement, R> PropertyAccessor<D,R> create(PropertyAccessor<D,R> pa,
Class filter)
{
return new FilteredPropertyAccessor<D, R>(pa, filter);
} | java | public static <D extends BioPAXElement, R> PropertyAccessor<D,R> create(PropertyAccessor<D,R> pa,
Class filter)
{
return new FilteredPropertyAccessor<D, R>(pa, filter);
} | [
"public",
"static",
"<",
"D",
"extends",
"BioPAXElement",
",",
"R",
">",
"PropertyAccessor",
"<",
"D",
",",
"R",
">",
"create",
"(",
"PropertyAccessor",
"<",
"D",
",",
"R",
">",
"pa",
",",
"Class",
"filter",
")",
"{",
"return",
"new",
"FilteredPropertyAc... | FactoryMethod that creates a filtered property accessor by decorating a given accessor with a class filter.
@param pa to be decorated
@param filter Class to be filtered, must extend from R.
@param <D> Domain of the original accessor
@param <R> Range of the original accessor
@return A filtered accessor. | [
"FactoryMethod",
"that",
"creates",
"a",
"filtered",
"property",
"accessor",
"by",
"decorating",
"a",
"given",
"accessor",
"with",
"a",
"class",
"filter",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/FilteredPropertyAccessor.java#L36-L40 |
10,851 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractTraverser.java | AbstractTraverser.visit | public void visit(BioPAXElement domain, Object range, Model model, PropertyEditor<?,?> editor) {
// actions
visit(range, domain, model, editor);
} | java | public void visit(BioPAXElement domain, Object range, Model model, PropertyEditor<?,?> editor) {
// actions
visit(range, domain, model, editor);
} | [
"public",
"void",
"visit",
"(",
"BioPAXElement",
"domain",
",",
"Object",
"range",
",",
"Model",
"model",
",",
"PropertyEditor",
"<",
"?",
",",
"?",
">",
"editor",
")",
"{",
"// actions",
"visit",
"(",
"range",
",",
"domain",
",",
"model",
",",
"editor",... | Calls the protected abstract method visit that is to be
implemented in subclasses of this abstract class.
@param domain BioPAX Element
@param range property value (can be BioPAX element, primitive, enum, string)
@param model the BioPAX model of interest
@param editor parent's property PropertyEditor | [
"Calls",
"the",
"protected",
"abstract",
"method",
"visit",
"that",
"is",
"to",
"be",
"implemented",
"in",
"subclasses",
"of",
"this",
"abstract",
"class",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/AbstractTraverser.java#L61-L64 |
10,852 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/io/SimpleIOHandler.java | SimpleIOHandler.bindValue | private void bindValue(Triple triple, Model model)
{
if (log.isDebugEnabled())
log.debug(String.valueOf(triple));
BioPAXElement domain = model.getByID(triple.domain);
PropertyEditor editor = this.getEditorMap().getEditorForProperty(triple.property, domain.getModelInterface());
bindValue(triple.range, edi... | java | private void bindValue(Triple triple, Model model)
{
if (log.isDebugEnabled())
log.debug(String.valueOf(triple));
BioPAXElement domain = model.getByID(triple.domain);
PropertyEditor editor = this.getEditorMap().getEditorForProperty(triple.property, domain.getModelInterface());
bindValue(triple.range, edi... | [
"private",
"void",
"bindValue",
"(",
"Triple",
"triple",
",",
"Model",
"model",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"String",
".",
"valueOf",
"(",
"triple",
")",
")",
";",
"BioPAXElement",
"domain... | Binds property.
This method also throws exceptions related to binding.
@param triple A java object that represents an RDF Triple - domain-property-range.
@param model that is being populated. | [
"Binds",
"property",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/io/SimpleIOHandler.java#L338-L348 |
10,853 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ModificationChangeConstraint.java | ModificationChangeConstraint.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
PhysicalEntity pe1 = (PhysicalEntity) match.get(ind[0]);
PhysicalEntity pe2 = (PhysicalEntity) match.get(ind[1]);
Set<ModificationFeature>[] mods =
DifferentialModificationUtil.getChangedModifications(pe1, pe2);
Set<String> terms;
if (type ... | java | @Override
public boolean satisfies(Match match, int... ind)
{
PhysicalEntity pe1 = (PhysicalEntity) match.get(ind[0]);
PhysicalEntity pe2 = (PhysicalEntity) match.get(ind[1]);
Set<ModificationFeature>[] mods =
DifferentialModificationUtil.getChangedModifications(pe1, pe2);
Set<String> terms;
if (type ... | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"PhysicalEntity",
"pe1",
"=",
"(",
"PhysicalEntity",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";",
"PhysicalEntity",
"pe2",
"... | Checks the any of the changed modifications match to any of the desired modifications.
@param match current pattern match
@param ind mapped indices
@return true if a modification change is among desired modifications | [
"Checks",
"the",
"any",
"of",
"the",
"changed",
"modifications",
"match",
"to",
"any",
"of",
"the",
"desired",
"modifications",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ModificationChangeConstraint.java#L59-L75 |
10,854 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java | OR.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
for (MappedConst mc : con)
{
if (mc.satisfies(match, ind)) return true;
}
return false;
} | java | @Override
public boolean satisfies(Match match, int... ind)
{
for (MappedConst mc : con)
{
if (mc.satisfies(match, ind)) return true;
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"for",
"(",
"MappedConst",
"mc",
":",
"con",
")",
"{",
"if",
"(",
"mc",
".",
"satisfies",
"(",
"match",
",",
"ind",
")",
")",
"return",
"t... | Checks if any of the wrapped constraints satisfy.
@param match current pattern match
@param ind mapped indices
@return true if any of the wrapped constraints satisfy | [
"Checks",
"if",
"any",
"of",
"the",
"wrapped",
"constraints",
"satisfy",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java#L39-L47 |
10,855 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java | OR.getVariableSize | @Override
public int getVariableSize()
{
int size = 0;
for (MappedConst mc : con)
{
int m = max(mc.getInds());
if (m > size) size = m;
}
return size + 1;
} | java | @Override
public int getVariableSize()
{
int size = 0;
for (MappedConst mc : con)
{
int m = max(mc.getInds());
if (m > size) size = m;
}
return size + 1;
} | [
"@",
"Override",
"public",
"int",
"getVariableSize",
"(",
")",
"{",
"int",
"size",
"=",
"0",
";",
"for",
"(",
"MappedConst",
"mc",
":",
"con",
")",
"{",
"int",
"m",
"=",
"max",
"(",
"mc",
".",
"getInds",
"(",
")",
")",
";",
"if",
"(",
"m",
">",... | Checks the inner mapping of the wrapped constraints and figures the size.
@return the size | [
"Checks",
"the",
"inner",
"mapping",
"of",
"the",
"wrapped",
"constraints",
"and",
"figures",
"the",
"size",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java#L67-L77 |
10,856 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java | OR.max | protected int max(int[] v)
{
int x = 0;
for (int i : v)
{
if (i > x) x = i;
}
return x;
} | java | protected int max(int[] v)
{
int x = 0;
for (int i : v)
{
if (i > x) x = i;
}
return x;
} | [
"protected",
"int",
"max",
"(",
"int",
"[",
"]",
"v",
")",
"{",
"int",
"x",
"=",
"0",
";",
"for",
"(",
"int",
"i",
":",
"v",
")",
"{",
"if",
"(",
"i",
">",
"x",
")",
"x",
"=",
"i",
";",
"}",
"return",
"x",
";",
"}"
] | Gets the max value.
@param v array to check
@return max value | [
"Gets",
"the",
"max",
"value",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java#L84-L92 |
10,857 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java | OR.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement>();
for (MappedConst mc : con)
{
gen.addAll(mc.generate(match, ind));
}
return gen;
} | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement>();
for (MappedConst mc : con)
{
gen.addAll(mc.generate(match, ind));
}
return gen;
} | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Collection",
"<",
"BioPAXElement",
">",
"gen",
"=",
"new",
"HashSet",
"<",
"BioPAXElement",
">",
"(",
")",
";",
"f... | Gets the intersection of the generated values of wrapped constraints.
@param match current pattern match
@param ind mapped indices
@return intersection of the generated values of wrapped constraints | [
"Gets",
"the",
"intersection",
"of",
"the",
"generated",
"values",
"of",
"wrapped",
"constraints",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/OR.java#L100-L110 |
10,858 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsStateChange | public static Pattern controlsStateChange()
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "generic controller ER");
p.add(erToPE(), "generic controller ER", "controller simple PE");
p.add(linkToComplex(), "controller simple PE", "controller PE... | java | public static Pattern controlsStateChange()
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "generic controller ER");
p.add(erToPE(), "generic controller ER", "controller simple PE");
p.add(linkToComplex(), "controller simple PE", "controller PE... | [
"public",
"static",
"Pattern",
"controlsStateChange",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"controller ER\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",",
"\"controll... | Pattern for a EntityReference has a member PhysicalEntity that is controlling a state change
reaction of another EntityReference.
@return the pattern | [
"Pattern",
"for",
"a",
"EntityReference",
"has",
"a",
"member",
"PhysicalEntity",
"that",
"is",
"controlling",
"a",
"state",
"change",
"reaction",
"of",
"another",
"EntityReference",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L28-L54 |
10,859 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsTransport | public static Pattern controlsTransport()
{
Pattern p = controlsStateChange();
p.add(new OR(
new MappedConst(hasDifferentCompartments(), 0, 1),
new MappedConst(hasDifferentCompartments(), 2, 3)),
"input simple PE", "output simple PE", "input PE", "output PE");
return p;
} | java | public static Pattern controlsTransport()
{
Pattern p = controlsStateChange();
p.add(new OR(
new MappedConst(hasDifferentCompartments(), 0, 1),
new MappedConst(hasDifferentCompartments(), 2, 3)),
"input simple PE", "output simple PE", "input PE", "output PE");
return p;
} | [
"public",
"static",
"Pattern",
"controlsTransport",
"(",
")",
"{",
"Pattern",
"p",
"=",
"controlsStateChange",
"(",
")",
";",
"p",
".",
"add",
"(",
"new",
"OR",
"(",
"new",
"MappedConst",
"(",
"hasDifferentCompartments",
"(",
")",
",",
"0",
",",
"1",
")"... | Pattern for a ProteinReference has a member PhysicalEntity that is controlling a
transportation of another ProteinReference.
@return the pattern | [
"Pattern",
"for",
"a",
"ProteinReference",
"has",
"a",
"member",
"PhysicalEntity",
"that",
"is",
"controlling",
"a",
"transportation",
"of",
"another",
"ProteinReference",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L61-L70 |
10,860 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsTransportOfChemical | public static Pattern controlsTransportOfChemical(Blacklist blacklist)
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToComplex(), "controller... | java | public static Pattern controlsTransportOfChemical(Blacklist blacklist)
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToComplex(), "controller... | [
"public",
"static",
"Pattern",
"controlsTransportOfChemical",
"(",
"Blacklist",
"blacklist",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"controller ER\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",... | Pattern for a ProteinReference has a member PhysicalEntity that is controlling a reaction
that changes cellular location of a small molecule.
@param blacklist a skip-list of ubiquitous molecules
@return the pattern | [
"Pattern",
"for",
"a",
"ProteinReference",
"has",
"a",
"member",
"PhysicalEntity",
"that",
"is",
"controlling",
"a",
"reaction",
"that",
"changes",
"cellular",
"location",
"of",
"a",
"small",
"molecule",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L79-L105 |
10,861 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsStateChangeBothControlAndPart | public static Pattern controlsStateChangeBothControlAndPart()
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToComplex(), "controller simple P... | java | public static Pattern controlsStateChangeBothControlAndPart()
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToComplex(), "controller simple P... | [
"public",
"static",
"Pattern",
"controlsStateChangeBothControlAndPart",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"controller ER\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
... | Pattern for a EntityReference has a member PhysicalEntity that is controlling a state change
reaction of another EntityReference. In this case the controller is also an input to the
reaction. The affected protein is the one that is represented with different non-generic
physical entities at left and right of the reacti... | [
"Pattern",
"for",
"a",
"EntityReference",
"has",
"a",
"member",
"PhysicalEntity",
"that",
"is",
"controlling",
"a",
"state",
"change",
"reaction",
"of",
"another",
"EntityReference",
".",
"In",
"this",
"case",
"the",
"controller",
"is",
"also",
"an",
"input",
... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L114-L142 |
10,862 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsStateChangeButIsParticipant | public static Pattern controlsStateChangeButIsParticipant()
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToComplex(), "controller simple PE"... | java | public static Pattern controlsStateChangeButIsParticipant()
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToComplex(), "controller simple PE"... | [
"public",
"static",
"Pattern",
"controlsStateChangeButIsParticipant",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"controller ER\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",... | Pattern for a EntityReference has a member PhysicalEntity that is controlling a state change
reaction of another EntityReference. This pattern is different from the original
controls-state-change. The controller in this case is not modeled as a controller, but as a
participant of the conversion, and it is at both sides... | [
"Pattern",
"for",
"a",
"EntityReference",
"has",
"a",
"member",
"PhysicalEntity",
"that",
"is",
"controlling",
"a",
"state",
"change",
"reaction",
"of",
"another",
"EntityReference",
".",
"This",
"pattern",
"is",
"different",
"from",
"the",
"original",
"controls",... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L151-L170 |
10,863 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.stateChange | public static Pattern stateChange(Pattern p, String ctrlLabel)
{
if (p == null) p = new Pattern(Conversion.class, "Conversion");
if (ctrlLabel == null) p.add(new Participant(RelType.INPUT), "Conversion", "input PE");
else p.add(new Participant(RelType.INPUT, true), ctrlLabel, "Conversion", "input PE");
p.add... | java | public static Pattern stateChange(Pattern p, String ctrlLabel)
{
if (p == null) p = new Pattern(Conversion.class, "Conversion");
if (ctrlLabel == null) p.add(new Participant(RelType.INPUT), "Conversion", "input PE");
else p.add(new Participant(RelType.INPUT, true), ctrlLabel, "Conversion", "input PE");
p.add... | [
"public",
"static",
"Pattern",
"stateChange",
"(",
"Pattern",
"p",
",",
"String",
"ctrlLabel",
")",
"{",
"if",
"(",
"p",
"==",
"null",
")",
"p",
"=",
"new",
"Pattern",
"(",
"Conversion",
".",
"class",
",",
"\"Conversion\"",
")",
";",
"if",
"(",
"ctrlLa... | Pattern for a Conversion has an input PhysicalEntity and another output PhysicalEntity that
belongs to the same EntityReference.
@param p pattern to update
@param ctrlLabel label
@return the pattern | [
"Pattern",
"for",
"a",
"Conversion",
"has",
"an",
"input",
"PhysicalEntity",
"and",
"another",
"output",
"PhysicalEntity",
"that",
"belongs",
"to",
"the",
"same",
"EntityReference",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L180-L195 |
10,864 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsStateChangeThroughControllerSmallMolecule | public static Pattern controlsStateChangeThroughControllerSmallMolecule(Blacklist blacklist)
{
Pattern p = new Pattern(SequenceEntityReference.class, "upper controller ER");
p.add(linkedER(true), "upper controller ER", "upper controller generic ER");
p.add(erToPE(), "upper controller generic ER", "upper controll... | java | public static Pattern controlsStateChangeThroughControllerSmallMolecule(Blacklist blacklist)
{
Pattern p = new Pattern(SequenceEntityReference.class, "upper controller ER");
p.add(linkedER(true), "upper controller ER", "upper controller generic ER");
p.add(erToPE(), "upper controller generic ER", "upper controll... | [
"public",
"static",
"Pattern",
"controlsStateChangeThroughControllerSmallMolecule",
"(",
"Blacklist",
"blacklist",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"upper controller ER\"",
")",
";",
"p",
".",
"add",... | Pattern for an entity is producing a small molecule, and the small molecule controls state
change of another molecule.
@param blacklist a skip-list of ubiquitous molecules
@return the pattern | [
"Pattern",
"for",
"an",
"entity",
"is",
"producing",
"a",
"small",
"molecule",
"and",
"the",
"small",
"molecule",
"controls",
"state",
"change",
"of",
"another",
"molecule",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L204-L235 |
10,865 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsStateChangeThroughDegradation | public static Pattern controlsStateChangeThroughDegradation()
{
Pattern p = new Pattern(SequenceEntityReference.class, "upstream ER");
p.add(linkedER(true), "upstream ER", "upstream generic ER");
p.add(erToPE(), "upstream generic ER", "upstream SPE");
p.add(linkToComplex(), "upstream SPE", "upstream PE");
p.... | java | public static Pattern controlsStateChangeThroughDegradation()
{
Pattern p = new Pattern(SequenceEntityReference.class, "upstream ER");
p.add(linkedER(true), "upstream ER", "upstream generic ER");
p.add(erToPE(), "upstream generic ER", "upstream SPE");
p.add(linkToComplex(), "upstream SPE", "upstream PE");
p.... | [
"public",
"static",
"Pattern",
"controlsStateChangeThroughDegradation",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"upstream ER\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",... | Finds cases where proteins affect their degradation.
@return the pattern | [
"Finds",
"cases",
"where",
"proteins",
"affect",
"their",
"degradation",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L282-L298 |
10,866 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsMetabolicCatalysis | public static Pattern controlsMetabolicCatalysis(Blacklist blacklist, boolean consumption)
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToCo... | java | public static Pattern controlsMetabolicCatalysis(Blacklist blacklist, boolean consumption)
{
Pattern p = new Pattern(SequenceEntityReference.class, "controller ER");
p.add(linkedER(true), "controller ER", "controller generic ER");
p.add(erToPE(), "controller generic ER", "controller simple PE");
p.add(linkToCo... | [
"public",
"static",
"Pattern",
"controlsMetabolicCatalysis",
"(",
"Blacklist",
"blacklist",
",",
"boolean",
"consumption",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"controller ER\"",
")",
";",
"p",
".",
... | Pattern for a Protein controlling a reaction whose participant is a small molecule.
@param blacklist a skip-list of ubiquitous molecules
@param consumption true/false (TODO explain)
@return the pattern | [
"Pattern",
"for",
"a",
"Protein",
"controlling",
"a",
"reaction",
"whose",
"participant",
"is",
"a",
"small",
"molecule",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L317-L342 |
10,867 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsExpressionWithTemplateReac | public static Pattern controlsExpressionWithTemplateReac()
{
Pattern p = new Pattern(SequenceEntityReference.class, "TF ER");
p.add(linkedER(true), "TF ER", "TF generic ER");
p.add(erToPE(), "TF generic ER", "TF SPE");
p.add(linkToComplex(), "TF SPE", "TF PE");
p.add(peToControl(), "TF PE", "Control");
p.a... | java | public static Pattern controlsExpressionWithTemplateReac()
{
Pattern p = new Pattern(SequenceEntityReference.class, "TF ER");
p.add(linkedER(true), "TF ER", "TF generic ER");
p.add(erToPE(), "TF generic ER", "TF SPE");
p.add(linkToComplex(), "TF SPE", "TF PE");
p.add(peToControl(), "TF PE", "Control");
p.a... | [
"public",
"static",
"Pattern",
"controlsExpressionWithTemplateReac",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"TF ER\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",",
"\"T... | Finds transcription factors that trans-activate or trans-inhibit an entity.
@return the pattern | [
"Finds",
"transcription",
"factors",
"that",
"trans",
"-",
"activate",
"or",
"trans",
"-",
"inhibit",
"an",
"entity",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L419-L434 |
10,868 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsExpressionWithConversion | public static Pattern controlsExpressionWithConversion()
{
Pattern p = new Pattern(SequenceEntityReference.class, "TF ER");
p.add(linkedER(true), "TF ER", "TF generic ER");
p.add(erToPE(), "TF generic ER", "TF SPE");
p.add(linkToComplex(), "TF SPE", "TF PE");
p.add(peToControl(), "TF PE", "Control");
p.add... | java | public static Pattern controlsExpressionWithConversion()
{
Pattern p = new Pattern(SequenceEntityReference.class, "TF ER");
p.add(linkedER(true), "TF ER", "TF generic ER");
p.add(erToPE(), "TF generic ER", "TF SPE");
p.add(linkToComplex(), "TF SPE", "TF PE");
p.add(peToControl(), "TF PE", "Control");
p.add... | [
"public",
"static",
"Pattern",
"controlsExpressionWithConversion",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"TF ER\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",",
"\"TF ... | Finds the cases where transcription relation is shown using a Conversion instead of a
TemplateReaction.
@return the pattern | [
"Finds",
"the",
"cases",
"where",
"transcription",
"relation",
"is",
"shown",
"using",
"a",
"Conversion",
"instead",
"of",
"a",
"TemplateReaction",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L441-L475 |
10,869 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.controlsDegradationIndirectly | public static Pattern controlsDegradationIndirectly()
{
Pattern p = controlsStateChange();
p.add(new Size(new ParticipatesInConv(RelType.INPUT), 1, Size.Type.EQUAL), "output PE");
p.add(new Empty(peToControl()), "output PE");
p.add(new ParticipatesInConv(RelType.INPUT), "output PE", "degrading Conv");
p.add(... | java | public static Pattern controlsDegradationIndirectly()
{
Pattern p = controlsStateChange();
p.add(new Size(new ParticipatesInConv(RelType.INPUT), 1, Size.Type.EQUAL), "output PE");
p.add(new Empty(peToControl()), "output PE");
p.add(new ParticipatesInConv(RelType.INPUT), "output PE", "degrading Conv");
p.add(... | [
"public",
"static",
"Pattern",
"controlsDegradationIndirectly",
"(",
")",
"{",
"Pattern",
"p",
"=",
"controlsStateChange",
"(",
")",
";",
"p",
".",
"add",
"(",
"new",
"Size",
"(",
"new",
"ParticipatesInConv",
"(",
"RelType",
".",
"INPUT",
")",
",",
"1",
",... | Finds cases where protein A changes state of B, and B is then degraded.
NOTE: THIS PATTERN DOES NOT WORK. KEEPING ONLY FOR HISTORICAL REASONS.
@return the pattern | [
"Finds",
"cases",
"where",
"protein",
"A",
"changes",
"state",
"of",
"B",
"and",
"B",
"is",
"then",
"degraded",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L484-L496 |
10,870 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.inComplexWith | public static Pattern inComplexWith()
{
Pattern p = new Pattern(SequenceEntityReference.class, "Protein 1");
p.add(linkedER(true), "Protein 1", "generic Protein 1");
p.add(erToPE(), "generic Protein 1", "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
p.add(new PathConstraint("PhysicalEntity/componentOf"), "P... | java | public static Pattern inComplexWith()
{
Pattern p = new Pattern(SequenceEntityReference.class, "Protein 1");
p.add(linkedER(true), "Protein 1", "generic Protein 1");
p.add(erToPE(), "generic Protein 1", "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
p.add(new PathConstraint("PhysicalEntity/componentOf"), "P... | [
"public",
"static",
"Pattern",
"inComplexWith",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"Protein 1\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",",
"\"Protein 1\"",
",... | Two proteins have states that are members of the same complex. Handles nested complexes and
homologies. Also guarantees that relationship to the complex is through different direct
complex members.
@return pattern | [
"Two",
"proteins",
"have",
"states",
"that",
"are",
"members",
"of",
"the",
"same",
"complex",
".",
"Handles",
"nested",
"complexes",
"and",
"homologies",
".",
"Also",
"guarantees",
"that",
"relationship",
"to",
"the",
"complex",
"is",
"through",
"different",
... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L504-L519 |
10,871 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.chemicalAffectsProteinThroughBinding | public static Pattern chemicalAffectsProteinThroughBinding(Blacklist blacklist)
{
Pattern p = new Pattern(SmallMoleculeReference.class, "SMR");
p.add(erToPE(), "SMR", "SPE1");
p.add(notGeneric(), "SPE1");
if (blacklist != null) p.add(new NonUbique(blacklist), "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
... | java | public static Pattern chemicalAffectsProteinThroughBinding(Blacklist blacklist)
{
Pattern p = new Pattern(SmallMoleculeReference.class, "SMR");
p.add(erToPE(), "SMR", "SPE1");
p.add(notGeneric(), "SPE1");
if (blacklist != null) p.add(new NonUbique(blacklist), "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
... | [
"public",
"static",
"Pattern",
"chemicalAffectsProteinThroughBinding",
"(",
"Blacklist",
"blacklist",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SmallMoleculeReference",
".",
"class",
",",
"\"SMR\"",
")",
";",
"p",
".",
"add",
"(",
"erToPE",
"(",
"... | A small molecule is in a complex with a protein.
@param blacklist a skip-list of ubiquitous molecules
@return pattern | [
"A",
"small",
"molecule",
"is",
"in",
"a",
"complex",
"with",
"a",
"protein",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L527-L542 |
10,872 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.chemicalAffectsProteinThroughControl | public static Pattern chemicalAffectsProteinThroughControl()
{
Pattern p = new Pattern(SmallMoleculeReference.class, "controller SMR");
p.add(erToPE(), "controller SMR", "controller simple PE");
p.add(notGeneric(), "controller simple PE");
p.add(linkToComplex(), "controller simple PE", "controller PE");
p.ad... | java | public static Pattern chemicalAffectsProteinThroughControl()
{
Pattern p = new Pattern(SmallMoleculeReference.class, "controller SMR");
p.add(erToPE(), "controller SMR", "controller simple PE");
p.add(notGeneric(), "controller simple PE");
p.add(linkToComplex(), "controller simple PE", "controller PE");
p.ad... | [
"public",
"static",
"Pattern",
"chemicalAffectsProteinThroughControl",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SmallMoleculeReference",
".",
"class",
",",
"\"controller SMR\"",
")",
";",
"p",
".",
"add",
"(",
"erToPE",
"(",
")",
",",
"\"con... | A small molecule controls an interaction of which the protein is a participant.
@return pattern | [
"A",
"small",
"molecule",
"controls",
"an",
"interaction",
"of",
"which",
"the",
"protein",
"is",
"a",
"participant",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L548-L563 |
10,873 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.neighborOf | public static Pattern neighborOf()
{
Pattern p = new Pattern(SequenceEntityReference.class, "Protein 1");
p.add(linkedER(true), "Protein 1", "generic Protein 1");
p.add(erToPE(), "generic Protein 1", "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
p.add(peToInter(), "PE1", "Inter");
p.add(interToPE(), "Int... | java | public static Pattern neighborOf()
{
Pattern p = new Pattern(SequenceEntityReference.class, "Protein 1");
p.add(linkedER(true), "Protein 1", "generic Protein 1");
p.add(erToPE(), "generic Protein 1", "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
p.add(peToInter(), "PE1", "Inter");
p.add(interToPE(), "Int... | [
"public",
"static",
"Pattern",
"neighborOf",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"Protein 1\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",",
"\"Protein 1\"",
",",
... | Constructs a pattern where first and last proteins are related through an interaction. They
can be participants or controllers. No limitation.
@return the pattern | [
"Constructs",
"a",
"pattern",
"where",
"first",
"and",
"last",
"proteins",
"are",
"related",
"through",
"an",
"interaction",
".",
"They",
"can",
"be",
"participants",
"or",
"controllers",
".",
"No",
"limitation",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L570-L585 |
10,874 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.reactsWith | public static Pattern reactsWith(Blacklist blacklist)
{
Pattern p = new Pattern(SmallMoleculeReference.class, "SMR1");
p.add(erToPE(), "SMR1", "SPE1");
p.add(notGeneric(), "SPE1");
p.add(linkToComplex(blacklist), "SPE1", "PE1");
p.add(new ParticipatesInConv(RelType.INPUT, blacklist), "PE1", "Conv");
p.add(... | java | public static Pattern reactsWith(Blacklist blacklist)
{
Pattern p = new Pattern(SmallMoleculeReference.class, "SMR1");
p.add(erToPE(), "SMR1", "SPE1");
p.add(notGeneric(), "SPE1");
p.add(linkToComplex(blacklist), "SPE1", "PE1");
p.add(new ParticipatesInConv(RelType.INPUT, blacklist), "PE1", "Conv");
p.add(... | [
"public",
"static",
"Pattern",
"reactsWith",
"(",
"Blacklist",
"blacklist",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SmallMoleculeReference",
".",
"class",
",",
"\"SMR1\"",
")",
";",
"p",
".",
"add",
"(",
"erToPE",
"(",
")",
",",
"\"SMR1\"",
... | Constructs a pattern where first and last small molecules are substrates to the same
biochemical reaction.
@param blacklist a skip-list of ubiquitous molecules
@return the pattern | [
"Constructs",
"a",
"pattern",
"where",
"first",
"and",
"last",
"small",
"molecules",
"are",
"substrates",
"to",
"the",
"same",
"biochemical",
"reaction",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L594-L612 |
10,875 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.usedToProduce | public static Pattern usedToProduce(Blacklist blacklist)
{
Pattern p = new Pattern(SmallMoleculeReference.class, "SMR1");
p.add(erToPE(), "SMR1", "SPE1");
p.add(notGeneric(), "SPE1");
p.add(linkToComplex(blacklist), "SPE1", "PE1");
p.add(new ParticipatesInConv(RelType.INPUT, blacklist), "PE1", "Conv");
p.a... | java | public static Pattern usedToProduce(Blacklist blacklist)
{
Pattern p = new Pattern(SmallMoleculeReference.class, "SMR1");
p.add(erToPE(), "SMR1", "SPE1");
p.add(notGeneric(), "SPE1");
p.add(linkToComplex(blacklist), "SPE1", "PE1");
p.add(new ParticipatesInConv(RelType.INPUT, blacklist), "PE1", "Conv");
p.a... | [
"public",
"static",
"Pattern",
"usedToProduce",
"(",
"Blacklist",
"blacklist",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SmallMoleculeReference",
".",
"class",
",",
"\"SMR1\"",
")",
";",
"p",
".",
"add",
"(",
"erToPE",
"(",
")",
",",
"\"SMR1\"... | Constructs a pattern where first small molecule is an input a biochemical reaction that
produces the second small molecule.
biochemical reaction.
@param blacklist a skip-list of ubiquitous molecules
@return the pattern | [
"Constructs",
"a",
"pattern",
"where",
"first",
"small",
"molecule",
"is",
"an",
"input",
"a",
"biochemical",
"reaction",
"that",
"produces",
"the",
"second",
"small",
"molecule",
".",
"biochemical",
"reaction",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L622-L640 |
10,876 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.molecularInteraction | public static Pattern molecularInteraction()
{
Pattern p = new Pattern(SequenceEntityReference.class, "Protein 1");
p.add(linkedER(true), "Protein 1", "generic Protein 1");
p.add(erToPE(), "generic Protein 1", "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
p.add(new PathConstraint("PhysicalEntity/participan... | java | public static Pattern molecularInteraction()
{
Pattern p = new Pattern(SequenceEntityReference.class, "Protein 1");
p.add(linkedER(true), "Protein 1", "generic Protein 1");
p.add(erToPE(), "generic Protein 1", "SPE1");
p.add(linkToComplex(), "SPE1", "PE1");
p.add(new PathConstraint("PhysicalEntity/participan... | [
"public",
"static",
"Pattern",
"molecularInteraction",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"SequenceEntityReference",
".",
"class",
",",
"\"Protein 1\"",
")",
";",
"p",
".",
"add",
"(",
"linkedER",
"(",
"true",
")",
",",
"\"Protein 1\"... | Constructs a pattern where first and last molecules are participants of a
MolecularInteraction.
@return the pattern | [
"Constructs",
"a",
"pattern",
"where",
"first",
"and",
"last",
"molecules",
"are",
"participants",
"of",
"a",
"MolecularInteraction",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L647-L668 |
10,877 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.relatedProteinRefOfInter | public static Pattern relatedProteinRefOfInter(Class<? extends Interaction>... seedType)
{
Pattern p = new Pattern(Interaction.class, "Interaction");
if (seedType.length == 1)
{
p.add(new Type(seedType[0]), "Interaction");
}
else if (seedType.length > 1)
{
MappedConst[] mc = new MappedConst[seedType... | java | public static Pattern relatedProteinRefOfInter(Class<? extends Interaction>... seedType)
{
Pattern p = new Pattern(Interaction.class, "Interaction");
if (seedType.length == 1)
{
p.add(new Type(seedType[0]), "Interaction");
}
else if (seedType.length > 1)
{
MappedConst[] mc = new MappedConst[seedType... | [
"public",
"static",
"Pattern",
"relatedProteinRefOfInter",
"(",
"Class",
"<",
"?",
"extends",
"Interaction",
">",
"...",
"seedType",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"Interaction",
".",
"class",
",",
"\"Interaction\"",
")",
";",
"if",
"(... | Finds ProteinsReference related to an interaction. If specific types of interactions are
desired, they should be sent as parameter, otherwise leave the parameter empty.
@param seedType specific BioPAX interaction sub-types (interface classes)
@return pattern | [
"Finds",
"ProteinsReference",
"related",
"to",
"an",
"interaction",
".",
"If",
"specific",
"types",
"of",
"interactions",
"are",
"desired",
"they",
"should",
"be",
"sent",
"as",
"parameter",
"otherwise",
"leave",
"the",
"parameter",
"empty",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L680-L709 |
10,878 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.modifiedPESimple | public static Pattern modifiedPESimple()
{
Pattern p = new Pattern(EntityReference.class, "modified ER");
p.add(erToPE(), "modified ER", "first PE");
p.add(participatesInConv(), "first PE", "Conversion");
p.add(new ConversionSide(ConversionSide.Type.OTHER_SIDE), "first PE", "Conversion", "second PE");
p.add(... | java | public static Pattern modifiedPESimple()
{
Pattern p = new Pattern(EntityReference.class, "modified ER");
p.add(erToPE(), "modified ER", "first PE");
p.add(participatesInConv(), "first PE", "Conversion");
p.add(new ConversionSide(ConversionSide.Type.OTHER_SIDE), "first PE", "Conversion", "second PE");
p.add(... | [
"public",
"static",
"Pattern",
"modifiedPESimple",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"EntityReference",
".",
"class",
",",
"\"modified ER\"",
")",
";",
"p",
".",
"add",
"(",
"erToPE",
"(",
")",
",",
"\"modified ER\"",
",",
"\"first... | Pattern for an EntityReference has distinct PhysicalEntities associated with both left and
right of a Conversion.
@return the pattern | [
"Pattern",
"for",
"an",
"EntityReference",
"has",
"distinct",
"PhysicalEntities",
"associated",
"with",
"both",
"left",
"and",
"right",
"of",
"a",
"Conversion",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L795-L804 |
10,879 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.actChange | public static Pattern actChange(boolean activating,
Map<EntityReference, Set<ModificationFeature>> activityFeat,
Map<EntityReference, Set<ModificationFeature>> inactivityFeat)
{
Pattern p = peInOut();
p.add(new OR(
new MappedConst(differentialActivity(activating), 0, 1),
new MappedConst(new ActivityModif... | java | public static Pattern actChange(boolean activating,
Map<EntityReference, Set<ModificationFeature>> activityFeat,
Map<EntityReference, Set<ModificationFeature>> inactivityFeat)
{
Pattern p = peInOut();
p.add(new OR(
new MappedConst(differentialActivity(activating), 0, 1),
new MappedConst(new ActivityModif... | [
"public",
"static",
"Pattern",
"actChange",
"(",
"boolean",
"activating",
",",
"Map",
"<",
"EntityReference",
",",
"Set",
"<",
"ModificationFeature",
">",
">",
"activityFeat",
",",
"Map",
"<",
"EntityReference",
",",
"Set",
"<",
"ModificationFeature",
">",
">",
... | Pattern for the activity of an EntityReference is changed through a Conversion.
@param activating desired change
@param activityFeat modification features associated with activity
@param inactivityFeat modification features associated with inactivity
@return the pattern | [
"Pattern",
"for",
"the",
"activity",
"of",
"an",
"EntityReference",
"is",
"changed",
"through",
"a",
"Conversion",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L813-L824 |
10,880 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.modifierConv | public static Pattern modifierConv()
{
Pattern p = new Pattern(EntityReference.class, "ER");
p.add(erToPE(), "ER", "SPE");
p.add(linkToComplex(), "SPE", "PE");
p.add(participatesInConv(), "PE", "Conversion");
return p;
} | java | public static Pattern modifierConv()
{
Pattern p = new Pattern(EntityReference.class, "ER");
p.add(erToPE(), "ER", "SPE");
p.add(linkToComplex(), "SPE", "PE");
p.add(participatesInConv(), "PE", "Conversion");
return p;
} | [
"public",
"static",
"Pattern",
"modifierConv",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"EntityReference",
".",
"class",
",",
"\"ER\"",
")",
";",
"p",
".",
"add",
"(",
"erToPE",
"(",
")",
",",
"\"ER\"",
",",
"\"SPE\"",
")",
";",
"p"... | Pattern for finding Conversions that an EntityReference is participating.
@return the pattern | [
"Pattern",
"for",
"finding",
"Conversions",
"that",
"an",
"EntityReference",
"is",
"participating",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L830-L837 |
10,881 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.hasNonSelfEffect | public static Pattern hasNonSelfEffect()
{
Pattern p = new Pattern(PhysicalEntity.class, "SPE");
p.add(peToER(), "SPE", "ER");
p.add(linkToComplex(), "SPE", "PE");
p.add(peToControl(), "PE", "Control");
p.add(controlToInter(), "Control", "Inter");
p.add(new NOT(participantER()), "Inter", "ER");
return p;... | java | public static Pattern hasNonSelfEffect()
{
Pattern p = new Pattern(PhysicalEntity.class, "SPE");
p.add(peToER(), "SPE", "ER");
p.add(linkToComplex(), "SPE", "PE");
p.add(peToControl(), "PE", "Control");
p.add(controlToInter(), "Control", "Inter");
p.add(new NOT(participantER()), "Inter", "ER");
return p;... | [
"public",
"static",
"Pattern",
"hasNonSelfEffect",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"PhysicalEntity",
".",
"class",
",",
"\"SPE\"",
")",
";",
"p",
".",
"add",
"(",
"peToER",
"(",
")",
",",
"\"SPE\"",
",",
"\"ER\"",
")",
";",
... | Pattern for detecting PhysicalEntity that controls a Conversion whose participants are not
associated with the EntityReference of the initial PhysicalEntity.
@return the pattern | [
"Pattern",
"for",
"detecting",
"PhysicalEntity",
"that",
"controls",
"a",
"Conversion",
"whose",
"participants",
"are",
"not",
"associated",
"with",
"the",
"EntityReference",
"of",
"the",
"initial",
"PhysicalEntity",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L844-L853 |
10,882 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java | PatternBox.bindsTo | public static Pattern bindsTo()
{
Pattern p = new Pattern(ProteinReference.class, "first PR");
p.add(erToPE(), "first PR", "first simple PE");
p.add(linkToComplex(), "first simple PE", "Complex");
p.add(new Type(Complex.class), "Complex");
p.add(linkToSpecific(), "Complex", "second simple PE");
p.add(peToE... | java | public static Pattern bindsTo()
{
Pattern p = new Pattern(ProteinReference.class, "first PR");
p.add(erToPE(), "first PR", "first simple PE");
p.add(linkToComplex(), "first simple PE", "Complex");
p.add(new Type(Complex.class), "Complex");
p.add(linkToSpecific(), "Complex", "second simple PE");
p.add(peToE... | [
"public",
"static",
"Pattern",
"bindsTo",
"(",
")",
"{",
"Pattern",
"p",
"=",
"new",
"Pattern",
"(",
"ProteinReference",
".",
"class",
",",
"\"first PR\"",
")",
";",
"p",
".",
"add",
"(",
"erToPE",
"(",
")",
",",
"\"first PR\"",
",",
"\"first simple PE\"",... | Finds two Protein that appear together in a Complex.
@return the pattern | [
"Finds",
"two",
"Protein",
"that",
"appear",
"together",
"in",
"a",
"Complex",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L861-L871 |
10,883 | BioPAX/Paxtools | paxtools-console/src/main/java/org/biopax/paxtools/examples/ProteinNameLister.java | ProteinNameLister.listUnificationXrefsPerPathway | public static void listUnificationXrefsPerPathway(Model model)
{
// This is a visitor for elements in a pathway - direct and indirect
Visitor visitor = new Visitor()
{
public void visit(BioPAXElement domain, Object range, Model model, PropertyEditor editor)
{
if (range instanceof physicalEntity)
{
... | java | public static void listUnificationXrefsPerPathway(Model model)
{
// This is a visitor for elements in a pathway - direct and indirect
Visitor visitor = new Visitor()
{
public void visit(BioPAXElement domain, Object range, Model model, PropertyEditor editor)
{
if (range instanceof physicalEntity)
{
... | [
"public",
"static",
"void",
"listUnificationXrefsPerPathway",
"(",
"Model",
"model",
")",
"{",
"// This is a visitor for elements in a pathway - direct and indirect",
"Visitor",
"visitor",
"=",
"new",
"Visitor",
"(",
")",
"{",
"public",
"void",
"visit",
"(",
"BioPAXElemen... | Here is a more elegant way of doing the previous method!
@param model BioPAX object Model | [
"Here",
"is",
"a",
"more",
"elegant",
"way",
"of",
"doing",
"the",
"previous",
"method!"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-console/src/main/java/org/biopax/paxtools/examples/ProteinNameLister.java#L136-L165 |
10,884 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/PEChainsIntersect.java | PEChainsIntersect.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
PhysicalEntity pe0 = (PhysicalEntity) match.get(ind[0]);
PhysicalEntity pe1 = (PhysicalEntity) match.get(ind[1]);
PhysicalEntity pe2 = (PhysicalEntity) match.get(ind[2]);
PhysicalEntity pe3 = (PhysicalEntity) match.get(ind[3]);
PhysicalEntityCha... | java | @Override
public boolean satisfies(Match match, int... ind)
{
PhysicalEntity pe0 = (PhysicalEntity) match.get(ind[0]);
PhysicalEntity pe1 = (PhysicalEntity) match.get(ind[1]);
PhysicalEntity pe2 = (PhysicalEntity) match.get(ind[2]);
PhysicalEntity pe3 = (PhysicalEntity) match.get(ind[3]);
PhysicalEntityCha... | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"PhysicalEntity",
"pe0",
"=",
"(",
"PhysicalEntity",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";",
"PhysicalEntity",
"pe1",
"... | Creates two PhysicalEntity chains with the given endpoints, and checks if they are
intersecting.
@param match current pattern match
@param ind mapped indices
@return true if the chains are intersecting or not intersecting as desired | [
"Creates",
"two",
"PhysicalEntity",
"chains",
"with",
"the",
"given",
"endpoints",
"and",
"checks",
"if",
"they",
"are",
"intersecting",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/PEChainsIntersect.java#L57-L69 |
10,885 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConversionSide.java | ConversionSide.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
assertIndLength(ind);
PhysicalEntity pe1 = (PhysicalEntity) match.get(ind[0]);
Conversion conv = (Conversion) match.get(ind[1]);
Set<PhysicalEntity> parts;
if (conv.getLeft().contains(pe1))
{
parts = sideType == Type.OTHE... | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
assertIndLength(ind);
PhysicalEntity pe1 = (PhysicalEntity) match.get(ind[0]);
Conversion conv = (Conversion) match.get(ind[1]);
Set<PhysicalEntity> parts;
if (conv.getLeft().contains(pe1))
{
parts = sideType == Type.OTHE... | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"assertIndLength",
"(",
"ind",
")",
";",
"PhysicalEntity",
"pe1",
"=",
"(",
"PhysicalEntity",
")",
"match",
".",
"get... | Checks which side is the first PhysicalEntity, and gathers participants on either the other
side or the same side.
@param match current pattern match
@param ind mapped indices
@return participants at the desired side | [
"Checks",
"which",
"side",
"is",
"the",
"first",
"PhysicalEntity",
"and",
"gathers",
"participants",
"on",
"either",
"the",
"other",
"side",
"or",
"the",
"same",
"side",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConversionSide.java#L88-L120 |
10,886 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/EditorMapImpl.java | EditorMapImpl.registerEditorsWithSubClasses | protected void registerEditorsWithSubClasses(PropertyEditor editor, Class<? extends BioPAXElement> domain) {
for (Class<? extends BioPAXElement> c : classToEditorMap.keySet())
{
if (domain.isAssignableFrom(c)) {
//workaround for participants - can be replaced w/ a general
... | java | protected void registerEditorsWithSubClasses(PropertyEditor editor, Class<? extends BioPAXElement> domain) {
for (Class<? extends BioPAXElement> c : classToEditorMap.keySet())
{
if (domain.isAssignableFrom(c)) {
//workaround for participants - can be replaced w/ a general
... | [
"protected",
"void",
"registerEditorsWithSubClasses",
"(",
"PropertyEditor",
"editor",
",",
"Class",
"<",
"?",
"extends",
"BioPAXElement",
">",
"domain",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
"extends",
"BioPAXElement",
">",
"c",
":",
"classToEditorMap",
".",... | This method registers an editor with sub classes - i.e. inserts the editor to the proper value in editor maps.
@param editor to be registered
@param domain a subclass of the editor's original domain. | [
"This",
"method",
"registers",
"an",
"editor",
"with",
"sub",
"classes",
"-",
"i",
".",
"e",
".",
"inserts",
"the",
"editor",
"to",
"the",
"proper",
"value",
"in",
"editor",
"maps",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/EditorMapImpl.java#L145-L170 |
10,887 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/EditorMapImpl.java | EditorMapImpl.registerModelClass | protected void registerModelClass(String localName) {
try {
Class<? extends BioPAXElement> domain = this.getLevel().getInterfaceForName(localName);
HashMap<String, PropertyEditor> peMap = new HashMap<String, PropertyEditor>();
classToEditorMap.put(domain, peMap);
... | java | protected void registerModelClass(String localName) {
try {
Class<? extends BioPAXElement> domain = this.getLevel().getInterfaceForName(localName);
HashMap<String, PropertyEditor> peMap = new HashMap<String, PropertyEditor>();
classToEditorMap.put(domain, peMap);
... | [
"protected",
"void",
"registerModelClass",
"(",
"String",
"localName",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
"extends",
"BioPAXElement",
">",
"domain",
"=",
"this",
".",
"getLevel",
"(",
")",
".",
"getInterfaceForName",
"(",
"localName",
")",
";",
"HashMa... | This method inserts the class into internal hashmaps and initializes the value collections.
@param localName of the BioPAX class. | [
"This",
"method",
"inserts",
"the",
"class",
"into",
"internal",
"hashmaps",
"and",
"initializes",
"the",
"value",
"collections",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/EditorMapImpl.java#L203-L216 |
10,888 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Prune.java | Prune.checkNodeRecursive | private void checkNodeRecursive(Node node)
{
if (isDangling(node))
{
removeNode(node);
for (Edge edge : node.getUpstream())
{
checkNodeRecursive(edge.getSourceNode());
}
for (Edge edge : node.getDownstream())
{
checkNodeRecursive(edge.getTargetNode());
}
for (Node parent : node.get... | java | private void checkNodeRecursive(Node node)
{
if (isDangling(node))
{
removeNode(node);
for (Edge edge : node.getUpstream())
{
checkNodeRecursive(edge.getSourceNode());
}
for (Edge edge : node.getDownstream())
{
checkNodeRecursive(edge.getTargetNode());
}
for (Node parent : node.get... | [
"private",
"void",
"checkNodeRecursive",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"isDangling",
"(",
"node",
")",
")",
"{",
"removeNode",
"(",
"node",
")",
";",
"for",
"(",
"Edge",
"edge",
":",
"node",
".",
"getUpstream",
"(",
")",
")",
"{",
"checkN... | Recursively checks if a node is dangling.
@param node Node to check | [
"Recursively",
"checks",
"if",
"a",
"node",
"is",
"dangling",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Prune.java#L59-L82 |
10,889 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Prune.java | Prune.removeNode | private void removeNode(Node node)
{
result.remove(node);
for (Edge edge : node.getUpstream())
{
result.remove(edge);
}
for (Edge edge : node.getDownstream())
{
result.remove(edge);
}
} | java | private void removeNode(Node node)
{
result.remove(node);
for (Edge edge : node.getUpstream())
{
result.remove(edge);
}
for (Edge edge : node.getDownstream())
{
result.remove(edge);
}
} | [
"private",
"void",
"removeNode",
"(",
"Node",
"node",
")",
"{",
"result",
".",
"remove",
"(",
"node",
")",
";",
"for",
"(",
"Edge",
"edge",
":",
"node",
".",
"getUpstream",
"(",
")",
")",
"{",
"result",
".",
"remove",
"(",
"edge",
")",
";",
"}",
... | Removes the dangling node and its edges.
@param node Node to remove | [
"Removes",
"the",
"dangling",
"node",
"and",
"its",
"edges",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Prune.java#L88-L101 |
10,890 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Prune.java | Prune.isDangling | private boolean isDangling(Node node)
{
if (!result.contains(node)) return false;
if (ST.contains(node)) return false;
boolean hasIncoming = false;
for (Edge edge : node.getUpstream())
{
if (result.contains(edge))
{
hasIncoming = true;
break;
}
}
boolean hasOutgoing = false;
for (E... | java | private boolean isDangling(Node node)
{
if (!result.contains(node)) return false;
if (ST.contains(node)) return false;
boolean hasIncoming = false;
for (Edge edge : node.getUpstream())
{
if (result.contains(edge))
{
hasIncoming = true;
break;
}
}
boolean hasOutgoing = false;
for (E... | [
"private",
"boolean",
"isDangling",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"!",
"result",
".",
"contains",
"(",
"node",
")",
")",
"return",
"false",
";",
"if",
"(",
"ST",
".",
"contains",
"(",
"node",
")",
")",
"return",
"false",
";",
"boolean",
... | Checks if the node is dangling.
@param node Node to check
@return true if dangling | [
"Checks",
"if",
"the",
"node",
"is",
"dangling",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Prune.java#L108-L162 |
10,891 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java | LevelUpgrader.filter | public Model filter(Model model) {
if(model == null || model.getLevel() != BioPAXLevel.L2)
return model; // nothing to do
preparePep2PEIDMap(model);
final Model newModel = factory.createModel();
newModel.getNameSpacePrefixMap().putAll(model.getNameSpacePrefixMap());
newModel.setXmlBase(model.getXmlBase()... | java | public Model filter(Model model) {
if(model == null || model.getLevel() != BioPAXLevel.L2)
return model; // nothing to do
preparePep2PEIDMap(model);
final Model newModel = factory.createModel();
newModel.getNameSpacePrefixMap().putAll(model.getNameSpacePrefixMap());
newModel.setXmlBase(model.getXmlBase()... | [
"public",
"Model",
"filter",
"(",
"Model",
"model",
")",
"{",
"if",
"(",
"model",
"==",
"null",
"||",
"model",
".",
"getLevel",
"(",
")",
"!=",
"BioPAXLevel",
".",
"L2",
")",
"return",
"model",
";",
"// nothing to do",
"preparePep2PEIDMap",
"(",
"model",
... | Converts a BioPAX Model, Level 1 or 2, to the Level 3.
@param model BioPAX model to upgrade
@return new Level3 model | [
"Converts",
"a",
"BioPAX",
"Model",
"Level",
"1",
"or",
"2",
"to",
"the",
"Level",
"3",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java#L106-L149 |
10,892 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java | LevelUpgrader.mapClass | private Level3Element mapClass(BioPAXElement bpe) {
Level3Element newElement = null;
if(bpe instanceof physicalEntityParticipant)
{
String id = pep2PE.get(bpe.getUri());
if(id == null) {
log.warn("No mapping possible for " + bpe.getUri());
return null;
}
else if (id.equals(bpe.getUri()))
... | java | private Level3Element mapClass(BioPAXElement bpe) {
Level3Element newElement = null;
if(bpe instanceof physicalEntityParticipant)
{
String id = pep2PE.get(bpe.getUri());
if(id == null) {
log.warn("No mapping possible for " + bpe.getUri());
return null;
}
else if (id.equals(bpe.getUri()))
... | [
"private",
"Level3Element",
"mapClass",
"(",
"BioPAXElement",
"bpe",
")",
"{",
"Level3Element",
"newElement",
"=",
"null",
";",
"if",
"(",
"bpe",
"instanceof",
"physicalEntityParticipant",
")",
"{",
"String",
"id",
"=",
"pep2PE",
".",
"get",
"(",
"bpe",
".",
... | creates L3 classes and sets IDs | [
"creates",
"L3",
"classes",
"and",
"sets",
"IDs"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java#L207-L241 |
10,893 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java | LevelUpgrader.getLocalId | static public String getLocalId(BioPAXElement bpe) {
String id = bpe.getUri();
return (id != null) ? id.replaceFirst("^.+[#/]", "") : null; //greedy pattern matches everything up to the last '/' or '#'
} | java | static public String getLocalId(BioPAXElement bpe) {
String id = bpe.getUri();
return (id != null) ? id.replaceFirst("^.+[#/]", "") : null; //greedy pattern matches everything up to the last '/' or '#'
} | [
"static",
"public",
"String",
"getLocalId",
"(",
"BioPAXElement",
"bpe",
")",
"{",
"String",
"id",
"=",
"bpe",
".",
"getUri",
"(",
")",
";",
"return",
"(",
"id",
"!=",
"null",
")",
"?",
"id",
".",
"replaceFirst",
"(",
"\"^.+[#/]\"",
",",
"\"\"",
")",
... | Gets the local part of the BioPAX element ID.
@param bpe BioPAX object
@return id - local part of the URI | [
"Gets",
"the",
"local",
"part",
"of",
"the",
"BioPAX",
"element",
"ID",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java#L492-L495 |
10,894 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ActivityConstraint.java | ActivityConstraint.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]);
return pe.getControllerOf().isEmpty() == active;
} | java | @Override
public boolean satisfies(Match match, int... ind)
{
PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]);
return pe.getControllerOf().isEmpty() == active;
} | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"PhysicalEntity",
"pe",
"=",
"(",
"PhysicalEntity",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";",
"return",
"pe",
".",
"get... | Checks if the PhysicalEntity controls anything.
@param match current match to validate
@param ind mapped index
@return true if it controls anything | [
"Checks",
"if",
"the",
"PhysicalEntity",
"controls",
"anything",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ActivityConstraint.java#L34-L40 |
10,895 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/Merger.java | Merger.getIdentical | private BioPAXElement getIdentical(BioPAXElement bpe)
{
int key = bpe.hashCode();
List<BioPAXElement> list = equivalenceMap.get(key);
if (list != null)
{
for (BioPAXElement other : list)
{
if (other.equals(bpe))
{
return other;
}
}
}
return null;
} | java | private BioPAXElement getIdentical(BioPAXElement bpe)
{
int key = bpe.hashCode();
List<BioPAXElement> list = equivalenceMap.get(key);
if (list != null)
{
for (BioPAXElement other : list)
{
if (other.equals(bpe))
{
return other;
}
}
}
return null;
} | [
"private",
"BioPAXElement",
"getIdentical",
"(",
"BioPAXElement",
"bpe",
")",
"{",
"int",
"key",
"=",
"bpe",
".",
"hashCode",
"(",
")",
";",
"List",
"<",
"BioPAXElement",
">",
"list",
"=",
"equivalenceMap",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
... | Searches the target model for an identical of given BioPAX element, and returns this element if
it finds it.
@param bpe BioPAX element for which equivalent will be searched in target.
@return the BioPAX element that is found in target model, if there is none it returns null | [
"Searches",
"the",
"target",
"model",
"for",
"an",
"identical",
"of",
"given",
"BioPAX",
"element",
"and",
"returns",
"this",
"element",
"if",
"it",
"finds",
"it",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/Merger.java#L182-L197 |
10,896 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/Merger.java | Merger.addIntoEquivalanceMap | private void addIntoEquivalanceMap(BioPAXElement bpe)
{
int key = bpe.hashCode();
List<BioPAXElement> list = equivalenceMap.get(key);
if (list == null)
{
list = new ArrayList<BioPAXElement>();
equivalenceMap.put(key, list);
}
list.add(bpe);
} | java | private void addIntoEquivalanceMap(BioPAXElement bpe)
{
int key = bpe.hashCode();
List<BioPAXElement> list = equivalenceMap.get(key);
if (list == null)
{
list = new ArrayList<BioPAXElement>();
equivalenceMap.put(key, list);
}
list.add(bpe);
} | [
"private",
"void",
"addIntoEquivalanceMap",
"(",
"BioPAXElement",
"bpe",
")",
"{",
"int",
"key",
"=",
"bpe",
".",
"hashCode",
"(",
")",
";",
"List",
"<",
"BioPAXElement",
">",
"list",
"=",
"equivalenceMap",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
... | Adds a BioPAX element into the equivalence map.
@param bpe BioPAX element to be added into the map. | [
"Adds",
"a",
"BioPAX",
"element",
"into",
"the",
"equivalence",
"map",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/Merger.java#L302-L312 |
10,897 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.runNeighborhood | public static Set<BioPAXElement> runNeighborhood(
Set<BioPAXElement> sourceSet,
Model model,
int limit,
Direction direction,
Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
if (direction == Direction.UNDIRECTED)
{
graph = new GraphL3Undirected(model, filters);
... | java | public static Set<BioPAXElement> runNeighborhood(
Set<BioPAXElement> sourceSet,
Model model,
int limit,
Direction direction,
Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
if (direction == Direction.UNDIRECTED)
{
graph = new GraphL3Undirected(model, filters);
... | [
"public",
"static",
"Set",
"<",
"BioPAXElement",
">",
"runNeighborhood",
"(",
"Set",
"<",
"BioPAXElement",
">",
"sourceSet",
",",
"Model",
"model",
",",
"int",
"limit",
",",
"Direction",
"direction",
",",
"Filter",
"...",
"filters",
")",
"{",
"Graph",
"graph... | Gets neighborhood of the source set.
@param sourceSet seed to the query
@param model BioPAX model
@param limit neigborhood distance to get
@param direction UPSTREAM, DOWNSTREAM or BOTHSTREAM
@param filters for filtering graph elements
@return BioPAX elements in the result set | [
"Gets",
"neighborhood",
"of",
"the",
"source",
"set",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L35-L65 |
10,898 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.runPathsBetween | public static Set<BioPAXElement> runPathsBetween(Set<BioPAXElement> sourceSet, Model model,
int limit, Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
graph = new GraphL3(model, filters);
}
else return Collections.emptySet();
Collection<Set<Node>> sourceWrappers = prepare... | java | public static Set<BioPAXElement> runPathsBetween(Set<BioPAXElement> sourceSet, Model model,
int limit, Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
graph = new GraphL3(model, filters);
}
else return Collections.emptySet();
Collection<Set<Node>> sourceWrappers = prepare... | [
"public",
"static",
"Set",
"<",
"BioPAXElement",
">",
"runPathsBetween",
"(",
"Set",
"<",
"BioPAXElement",
">",
"sourceSet",
",",
"Model",
"model",
",",
"int",
"limit",
",",
"Filter",
"...",
"filters",
")",
"{",
"Graph",
"graph",
";",
"if",
"(",
"model",
... | Gets the graph constructed by the paths between the given seed nodes. Does not get paths
between physical entities that belong the same entity reference.
@param sourceSet Seed to the query
@param model BioPAX model
@param limit Length limit for the paths to be found
@param filters optional filters - for filtering graph... | [
"Gets",
"the",
"graph",
"constructed",
"by",
"the",
"paths",
"between",
"the",
"given",
"seed",
"nodes",
".",
"Does",
"not",
"get",
"paths",
"between",
"physical",
"entities",
"that",
"belong",
"the",
"same",
"entity",
"reference",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L118-L136 |
10,899 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.runGOI | public static Set<BioPAXElement> runGOI(
Set<BioPAXElement> sourceSet,
Model model,
int limit,
Filter... filters)
{
return runPathsFromTo(sourceSet, sourceSet, model, LimitType.NORMAL, limit, filters);
} | java | public static Set<BioPAXElement> runGOI(
Set<BioPAXElement> sourceSet,
Model model,
int limit,
Filter... filters)
{
return runPathsFromTo(sourceSet, sourceSet, model, LimitType.NORMAL, limit, filters);
} | [
"public",
"static",
"Set",
"<",
"BioPAXElement",
">",
"runGOI",
"(",
"Set",
"<",
"BioPAXElement",
">",
"sourceSet",
",",
"Model",
"model",
",",
"int",
"limit",
",",
"Filter",
"...",
"filters",
")",
"{",
"return",
"runPathsFromTo",
"(",
"sourceSet",
",",
"s... | Gets paths between the seed nodes.
@param sourceSet Seed to the query
@param model BioPAX model
@param limit Length limit for the paths to be found
@param filters for filtering graph elements
@return BioPAX elements in the result
@deprecated Use runPathsBetween instead | [
"Gets",
"paths",
"between",
"the",
"seed",
"nodes",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L176-L183 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.