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,900 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.runCommonStream | public static Set<BioPAXElement> runCommonStream(
Set<BioPAXElement> sourceSet,
Model model,
Direction direction,
int limit,
Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
graph = new GraphL3(model, filters);
}
else return Collections.emptySet();
Collection<Set<N... | java | public static Set<BioPAXElement> runCommonStream(
Set<BioPAXElement> sourceSet,
Model model,
Direction direction,
int limit,
Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
graph = new GraphL3(model, filters);
}
else return Collections.emptySet();
Collection<Set<N... | [
"public",
"static",
"Set",
"<",
"BioPAXElement",
">",
"runCommonStream",
"(",
"Set",
"<",
"BioPAXElement",
">",
"sourceSet",
",",
"Model",
"model",
",",
"Direction",
"direction",
",",
"int",
"limit",
",",
"Filter",
"...",
"filters",
")",
"{",
"Graph",
"graph... | Gets the elements in the common upstream or downstream of the seed
@param sourceSet Seed to the query
@param model BioPAX model
@param direction UPSTREAM or DOWNSTREAM
@param limit Length limit for the search
@param filters for filtering graph elements
@return BioPAX elements in the result | [
"Gets",
"the",
"elements",
"in",
"the",
"common",
"upstream",
"or",
"downstream",
"of",
"the",
"seed"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L262-L285 |
10,901 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.convertQueryResult | private static Set<BioPAXElement> convertQueryResult(
Set<GraphObject> resultWrappers, Graph graph, boolean removeDisconnected)
{
Set<Object> result = graph.getWrappedSet(resultWrappers);
Set<BioPAXElement> set = new HashSet<BioPAXElement>();
for (Object o : result)
{
set.add((BioPAXElement) o);
}
/... | java | private static Set<BioPAXElement> convertQueryResult(
Set<GraphObject> resultWrappers, Graph graph, boolean removeDisconnected)
{
Set<Object> result = graph.getWrappedSet(resultWrappers);
Set<BioPAXElement> set = new HashSet<BioPAXElement>();
for (Object o : result)
{
set.add((BioPAXElement) o);
}
/... | [
"private",
"static",
"Set",
"<",
"BioPAXElement",
">",
"convertQueryResult",
"(",
"Set",
"<",
"GraphObject",
">",
"resultWrappers",
",",
"Graph",
"graph",
",",
"boolean",
"removeDisconnected",
")",
"{",
"Set",
"<",
"Object",
">",
"result",
"=",
"graph",
".",
... | Converts the query result from wrappers to wrapped BioPAX elements.
@param resultWrappers Wrappers of the result set
@param graph Queried graph
@param removeDisconnected whether to remove disconnected non-complex type physical entities
@return Set of elements in the result | [
"Converts",
"the",
"query",
"result",
"from",
"wrappers",
"to",
"wrapped",
"BioPAX",
"elements",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L438-L466 |
10,902 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.prepareSingleNodeSet | public static Set<Node> prepareSingleNodeSet(Set<BioPAXElement> elements, Graph graph)
{
Map<BioPAXElement, Set<PhysicalEntity>> map = getRelatedPhysicalEntityMap(elements);
Set<PhysicalEntity> pes = new HashSet<PhysicalEntity>();
for (Set<PhysicalEntity> valueSet : map.values())
{
pes.addAll(valueSet);
... | java | public static Set<Node> prepareSingleNodeSet(Set<BioPAXElement> elements, Graph graph)
{
Map<BioPAXElement, Set<PhysicalEntity>> map = getRelatedPhysicalEntityMap(elements);
Set<PhysicalEntity> pes = new HashSet<PhysicalEntity>();
for (Set<PhysicalEntity> valueSet : map.values())
{
pes.addAll(valueSet);
... | [
"public",
"static",
"Set",
"<",
"Node",
">",
"prepareSingleNodeSet",
"(",
"Set",
"<",
"BioPAXElement",
">",
"elements",
",",
"Graph",
"graph",
")",
"{",
"Map",
"<",
"BioPAXElement",
",",
"Set",
"<",
"PhysicalEntity",
">",
">",
"map",
"=",
"getRelatedPhysical... | Gets the related wrappers of the given elements in a set.
@param elements Elements to get the related wrappers
@param graph Owner graph
@return Related wrappers in a set | [
"Gets",
"the",
"related",
"wrappers",
"of",
"the",
"given",
"elements",
"in",
"a",
"set",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L499-L517 |
10,903 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.prepareSingleNodeSetFromSets | public static Set<Node> prepareSingleNodeSetFromSets(Set<Set<BioPAXElement>> sets, Graph graph)
{
Set<BioPAXElement> elements = new HashSet<BioPAXElement>();
for (Set<BioPAXElement> set : sets)
{
elements.addAll(set);
}
return prepareSingleNodeSet(elements, graph);
} | java | public static Set<Node> prepareSingleNodeSetFromSets(Set<Set<BioPAXElement>> sets, Graph graph)
{
Set<BioPAXElement> elements = new HashSet<BioPAXElement>();
for (Set<BioPAXElement> set : sets)
{
elements.addAll(set);
}
return prepareSingleNodeSet(elements, graph);
} | [
"public",
"static",
"Set",
"<",
"Node",
">",
"prepareSingleNodeSetFromSets",
"(",
"Set",
"<",
"Set",
"<",
"BioPAXElement",
">",
">",
"sets",
",",
"Graph",
"graph",
")",
"{",
"Set",
"<",
"BioPAXElement",
">",
"elements",
"=",
"new",
"HashSet",
"<",
"BioPAXE... | Gets the related wrappers of the given elements in the sets.
@param sets Sets of elements to get the related wrappers
@param graph Owner graph
@return Related wrappers in a set | [
"Gets",
"the",
"related",
"wrappers",
"of",
"the",
"given",
"elements",
"in",
"the",
"sets",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L525-L533 |
10,904 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.getRelatedPhysicalEntityMap | public static Map<BioPAXElement, Set<PhysicalEntity>> getRelatedPhysicalEntityMap(
Collection<BioPAXElement> elements)
{
replaceXrefsWithRelatedER(elements);
Map<BioPAXElement, Set<PhysicalEntity>> map = new HashMap<BioPAXElement, Set<PhysicalEntity>>();
for (BioPAXElement ele : elements)
{
Set<PhysicalE... | java | public static Map<BioPAXElement, Set<PhysicalEntity>> getRelatedPhysicalEntityMap(
Collection<BioPAXElement> elements)
{
replaceXrefsWithRelatedER(elements);
Map<BioPAXElement, Set<PhysicalEntity>> map = new HashMap<BioPAXElement, Set<PhysicalEntity>>();
for (BioPAXElement ele : elements)
{
Set<PhysicalE... | [
"public",
"static",
"Map",
"<",
"BioPAXElement",
",",
"Set",
"<",
"PhysicalEntity",
">",
">",
"getRelatedPhysicalEntityMap",
"(",
"Collection",
"<",
"BioPAXElement",
">",
"elements",
")",
"{",
"replaceXrefsWithRelatedER",
"(",
"elements",
")",
";",
"Map",
"<",
"... | Maps each BioPAXElement to its related PhysicalEntity objects.
@param elements Elements to map
@return The mapping | [
"Maps",
"each",
"BioPAXElement",
"to",
"its",
"related",
"PhysicalEntity",
"objects",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L594-L610 |
10,905 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.replaceXrefsWithRelatedER | protected static void replaceXrefsWithRelatedER(
Collection<BioPAXElement> elements)
{
Set<EntityReference> ers = new HashSet<EntityReference>();
Set<Xref> xrefs = new HashSet<Xref>();
for (BioPAXElement element : elements)
{
if (element instanceof Xref)
{
xrefs.add((Xref) element);
for (XRefer... | java | protected static void replaceXrefsWithRelatedER(
Collection<BioPAXElement> elements)
{
Set<EntityReference> ers = new HashSet<EntityReference>();
Set<Xref> xrefs = new HashSet<Xref>();
for (BioPAXElement element : elements)
{
if (element instanceof Xref)
{
xrefs.add((Xref) element);
for (XRefer... | [
"protected",
"static",
"void",
"replaceXrefsWithRelatedER",
"(",
"Collection",
"<",
"BioPAXElement",
">",
"elements",
")",
"{",
"Set",
"<",
"EntityReference",
">",
"ers",
"=",
"new",
"HashSet",
"<",
"EntityReference",
">",
"(",
")",
";",
"Set",
"<",
"Xref",
... | Replaces Xref objects with the related EntityReference objects. This is required for the use
case when user provides multiple xrefs that point to the same ER.
@param elements elements to send to a query as source or target | [
"Replaces",
"Xref",
"objects",
"with",
"the",
"related",
"EntityReference",
"objects",
".",
"This",
"is",
"required",
"for",
"the",
"use",
"case",
"when",
"user",
"provides",
"multiple",
"xrefs",
"that",
"point",
"to",
"the",
"same",
"ER",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L617-L642 |
10,906 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.getRelatedPhysicalEntities | public static Set<PhysicalEntity> getRelatedPhysicalEntities(BioPAXElement element,
Set<PhysicalEntity> pes)
{
if (pes == null) pes = new HashSet<PhysicalEntity>();
if (element instanceof PhysicalEntity)
{
PhysicalEntity pe = (PhysicalEntity) element;
if (!pes.contains(pe))
{
pes.add(pe);
f... | java | public static Set<PhysicalEntity> getRelatedPhysicalEntities(BioPAXElement element,
Set<PhysicalEntity> pes)
{
if (pes == null) pes = new HashSet<PhysicalEntity>();
if (element instanceof PhysicalEntity)
{
PhysicalEntity pe = (PhysicalEntity) element;
if (!pes.contains(pe))
{
pes.add(pe);
f... | [
"public",
"static",
"Set",
"<",
"PhysicalEntity",
">",
"getRelatedPhysicalEntities",
"(",
"BioPAXElement",
"element",
",",
"Set",
"<",
"PhysicalEntity",
">",
"pes",
")",
"{",
"if",
"(",
"pes",
"==",
"null",
")",
"pes",
"=",
"new",
"HashSet",
"<",
"PhysicalEn... | Gets the related PhysicalEntity objects of the given BioPAXElement, in level 3 models.
@param element Element to get related PhysicalEntity objects
@param pes Result set. If not supplied, a new set will be initialized.
@return Related PhysicalEntity objects | [
"Gets",
"the",
"related",
"PhysicalEntity",
"objects",
"of",
"the",
"given",
"BioPAXElement",
"in",
"level",
"3",
"models",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L651-L698 |
10,907 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.addEquivalentsComplexes | private static void addEquivalentsComplexes(PhysicalEntity pe, Set<PhysicalEntity> pes)
{
addEquivalentsComplexes(pe, true, pes);
// Do not traverse to more specific. This was causing a bug so I commented out. Did not delete it just in case
// later we realize that this is needed for another use case.
// addEq... | java | private static void addEquivalentsComplexes(PhysicalEntity pe, Set<PhysicalEntity> pes)
{
addEquivalentsComplexes(pe, true, pes);
// Do not traverse to more specific. This was causing a bug so I commented out. Did not delete it just in case
// later we realize that this is needed for another use case.
// addEq... | [
"private",
"static",
"void",
"addEquivalentsComplexes",
"(",
"PhysicalEntity",
"pe",
",",
"Set",
"<",
"PhysicalEntity",
">",
"pes",
")",
"{",
"addEquivalentsComplexes",
"(",
"pe",
",",
"true",
",",
"pes",
")",
";",
"// Do not traverse to more specific. This was causin... | Adds equivalents and parent complexes of the given PhysicalEntity to the parameter set.
@param pe The PhysicalEntity to add its equivalents and complexes
@param pes Set to collect equivalents and complexes | [
"Adds",
"equivalents",
"and",
"parent",
"complexes",
"of",
"the",
"given",
"PhysicalEntity",
"to",
"the",
"parameter",
"set",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L705-L712 |
10,908 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.getSeedInteractions | public static Set<Node> getSeedInteractions(Collection<BioPAXElement> elements, Graph graph)
{
Set<Node> nodes = new HashSet<Node>();
for (BioPAXElement ele : elements)
{
if (ele instanceof Conversion || ele instanceof TemplateReaction ||
ele instanceof Control)
{
GraphObject go = graph.getGraphOb... | java | public static Set<Node> getSeedInteractions(Collection<BioPAXElement> elements, Graph graph)
{
Set<Node> nodes = new HashSet<Node>();
for (BioPAXElement ele : elements)
{
if (ele instanceof Conversion || ele instanceof TemplateReaction ||
ele instanceof Control)
{
GraphObject go = graph.getGraphOb... | [
"public",
"static",
"Set",
"<",
"Node",
">",
"getSeedInteractions",
"(",
"Collection",
"<",
"BioPAXElement",
">",
"elements",
",",
"Graph",
"graph",
")",
"{",
"Set",
"<",
"Node",
">",
"nodes",
"=",
"new",
"HashSet",
"<",
"Node",
">",
"(",
")",
";",
"fo... | Extracts the querible interactions from the elements.
@param elements BioPAX elements to search
@param graph graph model
@return Querible Interactions (nodes) | [
"Extracts",
"the",
"querible",
"interactions",
"from",
"the",
"elements",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L746-L764 |
10,909 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/OutputColumn.java | OutputColumn.getColumnValue | public String getColumnValue(SIFInteraction inter)
{
switch (type)
{
case MEDIATOR: return concat(inter.getMediatorIDs());
case PATHWAY: return concat(inter.getPathwayNames());
case PATHWAY_URI: return concat(inter.getPathwayUris());
case PUBMED: return concat(inter.getPublicationIDs(true));
case PM... | java | public String getColumnValue(SIFInteraction inter)
{
switch (type)
{
case MEDIATOR: return concat(inter.getMediatorIDs());
case PATHWAY: return concat(inter.getPathwayNames());
case PATHWAY_URI: return concat(inter.getPathwayUris());
case PUBMED: return concat(inter.getPublicationIDs(true));
case PM... | [
"public",
"String",
"getColumnValue",
"(",
"SIFInteraction",
"inter",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"MEDIATOR",
":",
"return",
"concat",
"(",
"inter",
".",
"getMediatorIDs",
"(",
")",
")",
";",
"case",
"PATHWAY",
":",
"return",
"concat... | Get the string to write in the output file.
@param inter the binary interaction
@return column value | [
"Get",
"the",
"string",
"to",
"write",
"in",
"the",
"output",
"file",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/OutputColumn.java#L69-L99 |
10,910 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java | L3ToSBGNPDConverter.writeSBGN | public void writeSBGN(Model model, String file) {
// Create the model
Sbgn sbgn = createSBGN(model);
// Write in file
try {
SbgnUtil.writeToFile(sbgn, new File(file));
}
catch (JAXBException e) {
throw new RuntimeException("writeSBGN, SbgnUtil.writeToFile failed", e);
}
} | java | public void writeSBGN(Model model, String file) {
// Create the model
Sbgn sbgn = createSBGN(model);
// Write in file
try {
SbgnUtil.writeToFile(sbgn, new File(file));
}
catch (JAXBException e) {
throw new RuntimeException("writeSBGN, SbgnUtil.writeToFile failed", e);
}
} | [
"public",
"void",
"writeSBGN",
"(",
"Model",
"model",
",",
"String",
"file",
")",
"{",
"// Create the model",
"Sbgn",
"sbgn",
"=",
"createSBGN",
"(",
"model",
")",
";",
"// Write in file",
"try",
"{",
"SbgnUtil",
".",
"writeToFile",
"(",
"sbgn",
",",
"new",
... | Converts the given model to SBGN, and writes in the specified file.
@param model model to convert
@param file file to write | [
"Converts",
"the",
"given",
"model",
"to",
"SBGN",
"and",
"writes",
"in",
"the",
"specified",
"file",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L224-L235 |
10,911 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java | L3ToSBGNPDConverter.writeSBGN | public void writeSBGN(Model model, OutputStream stream) {
Sbgn sbgn = createSBGN(model);
try {
JAXBContext context = JAXBContext.newInstance("org.sbgn.bindings");
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marsha... | java | public void writeSBGN(Model model, OutputStream stream) {
Sbgn sbgn = createSBGN(model);
try {
JAXBContext context = JAXBContext.newInstance("org.sbgn.bindings");
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marsha... | [
"public",
"void",
"writeSBGN",
"(",
"Model",
"model",
",",
"OutputStream",
"stream",
")",
"{",
"Sbgn",
"sbgn",
"=",
"createSBGN",
"(",
"model",
")",
";",
"try",
"{",
"JAXBContext",
"context",
"=",
"JAXBContext",
".",
"newInstance",
"(",
"\"org.sbgn.bindings\""... | Converts the given model to SBGN, and writes in the specified output stream.
@param model model to convert
@param stream output stream to write | [
"Converts",
"the",
"given",
"model",
"to",
"SBGN",
"and",
"writes",
"in",
"the",
"specified",
"output",
"stream",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L243-L253 |
10,912 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java | L3ToSBGNPDConverter.processControllers | private void processControllers(Set<Control> controls, Glyph process) {
for (Control ctrl : controls) {
Glyph g = createControlStructure(ctrl); //if ctrl has upstream controls (modulations), they're processed as well
if (g != null) {
createArc(g, process, getControlType(ctrl), null);
processControllers(... | java | private void processControllers(Set<Control> controls, Glyph process) {
for (Control ctrl : controls) {
Glyph g = createControlStructure(ctrl); //if ctrl has upstream controls (modulations), they're processed as well
if (g != null) {
createArc(g, process, getControlType(ctrl), null);
processControllers(... | [
"private",
"void",
"processControllers",
"(",
"Set",
"<",
"Control",
">",
"controls",
",",
"Glyph",
"process",
")",
"{",
"for",
"(",
"Control",
"ctrl",
":",
"controls",
")",
"{",
"Glyph",
"g",
"=",
"createControlStructure",
"(",
"ctrl",
")",
";",
"//if ctr... | Associate all the controllers of this process; | [
"Associate",
"all",
"the",
"controllers",
"of",
"this",
"process",
";"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L366-L374 |
10,913 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java | L3ToSBGNPDConverter.extractGeneSymbol | private String extractGeneSymbol(Xref xref)
{
if (xref.getDb() != null && (
xref.getDb().equalsIgnoreCase("HGNC Symbol") ||
xref.getDb().equalsIgnoreCase("Gene Symbol") ||
xref.getDb().equalsIgnoreCase("HGNC")))
{
String ref = xref.getId();
if (ref != null) {
ref = ref.trim();
if (ref.conta... | java | private String extractGeneSymbol(Xref xref)
{
if (xref.getDb() != null && (
xref.getDb().equalsIgnoreCase("HGNC Symbol") ||
xref.getDb().equalsIgnoreCase("Gene Symbol") ||
xref.getDb().equalsIgnoreCase("HGNC")))
{
String ref = xref.getId();
if (ref != null) {
ref = ref.trim();
if (ref.conta... | [
"private",
"String",
"extractGeneSymbol",
"(",
"Xref",
"xref",
")",
"{",
"if",
"(",
"xref",
".",
"getDb",
"(",
")",
"!=",
"null",
"&&",
"(",
"xref",
".",
"getDb",
"(",
")",
".",
"equalsIgnoreCase",
"(",
"\"HGNC Symbol\"",
")",
"||",
"xref",
".",
"getDb... | Searches for gene symbol in Xref.
@param xref Xref to search
@return gene symbol | [
"Searches",
"for",
"gene",
"symbol",
"in",
"Xref",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L775-L798 |
10,914 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/ObjectPropertyEditor.java | ObjectPropertyEditor.setRangeRestriction | public void setRangeRestriction(
Map<Class<? extends BioPAXElement>, Set<Class<? extends BioPAXElement>>> restrictedRanges)
{
this.restrictedRanges = restrictedRanges;
} | java | public void setRangeRestriction(
Map<Class<? extends BioPAXElement>, Set<Class<? extends BioPAXElement>>> restrictedRanges)
{
this.restrictedRanges = restrictedRanges;
} | [
"public",
"void",
"setRangeRestriction",
"(",
"Map",
"<",
"Class",
"<",
"?",
"extends",
"BioPAXElement",
">",
",",
"Set",
"<",
"Class",
"<",
"?",
"extends",
"BioPAXElement",
">",
">",
">",
"restrictedRanges",
")",
"{",
"this",
".",
"restrictedRanges",
"=",
... | This method sets all range restrictions.
Note: All restrictions specified in the BioPAX specification is automatically created by the {@link EditorMap}
during initialization. Use this method if you need to add restrictions that are not specified in
the model.
@param restrictedRanges a set of range restrictions specif... | [
"This",
"method",
"sets",
"all",
"range",
"restrictions",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/ObjectPropertyEditor.java#L155-L159 |
10,915 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConstraintChain.java | ConstraintChain.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement> (
con[0].generate(match, ind));
Set<BioPAXElement> input = new HashSet<BioPAXElement>();
Set<BioPAXElement> output = new HashSet<BioPAXElement>(gen);
int[] tempInd = {... | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = new HashSet<BioPAXElement> (
con[0].generate(match, ind));
Set<BioPAXElement> input = new HashSet<BioPAXElement>();
Set<BioPAXElement> output = new HashSet<BioPAXElement>(gen);
int[] tempInd = {... | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Collection",
"<",
"BioPAXElement",
">",
"gen",
"=",
"new",
"HashSet",
"<",
"BioPAXElement",
">",
"(",
"con",
"[",
... | Chains the member constraints and returns the output of the last constraint.
@param match match to process
@param ind mapped indices
@return satisfying elements | [
"Chains",
"the",
"member",
"constraints",
"and",
"returns",
"the",
"output",
"of",
"the",
"last",
"constraint",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConstraintChain.java#L55-L82 |
10,916 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ControlToControllerER.java | ControlToControllerER.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Control ctrl = (Control) match.get(ind[0]);
return new HashSet<BioPAXElement>(getRelatedERs(ctrl));
} | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Control ctrl = (Control) match.get(ind[0]);
return new HashSet<BioPAXElement>(getRelatedERs(ctrl));
} | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Control",
"ctrl",
"=",
"(",
"Control",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";",
"return"... | Navigates to the related ERs of the controllers of the given Control.
@param match current pattern match
@param ind mapped indices
@return related ERs | [
"Navigates",
"to",
"the",
"related",
"ERs",
"of",
"the",
"controllers",
"of",
"the",
"given",
"Control",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ControlToControllerER.java#L57-L62 |
10,917 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/RelatedControl.java | RelatedControl.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]);
Conversion conv = (Conversion) match.get(ind[1]);
if (!((peType == RelType.INPUT && getConvParticipants(conv, RelType.INPUT).contains(pe)) ||
(peType == RelType.OUTPUT && ge... | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]);
Conversion conv = (Conversion) match.get(ind[1]);
if (!((peType == RelType.INPUT && getConvParticipants(conv, RelType.INPUT).contains(pe)) ||
(peType == RelType.OUTPUT && ge... | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"PhysicalEntity",
"pe",
"=",
"(",
"PhysicalEntity",
")",
"match",
".",
"get",
"(",
"ind",
"[",
"0",
"]",
")",
";"... | According to the relation between PhysicalEntity and the Conversion, checks of the Control is
relevant. If relevant it is retrieved.
@param match current pattern match
@param ind mapped indices
@return related controls | [
"According",
"to",
"the",
"relation",
"between",
"PhysicalEntity",
"and",
"the",
"Conversion",
"checks",
"of",
"the",
"Control",
"is",
"relevant",
".",
"If",
"relevant",
"it",
"is",
"retrieved",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/RelatedControl.java#L74-L110 |
10,918 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/ControlWrapper.java | ControlWrapper.init | @Override
public void init()
{
ControlType type = ctrl.getControlType();
if (type != null && type.toString().startsWith("I"))
{
sign = NEGATIVE;
}
else
{
sign = POSITIVE;
}
if (ctrl instanceof TemplateReactionRegulation)
transcription = true;
} | java | @Override
public void init()
{
ControlType type = ctrl.getControlType();
if (type != null && type.toString().startsWith("I"))
{
sign = NEGATIVE;
}
else
{
sign = POSITIVE;
}
if (ctrl instanceof TemplateReactionRegulation)
transcription = true;
} | [
"@",
"Override",
"public",
"void",
"init",
"(",
")",
"{",
"ControlType",
"type",
"=",
"ctrl",
".",
"getControlType",
"(",
")",
";",
"if",
"(",
"type",
"!=",
"null",
"&&",
"type",
".",
"toString",
"(",
")",
".",
"startsWith",
"(",
"\"I\"",
")",
")",
... | Extracts the sign and the type of the Control. | [
"Extracts",
"the",
"sign",
"and",
"the",
"type",
"of",
"the",
"Control",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/ControlWrapper.java#L86-L102 |
10,919 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/ControlWrapper.java | ControlWrapper.bindUpstream | private void bindUpstream(BioPAXElement element)
{
AbstractNode node = (AbstractNode) graph.getGraphObject(element);
if (node != null)
{
Edge edge = new EdgeL3(node, this, graph);
node.getDownstreamNoInit().add(edge);
this.getUpstreamNoInit().add(edge);
}
} | java | private void bindUpstream(BioPAXElement element)
{
AbstractNode node = (AbstractNode) graph.getGraphObject(element);
if (node != null)
{
Edge edge = new EdgeL3(node, this, graph);
node.getDownstreamNoInit().add(edge);
this.getUpstreamNoInit().add(edge);
}
} | [
"private",
"void",
"bindUpstream",
"(",
"BioPAXElement",
"element",
")",
"{",
"AbstractNode",
"node",
"=",
"(",
"AbstractNode",
")",
"graph",
".",
"getGraphObject",
"(",
"element",
")",
";",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"Edge",
"edge",
"=",
... | Puts the wrapper of the parameter element to the upstream of this Control.
@param element to put at upstream | [
"Puts",
"the",
"wrapper",
"of",
"the",
"parameter",
"element",
"to",
"the",
"upstream",
"of",
"this",
"Control",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/ControlWrapper.java#L108-L118 |
10,920 | BioPAX/Paxtools | paxtools-core/src/main/java/org/biopax/paxtools/controller/PathAccessor.java | PathAccessor.getValueFromModel | public Set getValueFromModel(Model model)
{
Set<? extends BioPAXElement> domains = new HashSet<BioPAXElement>(model.getObjects(this.getDomain()));
return getValueFromBeans(domains);
} | java | public Set getValueFromModel(Model model)
{
Set<? extends BioPAXElement> domains = new HashSet<BioPAXElement>(model.getObjects(this.getDomain()));
return getValueFromBeans(domains);
} | [
"public",
"Set",
"getValueFromModel",
"(",
"Model",
"model",
")",
"{",
"Set",
"<",
"?",
"extends",
"BioPAXElement",
">",
"domains",
"=",
"new",
"HashSet",
"<",
"BioPAXElement",
">",
"(",
"model",
".",
"getObjects",
"(",
"this",
".",
"getDomain",
"(",
")",
... | This method runs the path query on all the elements within the model.
@param model to be queried
@return a merged set of all values that is reachable by the paths starting from all applicable objects in
the model. For example running ProteinReference/xref:UnificationXref on the model will get all the
unification xrefs ... | [
"This",
"method",
"runs",
"the",
"path",
"query",
"on",
"all",
"the",
"elements",
"within",
"the",
"model",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/controller/PathAccessor.java#L252-L256 |
10,921 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.load | private void load(String filename)
{
try
{
load(new FileInputStream(filename));
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
} | java | private void load(String filename)
{
try
{
load(new FileInputStream(filename));
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
} | [
"private",
"void",
"load",
"(",
"String",
"filename",
")",
"{",
"try",
"{",
"load",
"(",
"new",
"FileInputStream",
"(",
"filename",
")",
")",
";",
"}",
"catch",
"(",
"FileNotFoundException",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}... | Reads data from the given file. | [
"Reads",
"data",
"from",
"the",
"given",
"file",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L68-L78 |
10,922 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.load | private void load(InputStream is)
{
try
{
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
for (String line = reader.readLine(); line != null; line = reader.readLine())
{
String[] tok = line.split(DELIM);
if (tok.length >= 3)
{
addEntry(tok[0], Integer.parseInt(tok[... | java | private void load(InputStream is)
{
try
{
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
for (String line = reader.readLine(); line != null; line = reader.readLine())
{
String[] tok = line.split(DELIM);
if (tok.length >= 3)
{
addEntry(tok[0], Integer.parseInt(tok[... | [
"private",
"void",
"load",
"(",
"InputStream",
"is",
")",
"{",
"try",
"{",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"is",
")",
")",
";",
"for",
"(",
"String",
"line",
"=",
"reader",
".",
"readLine",
... | Reads data from the input stream and loads itself. | [
"Reads",
"data",
"from",
"the",
"input",
"stream",
"and",
"loads",
"itself",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L83-L106 |
10,923 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.addEntry | public void addEntry(String id, int score, RelType context)
{
this.score.put(id, score);
this.context.put(id, context);
} | java | public void addEntry(String id, int score, RelType context)
{
this.score.put(id, score);
this.context.put(id, context);
} | [
"public",
"void",
"addEntry",
"(",
"String",
"id",
",",
"int",
"score",
",",
"RelType",
"context",
")",
"{",
"this",
".",
"score",
".",
"put",
"(",
"id",
",",
"score",
")",
";",
"this",
".",
"context",
".",
"put",
"(",
"id",
",",
"context",
")",
... | Adds a new blacklisted ID.
@param id ID of the blacklisted molecule
@param score the ubiquity score
@param context context of ubiquity | [
"Adds",
"a",
"new",
"blacklisted",
"ID",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L114-L118 |
10,924 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.write | public void write(String filename)
{
try
{
write(new FileOutputStream(filename));
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
} | java | public void write(String filename)
{
try
{
write(new FileOutputStream(filename));
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
} | [
"public",
"void",
"write",
"(",
"String",
"filename",
")",
"{",
"try",
"{",
"write",
"(",
"new",
"FileOutputStream",
"(",
"filename",
")",
")",
";",
"}",
"catch",
"(",
"FileNotFoundException",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
... | Dumps data to the given file.
@param filename output file name | [
"Dumps",
"data",
"to",
"the",
"given",
"file",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L135-L145 |
10,925 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.write | public void write(OutputStream os)
{
List<String> ids = new ArrayList<String>(score.keySet());
final Map<String, Integer> score = this.score;
Collections.sort(ids, new Comparator<String>()
{
@Override
public int compare(String o1, String o2)
{
return score.get(o2).compareTo(score.get(o1));
}
... | java | public void write(OutputStream os)
{
List<String> ids = new ArrayList<String>(score.keySet());
final Map<String, Integer> score = this.score;
Collections.sort(ids, new Comparator<String>()
{
@Override
public int compare(String o1, String o2)
{
return score.get(o2).compareTo(score.get(o1));
}
... | [
"public",
"void",
"write",
"(",
"OutputStream",
"os",
")",
"{",
"List",
"<",
"String",
">",
"ids",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"score",
".",
"keySet",
"(",
")",
")",
";",
"final",
"Map",
"<",
"String",
",",
"Integer",
">",
"sc... | Dumps data to the given output stream.
@param os output stream | [
"Dumps",
"data",
"to",
"the",
"given",
"output",
"stream",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L152-L185 |
10,926 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.convertContext | private RelType convertContext(String type)
{
if (type.equals("I")) return RelType.INPUT;
if (type.equals("O")) return RelType.OUTPUT;
if (type.equals("B")) return null;
throw new IllegalArgumentException("Unknown context: " + type);
} | java | private RelType convertContext(String type)
{
if (type.equals("I")) return RelType.INPUT;
if (type.equals("O")) return RelType.OUTPUT;
if (type.equals("B")) return null;
throw new IllegalArgumentException("Unknown context: " + type);
} | [
"private",
"RelType",
"convertContext",
"(",
"String",
"type",
")",
"{",
"if",
"(",
"type",
".",
"equals",
"(",
"\"I\"",
")",
")",
"return",
"RelType",
".",
"INPUT",
";",
"if",
"(",
"type",
".",
"equals",
"(",
"\"O\"",
")",
")",
"return",
"RelType",
... | Converts text context to enum.
@param type context
@return enum value | [
"Converts",
"text",
"context",
"to",
"enum",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L209-L215 |
10,927 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.getLeastUbique | private Set<String> getLeastUbique(Collection<String> ids)
{
Set<String> select = new HashSet<String>();
int s = getLeastScore(ids);
for (String id : ids)
{
if (score.get(id) == s) select.add(id);
}
return select;
} | java | private Set<String> getLeastUbique(Collection<String> ids)
{
Set<String> select = new HashSet<String>();
int s = getLeastScore(ids);
for (String id : ids)
{
if (score.get(id) == s) select.add(id);
}
return select;
} | [
"private",
"Set",
"<",
"String",
">",
"getLeastUbique",
"(",
"Collection",
"<",
"String",
">",
"ids",
")",
"{",
"Set",
"<",
"String",
">",
"select",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"int",
"s",
"=",
"getLeastScore",
"(",
"ids... | Gets the subset with the least score. | [
"Gets",
"the",
"subset",
"with",
"the",
"least",
"score",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L222-L234 |
10,928 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.getLeastScore | private int getLeastScore(Collection<String> ids)
{
int s = Integer.MAX_VALUE;
for (String id : ids)
{
if (score.get(id) < s) s = score.get(id);
}
return s;
} | java | private int getLeastScore(Collection<String> ids)
{
int s = Integer.MAX_VALUE;
for (String id : ids)
{
if (score.get(id) < s) s = score.get(id);
}
return s;
} | [
"private",
"int",
"getLeastScore",
"(",
"Collection",
"<",
"String",
">",
"ids",
")",
"{",
"int",
"s",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"for",
"(",
"String",
"id",
":",
"ids",
")",
"{",
"if",
"(",
"score",
".",
"get",
"(",
"id",
")",
"<",
"... | Gets the least score of the given ids. | [
"Gets",
"the",
"least",
"score",
"of",
"the",
"given",
"ids",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L239-L249 |
10,929 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.isUbiqueInBothContexts | private boolean isUbiqueInBothContexts(String id)
{
return context.containsKey(id) && context.get(id) == null;
} | java | private boolean isUbiqueInBothContexts(String id)
{
return context.containsKey(id) && context.get(id) == null;
} | [
"private",
"boolean",
"isUbiqueInBothContexts",
"(",
"String",
"id",
")",
"{",
"return",
"context",
".",
"containsKey",
"(",
"id",
")",
"&&",
"context",
".",
"get",
"(",
"id",
")",
"==",
"null",
";",
"}"
] | Checks if the given ID is blacklisted in both contexts together. | [
"Checks",
"if",
"the",
"given",
"ID",
"is",
"blacklisted",
"in",
"both",
"contexts",
"together",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L274-L277 |
10,930 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.isUbique | private boolean isUbique(String id, RelType context)
{
if (context == null) return this.context.containsKey(id);
if (!isUbique(id)) return false;
RelType ctx = this.context.get(id);
return ctx == null || ctx.equals(context);
} | java | private boolean isUbique(String id, RelType context)
{
if (context == null) return this.context.containsKey(id);
if (!isUbique(id)) return false;
RelType ctx = this.context.get(id);
return ctx == null || ctx.equals(context);
} | [
"private",
"boolean",
"isUbique",
"(",
"String",
"id",
",",
"RelType",
"context",
")",
"{",
"if",
"(",
"context",
"==",
"null",
")",
"return",
"this",
".",
"context",
".",
"containsKey",
"(",
"id",
")",
";",
"if",
"(",
"!",
"isUbique",
"(",
"id",
")"... | Checks if the given ID is blacklisted in the given context. | [
"Checks",
"if",
"the",
"given",
"ID",
"is",
"blacklisted",
"in",
"the",
"given",
"context",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L282-L290 |
10,931 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.isUbique | public boolean isUbique(PhysicalEntity pe)
{
String id = getSMRID(pe);
return id != null && isUbique(id);
} | java | public boolean isUbique(PhysicalEntity pe)
{
String id = getSMRID(pe);
return id != null && isUbique(id);
} | [
"public",
"boolean",
"isUbique",
"(",
"PhysicalEntity",
"pe",
")",
"{",
"String",
"id",
"=",
"getSMRID",
"(",
"pe",
")",
";",
"return",
"id",
"!=",
"null",
"&&",
"isUbique",
"(",
"id",
")",
";",
"}"
] | Checks if the given entity is blacklisted in at least one context.
@param pe physical entity BioPAX object
@return true/false | [
"Checks",
"if",
"the",
"given",
"entity",
"is",
"blacklisted",
"in",
"at",
"least",
"one",
"context",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L298-L302 |
10,932 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.isUbiqueInBothContexts | public boolean isUbiqueInBothContexts(PhysicalEntity pe)
{
String id = getSMRID(pe);
return id != null && isUbiqueInBothContexts(id);
} | java | public boolean isUbiqueInBothContexts(PhysicalEntity pe)
{
String id = getSMRID(pe);
return id != null && isUbiqueInBothContexts(id);
} | [
"public",
"boolean",
"isUbiqueInBothContexts",
"(",
"PhysicalEntity",
"pe",
")",
"{",
"String",
"id",
"=",
"getSMRID",
"(",
"pe",
")",
";",
"return",
"id",
"!=",
"null",
"&&",
"isUbiqueInBothContexts",
"(",
"id",
")",
";",
"}"
] | Checks if the given entity is blacklisted in both context together.
@param pe physical entity BioPAX object
@return true/false | [
"Checks",
"if",
"the",
"given",
"entity",
"is",
"blacklisted",
"in",
"both",
"context",
"together",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L310-L314 |
10,933 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.isUbique | public boolean isUbique(PhysicalEntity pe, Conversion conv, ConversionDirectionType dir,
RelType context)
{
String id = getSMRID(pe);
if (id == null) return false;
if (dir == null)
throw new IllegalArgumentException("The conversion direction has to be specified.");
if (context == null)
throw new Ille... | java | public boolean isUbique(PhysicalEntity pe, Conversion conv, ConversionDirectionType dir,
RelType context)
{
String id = getSMRID(pe);
if (id == null) return false;
if (dir == null)
throw new IllegalArgumentException("The conversion direction has to be specified.");
if (context == null)
throw new Ille... | [
"public",
"boolean",
"isUbique",
"(",
"PhysicalEntity",
"pe",
",",
"Conversion",
"conv",
",",
"ConversionDirectionType",
"dir",
",",
"RelType",
"context",
")",
"{",
"String",
"id",
"=",
"getSMRID",
"(",
"pe",
")",
";",
"if",
"(",
"id",
"==",
"null",
")",
... | Checks if the given entity is blacklisted for the given Conversion assuming the Conversion
flows towards the given direction, and the entity is in given context.
@param pe physical entity BioPAX object
@param conv conversion interaction (BioPAX)
@param dir conversion direction
@param context relationship type - contex... | [
"Checks",
"if",
"the",
"given",
"entity",
"is",
"blacklisted",
"for",
"the",
"given",
"Conversion",
"assuming",
"the",
"Conversion",
"flows",
"towards",
"the",
"given",
"direction",
"and",
"the",
"entity",
"is",
"in",
"given",
"context",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L326-L358 |
10,934 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java | Blacklist.getSMRID | private String getSMRID(PhysicalEntity pe)
{
if (pe instanceof SmallMolecule)
{
EntityReference er = ((SmallMolecule) pe).getEntityReference();
if (er != null) return er.getUri();
}
return null;
} | java | private String getSMRID(PhysicalEntity pe)
{
if (pe instanceof SmallMolecule)
{
EntityReference er = ((SmallMolecule) pe).getEntityReference();
if (er != null) return er.getUri();
}
return null;
} | [
"private",
"String",
"getSMRID",
"(",
"PhysicalEntity",
"pe",
")",
"{",
"if",
"(",
"pe",
"instanceof",
"SmallMolecule",
")",
"{",
"EntityReference",
"er",
"=",
"(",
"(",
"SmallMolecule",
")",
"pe",
")",
".",
"getEntityReference",
"(",
")",
";",
"if",
"(",
... | Gets the ID of the reference of the given entity if it is a small molecule. | [
"Gets",
"the",
"ID",
"of",
"the",
"reference",
"of",
"the",
"given",
"entity",
"if",
"it",
"is",
"a",
"small",
"molecule",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L363-L371 |
10,935 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/InteractionWrapper.java | InteractionWrapper.addToDownstream | protected void addToDownstream(BioPAXElement pe, Graph graph)
{
AbstractNode node = (AbstractNode) graph.getGraphObject(pe);
if (node != null)
{
EdgeL3 edge = new EdgeL3(this, node, graph);
edge.setTranscription(true);
node.getUpstreamNoInit().add(edge);
this.getDownstreamNoInit().add(edg... | java | protected void addToDownstream(BioPAXElement pe, Graph graph)
{
AbstractNode node = (AbstractNode) graph.getGraphObject(pe);
if (node != null)
{
EdgeL3 edge = new EdgeL3(this, node, graph);
edge.setTranscription(true);
node.getUpstreamNoInit().add(edge);
this.getDownstreamNoInit().add(edg... | [
"protected",
"void",
"addToDownstream",
"(",
"BioPAXElement",
"pe",
",",
"Graph",
"graph",
")",
"{",
"AbstractNode",
"node",
"=",
"(",
"AbstractNode",
")",
"graph",
".",
"getGraphObject",
"(",
"pe",
")",
";",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"E... | Binds the given PhysicalEntity to the downstream.
@param pe PhysicalEntity to bind
@param graph Owner graph | [
"Binds",
"the",
"given",
"PhysicalEntity",
"to",
"the",
"downstream",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/InteractionWrapper.java#L83-L95 |
10,936 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java | PhysicalEntityWrapper.initDownstream | public void initDownstream()
{
for (Interaction inter : getDownstreamInteractions(pe.getParticipantOf()))
{
AbstractNode node = (AbstractNode) graph.getGraphObject(inter);
if (node == null) continue;
if (inter instanceof Conversion)
{
Conversion conv = (Conversion) inter;
Conversio... | java | public void initDownstream()
{
for (Interaction inter : getDownstreamInteractions(pe.getParticipantOf()))
{
AbstractNode node = (AbstractNode) graph.getGraphObject(inter);
if (node == null) continue;
if (inter instanceof Conversion)
{
Conversion conv = (Conversion) inter;
Conversio... | [
"public",
"void",
"initDownstream",
"(",
")",
"{",
"for",
"(",
"Interaction",
"inter",
":",
"getDownstreamInteractions",
"(",
"pe",
".",
"getParticipantOf",
"(",
")",
")",
")",
"{",
"AbstractNode",
"node",
"=",
"(",
"AbstractNode",
")",
"graph",
".",
"getGra... | Binds to downstream interactions. | [
"Binds",
"to",
"downstream",
"interactions",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java#L112-L135 |
10,937 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java | PhysicalEntityWrapper.getDownstreamInteractions | protected Set<Interaction> getDownstreamInteractions(Collection<Interaction> inters)
{
Set<Interaction> set = new HashSet<Interaction>();
for (Interaction inter : inters)
{
if (inter instanceof Conversion)
{
Conversion conv = (Conversion) inter;
ConversionDirectionType dir = conv.getConve... | java | protected Set<Interaction> getDownstreamInteractions(Collection<Interaction> inters)
{
Set<Interaction> set = new HashSet<Interaction>();
for (Interaction inter : inters)
{
if (inter instanceof Conversion)
{
Conversion conv = (Conversion) inter;
ConversionDirectionType dir = conv.getConve... | [
"protected",
"Set",
"<",
"Interaction",
">",
"getDownstreamInteractions",
"(",
"Collection",
"<",
"Interaction",
">",
"inters",
")",
"{",
"Set",
"<",
"Interaction",
">",
"set",
"=",
"new",
"HashSet",
"<",
"Interaction",
">",
"(",
")",
";",
"for",
"(",
"Int... | Gets the downstream interactions among the given set.
@param inters Interactions to search
@return Downstream interactions | [
"Gets",
"the",
"downstream",
"interactions",
"among",
"the",
"given",
"set",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java#L174-L199 |
10,938 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java | PhysicalEntityWrapper.getRelatedConversions | private Set<Conversion> getRelatedConversions(Collection<Interaction> inters)
{
Set<Conversion> set = new HashSet<Conversion>();
for (Interaction inter : inters)
{
if (inter instanceof Conversion)
{
set.add((Conversion) inter);
}
else if (inter instanceof Control)
{
getRelated... | java | private Set<Conversion> getRelatedConversions(Collection<Interaction> inters)
{
Set<Conversion> set = new HashSet<Conversion>();
for (Interaction inter : inters)
{
if (inter instanceof Conversion)
{
set.add((Conversion) inter);
}
else if (inter instanceof Control)
{
getRelated... | [
"private",
"Set",
"<",
"Conversion",
">",
"getRelatedConversions",
"(",
"Collection",
"<",
"Interaction",
">",
"inters",
")",
"{",
"Set",
"<",
"Conversion",
">",
"set",
"=",
"new",
"HashSet",
"<",
"Conversion",
">",
"(",
")",
";",
"for",
"(",
"Interaction"... | Get all related Conversions of the given Interaction set.
@param inters Interactions to query
@return Related Conversions | [
"Get",
"all",
"related",
"Conversions",
"of",
"the",
"given",
"Interaction",
"set",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java#L208-L224 |
10,939 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java | PhysicalEntityWrapper.getRelatedConversions | private Set<Conversion> getRelatedConversions(Control ctrl, Set<Conversion> set)
{
for (Process process : ctrl.getControlled())
{
if (process instanceof Conversion)
{
set.add((Conversion) process);
}
else if (process instanceof Control)
{
getRelatedConversions((Control) process, se... | java | private Set<Conversion> getRelatedConversions(Control ctrl, Set<Conversion> set)
{
for (Process process : ctrl.getControlled())
{
if (process instanceof Conversion)
{
set.add((Conversion) process);
}
else if (process instanceof Control)
{
getRelatedConversions((Control) process, se... | [
"private",
"Set",
"<",
"Conversion",
">",
"getRelatedConversions",
"(",
"Control",
"ctrl",
",",
"Set",
"<",
"Conversion",
">",
"set",
")",
"{",
"for",
"(",
"Process",
"process",
":",
"ctrl",
".",
"getControlled",
"(",
")",
")",
"{",
"if",
"(",
"process",... | Recursively searches the related Conversions of a Control.
@param ctrl Control to query
@param set Set to collect the related Conversions
@return The same set | [
"Recursively",
"searches",
"the",
"related",
"Conversions",
"of",
"a",
"Control",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/PhysicalEntityWrapper.java#L232-L246 |
10,940 | BioPAX/Paxtools | psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/PsiToBiopax3Converter.java | PsiToBiopax3Converter.convert | public void convert(InputStream inputStream, OutputStream outputStream,
boolean forceInteractionToComplex) throws IOException, PsimiXmlReaderException {
// check args
if (inputStream == null || outputStream == null) {
throw new IllegalArgumentException("convert(): " +
"one or more null arguments.");
... | java | public void convert(InputStream inputStream, OutputStream outputStream,
boolean forceInteractionToComplex) throws IOException, PsimiXmlReaderException {
// check args
if (inputStream == null || outputStream == null) {
throw new IllegalArgumentException("convert(): " +
"one or more null arguments.");
... | [
"public",
"void",
"convert",
"(",
"InputStream",
"inputStream",
",",
"OutputStream",
"outputStream",
",",
"boolean",
"forceInteractionToComplex",
")",
"throws",
"IOException",
",",
"PsimiXmlReaderException",
"{",
"// check args",
"if",
"(",
"inputStream",
"==",
"null",
... | Converts the PSI-MI inputStream into BioPAX outputStream.
Streams will be closed by the converter.
Warning: for very large models (about 1-2Gb if serialized), and when ByteArrayOutputStream
is used, OutOfMemoryError might be thrown (increasing the "heap" RAM won't help; but using FileOutputStream will).
@param inputS... | [
"Converts",
"the",
"PSI",
"-",
"MI",
"inputStream",
"into",
"BioPAX",
"outputStream",
".",
"Streams",
"will",
"be",
"closed",
"by",
"the",
"converter",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/PsiToBiopax3Converter.java#L93-L109 |
10,941 | BioPAX/Paxtools | psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/PsiToBiopax3Converter.java | PsiToBiopax3Converter.convertTab | public void convertTab(InputStream inputStream, OutputStream outputStream,
boolean forceInteractionToComplex) throws IOException, PsimiTabException {
// check args
if (inputStream == null || outputStream == null) {
throw new IllegalArgumentException("convertTab(): " +
"one or more null arguments.");
... | java | public void convertTab(InputStream inputStream, OutputStream outputStream,
boolean forceInteractionToComplex) throws IOException, PsimiTabException {
// check args
if (inputStream == null || outputStream == null) {
throw new IllegalArgumentException("convertTab(): " +
"one or more null arguments.");
... | [
"public",
"void",
"convertTab",
"(",
"InputStream",
"inputStream",
",",
"OutputStream",
"outputStream",
",",
"boolean",
"forceInteractionToComplex",
")",
"throws",
"IOException",
",",
"PsimiTabException",
"{",
"// check args",
"if",
"(",
"inputStream",
"==",
"null",
"... | Converts the PSI-MITAB inputStream into BioPAX outputStream.
Streams will be closed by the converter.
@param inputStream psi-mitab
@param outputStream biopax
@param forceInteractionToComplex - always generate Complex instead of MolecularInteraction
@throws IOException when an I/O error occur
@throws PsimiTabException... | [
"Converts",
"the",
"PSI",
"-",
"MITAB",
"inputStream",
"into",
"BioPAX",
"outputStream",
".",
"Streams",
"will",
"be",
"closed",
"by",
"the",
"converter",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/PsiToBiopax3Converter.java#L123-L148 |
10,942 | BioPAX/Paxtools | psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/PsiToBiopax3Converter.java | PsiToBiopax3Converter.convert | public void convert(EntrySet entrySet, OutputStream outputStream,
boolean forceInteractionToComplex) {
// check args
if (entrySet == null || outputStream == null) {
throw new IllegalArgumentException("convert: one or more null arguments.");
}
if (entrySet.getLevel() != 2) {
throw new IllegalArgumentE... | java | public void convert(EntrySet entrySet, OutputStream outputStream,
boolean forceInteractionToComplex) {
// check args
if (entrySet == null || outputStream == null) {
throw new IllegalArgumentException("convert: one or more null arguments.");
}
if (entrySet.getLevel() != 2) {
throw new IllegalArgumentE... | [
"public",
"void",
"convert",
"(",
"EntrySet",
"entrySet",
",",
"OutputStream",
"outputStream",
",",
"boolean",
"forceInteractionToComplex",
")",
"{",
"// check args",
"if",
"(",
"entrySet",
"==",
"null",
"||",
"outputStream",
"==",
"null",
")",
"{",
"throw",
"ne... | Converts the PSI interactions from the EntrySet and places into BioPAX output stream.
Stream will be closed by the converter.
@param entrySet PSI-MI entry set
@param outputStream output stream for writing the BioPAX RDF/XML result
@param forceInteractionToComplex true/false - whether to always generate Complex instead... | [
"Converts",
"the",
"PSI",
"interactions",
"from",
"the",
"EntrySet",
"and",
"places",
"into",
"BioPAX",
"output",
"stream",
".",
"Stream",
"will",
"be",
"closed",
"by",
"the",
"converter",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/PsiToBiopax3Converter.java#L158-L185 |
10,943 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/RelatedGenesOfInteractionsMiner.java | RelatedGenesOfInteractionsMiner.writeResult | public void writeResult(Map<BioPAXElement, List<Match>> matches, OutputStream out)
throws IOException
{
OutputStreamWriter writer = new OutputStreamWriter(out);
for (BioPAXElement ele : matches.keySet())
{
Set<String> syms = new HashSet<String>();
for (Match m : matches.get(ele))
{
ProteinRefere... | java | public void writeResult(Map<BioPAXElement, List<Match>> matches, OutputStream out)
throws IOException
{
OutputStreamWriter writer = new OutputStreamWriter(out);
for (BioPAXElement ele : matches.keySet())
{
Set<String> syms = new HashSet<String>();
for (Match m : matches.get(ele))
{
ProteinRefere... | [
"public",
"void",
"writeResult",
"(",
"Map",
"<",
"BioPAXElement",
",",
"List",
"<",
"Match",
">",
">",
"matches",
",",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"OutputStreamWriter",
"writer",
"=",
"new",
"OutputStreamWriter",
"(",
"out",
")",... | Writes the IDs of interaction, then gene symbols of related proteins in a line.
@param matches pattern search result
@param out output stream | [
"Writes",
"the",
"IDs",
"of",
"interaction",
"then",
"gene",
"symbols",
"of",
"related",
"proteins",
"in",
"a",
"line",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/RelatedGenesOfInteractionsMiner.java#L52-L86 |
10,944 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java | SelfOrThis.generate | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = con.generate(match, ind);
gen.add(match.get(ind[selfIndex]));
return gen;
} | java | @Override
public Collection<BioPAXElement> generate(Match match, int... ind)
{
Collection<BioPAXElement> gen = con.generate(match, ind);
gen.add(match.get(ind[selfIndex]));
return gen;
} | [
"@",
"Override",
"public",
"Collection",
"<",
"BioPAXElement",
">",
"generate",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"Collection",
"<",
"BioPAXElement",
">",
"gen",
"=",
"con",
".",
"generate",
"(",
"match",
",",
"ind",
")",
";",
... | Gets the first mapped element along with the generated elements of wrapped constraint.
@param match current pattern match
@param ind mapped indices
@return first mapped element along with the generated elements of wrapped constraint | [
"Gets",
"the",
"first",
"mapped",
"element",
"along",
"with",
"the",
"generated",
"elements",
"of",
"wrapped",
"constraint",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java#L76-L82 |
10,945 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java | SelfOrThis.satisfies | @Override
public boolean satisfies(Match match, int... ind)
{
return match.get(ind[selfIndex]) == match.get(ind[ind.length-1]) ||
super.satisfies(match, ind);
} | java | @Override
public boolean satisfies(Match match, int... ind)
{
return match.get(ind[selfIndex]) == match.get(ind[ind.length-1]) ||
super.satisfies(match, ind);
} | [
"@",
"Override",
"public",
"boolean",
"satisfies",
"(",
"Match",
"match",
",",
"int",
"...",
"ind",
")",
"{",
"return",
"match",
".",
"get",
"(",
"ind",
"[",
"selfIndex",
"]",
")",
"==",
"match",
".",
"get",
"(",
"ind",
"[",
"ind",
".",
"length",
"... | Checks if the last index is either generated or equal to the first element.
@param match current pattern match
@param ind mapped indices
@return true if the last index is either generated or equal to the first element | [
"Checks",
"if",
"the",
"last",
"index",
"is",
"either",
"generated",
"or",
"equal",
"to",
"the",
"first",
"element",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java#L90-L95 |
10,946 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/model/AbstractGraph.java | AbstractGraph.getGraphObject | public GraphObject getGraphObject(Object obj)
{
String key = getKey(obj);
GraphObject go = objectMap.get(key);
// if (obj instanceof Conversion && go == null)
// {
// go = objectMap.get(key + ConversionWrapper.LEFT_TO_RIGHT);
// if (go == null)
// go = objectMap.get(key + ConversionWrapper.RIGHT... | java | public GraphObject getGraphObject(Object obj)
{
String key = getKey(obj);
GraphObject go = objectMap.get(key);
// if (obj instanceof Conversion && go == null)
// {
// go = objectMap.get(key + ConversionWrapper.LEFT_TO_RIGHT);
// if (go == null)
// go = objectMap.get(key + ConversionWrapper.RIGHT... | [
"public",
"GraphObject",
"getGraphObject",
"(",
"Object",
"obj",
")",
"{",
"String",
"key",
"=",
"getKey",
"(",
"obj",
")",
";",
"GraphObject",
"go",
"=",
"objectMap",
".",
"get",
"(",
"key",
")",
";",
"//\t\tif (obj instanceof Conversion && go == null)\r",
"//\... | Gets the related wrapper for the given object, creates the wrapper if not created before.
@param obj Object to wrap
@return wrapper | [
"Gets",
"the",
"related",
"wrapper",
"for",
"the",
"given",
"object",
"creates",
"the",
"wrapper",
"if",
"not",
"created",
"before",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/model/AbstractGraph.java#L31-L55 |
10,947 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/CustomFormat.java | CustomFormat.convert | @Override
public String convert(SIFInteraction inter)
{
String s = inter.toString();
for (OutputColumn column : columns)
{
s += "\t" + column.getColumnValue(inter);
}
return s;
} | java | @Override
public String convert(SIFInteraction inter)
{
String s = inter.toString();
for (OutputColumn column : columns)
{
s += "\t" + column.getColumnValue(inter);
}
return s;
} | [
"@",
"Override",
"public",
"String",
"convert",
"(",
"SIFInteraction",
"inter",
")",
"{",
"String",
"s",
"=",
"inter",
".",
"toString",
"(",
")",
";",
"for",
"(",
"OutputColumn",
"column",
":",
"columns",
")",
"{",
"s",
"+=",
"\"\\t\"",
"+",
"column",
... | Prepares the line in the output file for the given interaction.
@param inter the interaction
@return output line. | [
"Prepares",
"the",
"line",
"in",
"the",
"output",
"file",
"for",
"the",
"given",
"interaction",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/CustomFormat.java#L29-L40 |
10,948 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/ExtendedSIFWriter.java | ExtendedSIFWriter.collectEntityRefs | private static Map<String, Set<BioPAXElement>> collectEntityRefs(Collection<SIFInteraction> inters)
{
Map<String, Set<BioPAXElement>> map = new HashMap<String, Set<BioPAXElement>>();
for (SIFInteraction inter : inters)
{
if (!map.containsKey(inter.sourceID))
map.put(inter.sourceID, new HashSet<BioPAXElem... | java | private static Map<String, Set<BioPAXElement>> collectEntityRefs(Collection<SIFInteraction> inters)
{
Map<String, Set<BioPAXElement>> map = new HashMap<String, Set<BioPAXElement>>();
for (SIFInteraction inter : inters)
{
if (!map.containsKey(inter.sourceID))
map.put(inter.sourceID, new HashSet<BioPAXElem... | [
"private",
"static",
"Map",
"<",
"String",
",",
"Set",
"<",
"BioPAXElement",
">",
">",
"collectEntityRefs",
"(",
"Collection",
"<",
"SIFInteraction",
">",
"inters",
")",
"{",
"Map",
"<",
"String",
",",
"Set",
"<",
"BioPAXElement",
">",
">",
"map",
"=",
"... | Collects the sources and targets in given interactions.
@param inters binary interactions
@return map from the primary id to the set of related source and target elements. | [
"Collects",
"the",
"sources",
"and",
"targets",
"in",
"given",
"interactions",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/ExtendedSIFWriter.java#L159-L174 |
10,949 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/ExtendedSIFWriter.java | ExtendedSIFWriter.concat | private static String concat(Collection<String> col)
{
StringBuilder b = new StringBuilder();
boolean first = true;
for (String s : col)
{
if (first)
first = false;
else
b.append(";");
b.append(s);
}
return b.toString();
} | java | private static String concat(Collection<String> col)
{
StringBuilder b = new StringBuilder();
boolean first = true;
for (String s : col)
{
if (first)
first = false;
else
b.append(";");
b.append(s);
}
return b.toString();
} | [
"private",
"static",
"String",
"concat",
"(",
"Collection",
"<",
"String",
">",
"col",
")",
"{",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
"String",
"s",
":",
"col",
")",
"{",
... | Concatenates the given collection of strings into a single string where values are separated
with a semicolon.
@param col string collection
@return concatenated string | [
"Concatenates",
"the",
"given",
"collection",
"of",
"strings",
"into",
"a",
"single",
"string",
"where",
"values",
"are",
"separated",
"with",
"a",
"semicolon",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/ExtendedSIFWriter.java#L217-L231 |
10,950 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/TemplateReactionWrapper.java | TemplateReactionWrapper.initUpstream | @Override
public void initUpstream()
{
NucleicAcid nuc = tempReac.getTemplate();
if (nuc != null)
addToUpstream(nuc, getGraph());
for (Control cont : tempReac.getControlledOf())
{
addToUpstream(cont, graph);
}
} | java | @Override
public void initUpstream()
{
NucleicAcid nuc = tempReac.getTemplate();
if (nuc != null)
addToUpstream(nuc, getGraph());
for (Control cont : tempReac.getControlledOf())
{
addToUpstream(cont, graph);
}
} | [
"@",
"Override",
"public",
"void",
"initUpstream",
"(",
")",
"{",
"NucleicAcid",
"nuc",
"=",
"tempReac",
".",
"getTemplate",
"(",
")",
";",
"if",
"(",
"nuc",
"!=",
"null",
")",
"addToUpstream",
"(",
"nuc",
",",
"getGraph",
"(",
")",
")",
";",
"for",
... | Binds to template and controllers. | [
"Binds",
"to",
"template",
"and",
"controllers",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/TemplateReactionWrapper.java#L35-L46 |
10,951 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/TemplateReactionWrapper.java | TemplateReactionWrapper.addToUpstream | protected void addToUpstream(BioPAXElement ele, org.biopax.paxtools.query.model.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)
{
... | java | protected void addToUpstream(BioPAXElement ele, org.biopax.paxtools.query.model.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)
{
... | [
"protected",
"void",
"addToUpstream",
"(",
"BioPAXElement",
"ele",
",",
"org",
".",
"biopax",
".",
"paxtools",
".",
"query",
".",
"model",
".",
"Graph",
"graph",
")",
"{",
"AbstractNode",
"node",
"=",
"(",
"AbstractNode",
")",
"graph",
".",
"getGraphObject",... | Binds the given element to the upstream.
@param ele Element to bind
@param graph Owner graph | [
"Binds",
"the",
"given",
"element",
"to",
"the",
"upstream",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/TemplateReactionWrapper.java#L94-L111 |
10,952 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/CommonStreamQuery.java | CommonStreamQuery.run | public Set<GraphObject> run()
{
/**
* Candidate contains all the graph objects that are the results of BFS.
* Eliminating nodes from candidate according to the reached counts
* will yield result.
*/
Map<GraphObject, Integer> candidate = new HashMap<GraphObject, Integer>();
Set<GraphObject> re... | java | public Set<GraphObject> run()
{
/**
* Candidate contains all the graph objects that are the results of BFS.
* Eliminating nodes from candidate according to the reached counts
* will yield result.
*/
Map<GraphObject, Integer> candidate = new HashMap<GraphObject, Integer>();
Set<GraphObject> re... | [
"public",
"Set",
"<",
"GraphObject",
">",
"run",
"(",
")",
"{",
"/**\r\n\t\t * Candidate contains all the graph objects that are the results of BFS.\r\n\t\t * Eliminating nodes from candidate according to the reached counts\r\n\t\t * will yield result.\r\n\t\t */",
"Map",
"<",
"GraphObject",... | Method to run the query.
@return Common stream | [
"Method",
"to",
"run",
"the",
"query",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/CommonStreamQuery.java#L90-L135 |
10,953 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Match.java | Match.get | public BioPAXElement get(String label, Pattern p)
{
return variables[p.indexOf(label)];
} | java | public BioPAXElement get(String label, Pattern p)
{
return variables[p.indexOf(label)];
} | [
"public",
"BioPAXElement",
"get",
"(",
"String",
"label",
",",
"Pattern",
"p",
")",
"{",
"return",
"variables",
"[",
"p",
".",
"indexOf",
"(",
"label",
")",
"]",
";",
"}"
] | Gets element corresponding to the given label in the pattern.
@param label label of the element in the pattern
@param p related pattern
@return element of the given label
@throws IllegalArgumentException if the label not in the pattern | [
"Gets",
"element",
"corresponding",
"to",
"the",
"given",
"label",
"in",
"the",
"pattern",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Match.java#L58-L61 |
10,954 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Match.java | Match.get | public List<BioPAXElement> get(String[] label, Pattern p)
{
if (label == null) return Collections.emptyList();
List<BioPAXElement> list = new ArrayList<BioPAXElement>(label.length);
for (String lab : label)
{
list.add(variables[p.indexOf(lab)]);
}
return list;
} | java | public List<BioPAXElement> get(String[] label, Pattern p)
{
if (label == null) return Collections.emptyList();
List<BioPAXElement> list = new ArrayList<BioPAXElement>(label.length);
for (String lab : label)
{
list.add(variables[p.indexOf(lab)]);
}
return list;
} | [
"public",
"List",
"<",
"BioPAXElement",
">",
"get",
"(",
"String",
"[",
"]",
"label",
",",
"Pattern",
"p",
")",
"{",
"if",
"(",
"label",
"==",
"null",
")",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"List",
"<",
"BioPAXElement",
">",
"... | Gets elements corresponding to the given labels in the pattern.
@param label labels of the element in the pattern
@param p related pattern
@return elements of the given label
@throws IllegalArgumentException if one of the labels not in the pattern | [
"Gets",
"elements",
"corresponding",
"to",
"the",
"given",
"labels",
"in",
"the",
"pattern",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Match.java#L70-L80 |
10,955 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Match.java | Match.getAName | public String getAName(BioPAXElement ele)
{
String name = null;
if (ele instanceof Named)
{
Named n = (Named) ele;
if (n.getDisplayName() != null && n.getDisplayName().length() > 0)
name = n.getDisplayName();
else if (n.getStandardName() != null && n.getStandardName().length() > 0)
name = n... | java | public String getAName(BioPAXElement ele)
{
String name = null;
if (ele instanceof Named)
{
Named n = (Named) ele;
if (n.getDisplayName() != null && n.getDisplayName().length() > 0)
name = n.getDisplayName();
else if (n.getStandardName() != null && n.getStandardName().length() > 0)
name = n... | [
"public",
"String",
"getAName",
"(",
"BioPAXElement",
"ele",
")",
"{",
"String",
"name",
"=",
"null",
";",
"if",
"(",
"ele",
"instanceof",
"Named",
")",
"{",
"Named",
"n",
"=",
"(",
"Named",
")",
"ele",
";",
"if",
"(",
"n",
".",
"getDisplayName",
"("... | Finds a name for the variable.
@param ele element to check
@return a name | [
"Finds",
"a",
"name",
"for",
"the",
"variable",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Match.java#L177-L195 |
10,956 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/ConversionWrapper.java | ConversionWrapper.init | public void init()
{
if (conv.getConversionDirection() == ConversionDirectionType.REVERSIBLE &&
this.reverse == null)
{
reverse = new ConversionWrapper(conv, (GraphL3) graph);
this.direction = LEFT_TO_RIGHT;
reverse.direction = RIGHT_TO_LEFT;
reverse.reverse = this;
}
else if (conv.get... | java | public void init()
{
if (conv.getConversionDirection() == ConversionDirectionType.REVERSIBLE &&
this.reverse == null)
{
reverse = new ConversionWrapper(conv, (GraphL3) graph);
this.direction = LEFT_TO_RIGHT;
reverse.direction = RIGHT_TO_LEFT;
reverse.reverse = this;
}
else if (conv.get... | [
"public",
"void",
"init",
"(",
")",
"{",
"if",
"(",
"conv",
".",
"getConversionDirection",
"(",
")",
"==",
"ConversionDirectionType",
".",
"REVERSIBLE",
"&&",
"this",
".",
"reverse",
"==",
"null",
")",
"{",
"reverse",
"=",
"new",
"ConversionWrapper",
"(",
... | Extracts the direction, creates the reverse if necessary. | [
"Extracts",
"the",
"direction",
"creates",
"the",
"reverse",
"if",
"necessary",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/ConversionWrapper.java#L63-L81 |
10,957 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/ConversionWrapper.java | ConversionWrapper.initUpstream | @Override
public void initUpstream()
{
if (direction == LEFT_TO_RIGHT)
{
for (PhysicalEntity pe : conv.getLeft())
{
addToUpstream(pe, getGraph());
}
}
else
{
for (PhysicalEntity pe : conv.getRight())
{
addToUpstream(pe, getGraph());
}
}
for (Control cont : co... | java | @Override
public void initUpstream()
{
if (direction == LEFT_TO_RIGHT)
{
for (PhysicalEntity pe : conv.getLeft())
{
addToUpstream(pe, getGraph());
}
}
else
{
for (PhysicalEntity pe : conv.getRight())
{
addToUpstream(pe, getGraph());
}
}
for (Control cont : co... | [
"@",
"Override",
"public",
"void",
"initUpstream",
"(",
")",
"{",
"if",
"(",
"direction",
"==",
"LEFT_TO_RIGHT",
")",
"{",
"for",
"(",
"PhysicalEntity",
"pe",
":",
"conv",
".",
"getLeft",
"(",
")",
")",
"{",
"addToUpstream",
"(",
"pe",
",",
"getGraph",
... | Binds inputs and controllers. | [
"Binds",
"inputs",
"and",
"controllers",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/ConversionWrapper.java#L86-L119 |
10,958 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/ConversionWrapper.java | ConversionWrapper.initDownstream | @Override
public void initDownstream()
{
if (direction == RIGHT_TO_LEFT)
{
for (PhysicalEntity pe : conv.getLeft())
{
addToDownstream(pe, getGraph());
}
}
else
{
for (PhysicalEntity pe : conv.getRight())
{
addToDownstream(pe, getGraph());
}
}
} | java | @Override
public void initDownstream()
{
if (direction == RIGHT_TO_LEFT)
{
for (PhysicalEntity pe : conv.getLeft())
{
addToDownstream(pe, getGraph());
}
}
else
{
for (PhysicalEntity pe : conv.getRight())
{
addToDownstream(pe, getGraph());
}
}
} | [
"@",
"Override",
"public",
"void",
"initDownstream",
"(",
")",
"{",
"if",
"(",
"direction",
"==",
"RIGHT_TO_LEFT",
")",
"{",
"for",
"(",
"PhysicalEntity",
"pe",
":",
"conv",
".",
"getLeft",
"(",
")",
")",
"{",
"addToDownstream",
"(",
"pe",
",",
"getGraph... | Binds products. | [
"Binds",
"products",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/ConversionWrapper.java#L124-L141 |
10,959 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.getPattern | public Pattern getPattern()
{
if(pattern == null) {
pattern = constructPattern();
if (this instanceof SIFMiner && idFetcher != null && idMap != null) {
pattern.add(new HasAnID(idFetcher, idMap), ((SIFMiner) this).getSourceLabel());
pattern.add(new HasAnID(idFetcher, idMap), ((SIFMiner) this).getTargetL... | java | public Pattern getPattern()
{
if(pattern == null) {
pattern = constructPattern();
if (this instanceof SIFMiner && idFetcher != null && idMap != null) {
pattern.add(new HasAnID(idFetcher, idMap), ((SIFMiner) this).getSourceLabel());
pattern.add(new HasAnID(idFetcher, idMap), ((SIFMiner) this).getTargetL... | [
"public",
"Pattern",
"getPattern",
"(",
")",
"{",
"if",
"(",
"pattern",
"==",
"null",
")",
"{",
"pattern",
"=",
"constructPattern",
"(",
")",
";",
"if",
"(",
"this",
"instanceof",
"SIFMiner",
"&&",
"idFetcher",
"!=",
"null",
"&&",
"idMap",
"!=",
"null",
... | Gets the pattern, constructs if null.
@return pattern | [
"Gets",
"the",
"pattern",
"constructs",
"if",
"null",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L94-L105 |
10,960 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.isInhibition | public boolean isInhibition(Control ctrl)
{
return ctrl.getControlType() != null && ctrl.getControlType().toString().startsWith("I");
} | java | public boolean isInhibition(Control ctrl)
{
return ctrl.getControlType() != null && ctrl.getControlType().toString().startsWith("I");
} | [
"public",
"boolean",
"isInhibition",
"(",
"Control",
"ctrl",
")",
"{",
"return",
"ctrl",
".",
"getControlType",
"(",
")",
"!=",
"null",
"&&",
"ctrl",
".",
"getControlType",
"(",
")",
".",
"toString",
"(",
")",
".",
"startsWith",
"(",
"\"I\"",
")",
";",
... | Checks if the type of a Control is inhibition.
@param ctrl Control to check
@return true if type is inhibition related | [
"Checks",
"if",
"the",
"type",
"of",
"a",
"Control",
"is",
"inhibition",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L231-L234 |
10,961 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.toStringSet | public Set<String> toStringSet(Set<ModificationFeature> set)
{
List<ModificationFeature> list = new ArrayList<ModificationFeature>(set);
Collections.sort(list, new Comparator<ModificationFeature>()
{
@Override
public int compare(ModificationFeature o1, ModificationFeature o2)
{
String t1 = getModif... | java | public Set<String> toStringSet(Set<ModificationFeature> set)
{
List<ModificationFeature> list = new ArrayList<ModificationFeature>(set);
Collections.sort(list, new Comparator<ModificationFeature>()
{
@Override
public int compare(ModificationFeature o1, ModificationFeature o2)
{
String t1 = getModif... | [
"public",
"Set",
"<",
"String",
">",
"toStringSet",
"(",
"Set",
"<",
"ModificationFeature",
">",
"set",
")",
"{",
"List",
"<",
"ModificationFeature",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"ModificationFeature",
">",
"(",
"set",
")",
";",
"Collections",
... | Sorts the modifications and gets them in a String.
@param set modifications
@return a String listing the modifications | [
"Sorts",
"the",
"modifications",
"and",
"gets",
"them",
"in",
"a",
"String",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L273-L297 |
10,962 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.getInString | private Set<String> getInString(List<ModificationFeature> list)
{
Set<String> text = new HashSet<String>(list.size());
for (ModificationFeature mf : list)
{
String term = getModificationTerm(mf);
String loc = getPositionInString(mf);
if (term != null)
{
String s = term + loc;
if (!text.cont... | java | private Set<String> getInString(List<ModificationFeature> list)
{
Set<String> text = new HashSet<String>(list.size());
for (ModificationFeature mf : list)
{
String term = getModificationTerm(mf);
String loc = getPositionInString(mf);
if (term != null)
{
String s = term + loc;
if (!text.cont... | [
"private",
"Set",
"<",
"String",
">",
"getInString",
"(",
"List",
"<",
"ModificationFeature",
">",
"list",
")",
"{",
"Set",
"<",
"String",
">",
"text",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"list",
".",
"size",
"(",
")",
")",
";",
"for",
... | Gets the modifications is a string that is separated with comma.
@param list modification list
@return String representing the modifications | [
"Gets",
"the",
"modifications",
"is",
"a",
"string",
"that",
"is",
"separated",
"with",
"comma",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L304-L320 |
10,963 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.getModificationTerm | public String getModificationTerm(ModificationFeature mf)
{
Set vals = TERM_ACC.getValueFromBean(mf);
if (vals.isEmpty()) return null;
return vals.iterator().next().toString();
} | java | public String getModificationTerm(ModificationFeature mf)
{
Set vals = TERM_ACC.getValueFromBean(mf);
if (vals.isEmpty()) return null;
return vals.iterator().next().toString();
} | [
"public",
"String",
"getModificationTerm",
"(",
"ModificationFeature",
"mf",
")",
"{",
"Set",
"vals",
"=",
"TERM_ACC",
".",
"getValueFromBean",
"(",
"mf",
")",
";",
"if",
"(",
"vals",
".",
"isEmpty",
"(",
")",
")",
"return",
"null",
";",
"return",
"vals",
... | Gets the String term of the modification feature.
@param mf modification feature
@return modification term | [
"Gets",
"the",
"String",
"term",
"of",
"the",
"modification",
"feature",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L327-L332 |
10,964 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.getPositionStart | public int getPositionStart(ModificationFeature mf)
{
Set vals = SITE_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
return ((Integer) vals.iterator().next());
}
vals = INTERVAL_BEGIN_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
return ((Integer) vals.iterator().next());
}
return -1;
... | java | public int getPositionStart(ModificationFeature mf)
{
Set vals = SITE_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
return ((Integer) vals.iterator().next());
}
vals = INTERVAL_BEGIN_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
return ((Integer) vals.iterator().next());
}
return -1;
... | [
"public",
"int",
"getPositionStart",
"(",
"ModificationFeature",
"mf",
")",
"{",
"Set",
"vals",
"=",
"SITE_ACC",
".",
"getValueFromBean",
"(",
"mf",
")",
";",
"if",
"(",
"!",
"vals",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"(",
"(",
"Integer",
")... | Gets the first position of the modification feature.
@param mf modification feature
@return first location | [
"Gets",
"the",
"first",
"position",
"of",
"the",
"modification",
"feature",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L339-L356 |
10,965 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.getPositionInString | public String getPositionInString(ModificationFeature mf)
{
Set vals = SITE_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
int x = ((Integer) vals.iterator().next());
if (x > 0) return "@" + x;
}
vals = INTERVAL_BEGIN_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
int begin = ((Integer) v... | java | public String getPositionInString(ModificationFeature mf)
{
Set vals = SITE_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
int x = ((Integer) vals.iterator().next());
if (x > 0) return "@" + x;
}
vals = INTERVAL_BEGIN_ACC.getValueFromBean(mf);
if (!vals.isEmpty())
{
int begin = ((Integer) v... | [
"public",
"String",
"getPositionInString",
"(",
"ModificationFeature",
"mf",
")",
"{",
"Set",
"vals",
"=",
"SITE_ACC",
".",
"getValueFromBean",
"(",
"mf",
")",
";",
"if",
"(",
"!",
"vals",
".",
"isEmpty",
"(",
")",
")",
"{",
"int",
"x",
"=",
"(",
"(",
... | Gets the position of the modification feature as a String.
@param mf modification feature
@return location | [
"Gets",
"the",
"position",
"of",
"the",
"modification",
"feature",
"as",
"a",
"String",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L363-L394 |
10,966 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.getModifications | protected Set<String> getModifications(Match m, String label)
{
PhysicalEntity pe = (PhysicalEntity) m.get(label, getPattern());
return toStringSet(new HashSet<ModificationFeature>(FEAT_ACC.getValueFromBean(pe)));
} | java | protected Set<String> getModifications(Match m, String label)
{
PhysicalEntity pe = (PhysicalEntity) m.get(label, getPattern());
return toStringSet(new HashSet<ModificationFeature>(FEAT_ACC.getValueFromBean(pe)));
} | [
"protected",
"Set",
"<",
"String",
">",
"getModifications",
"(",
"Match",
"m",
",",
"String",
"label",
")",
"{",
"PhysicalEntity",
"pe",
"=",
"(",
"PhysicalEntity",
")",
"m",
".",
"get",
"(",
"label",
",",
"getPattern",
"(",
")",
")",
";",
"return",
"t... | Gets modifications of the given element in a string. The element has to be a PhysicalEntity.
@param m match
@param label label of the PhysicalEntity
@return modifications | [
"Gets",
"modifications",
"of",
"the",
"given",
"element",
"in",
"a",
"string",
".",
"The",
"element",
"has",
"to",
"be",
"a",
"PhysicalEntity",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L402-L406 |
10,967 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.concat | protected String concat(Set<String> set, String sep)
{
String s = "";
int i = set.size();
for (String ss : set)
{
s += ss;
if (--i > 0) s += sep;
}
return s;
} | java | protected String concat(Set<String> set, String sep)
{
String s = "";
int i = set.size();
for (String ss : set)
{
s += ss;
if (--i > 0) s += sep;
}
return s;
} | [
"protected",
"String",
"concat",
"(",
"Set",
"<",
"String",
">",
"set",
",",
"String",
"sep",
")",
"{",
"String",
"s",
"=",
"\"\"",
";",
"int",
"i",
"=",
"set",
".",
"size",
"(",
")",
";",
"for",
"(",
"String",
"ss",
":",
"set",
")",
"{",
"s",
... | Converts the set of string to a single string.
@param set the set
@param sep separator string
@return concatenated string | [
"Converts",
"the",
"set",
"of",
"string",
"to",
"a",
"single",
"string",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L509-L520 |
10,968 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.sign | protected int sign(Control ctrl)
{
ControlType type = ctrl.getControlType();
if (type != null && type.name().startsWith("I")) return -1;
return 1;
} | java | protected int sign(Control ctrl)
{
ControlType type = ctrl.getControlType();
if (type != null && type.name().startsWith("I")) return -1;
return 1;
} | [
"protected",
"int",
"sign",
"(",
"Control",
"ctrl",
")",
"{",
"ControlType",
"type",
"=",
"ctrl",
".",
"getControlType",
"(",
")",
";",
"if",
"(",
"type",
"!=",
"null",
"&&",
"type",
".",
"name",
"(",
")",
".",
"startsWith",
"(",
"\"I\"",
")",
")",
... | Identifies negative and positive controls. Assumes positive by default.
@param ctrl control to check
@return sign | [
"Identifies",
"negative",
"and",
"positive",
"controls",
".",
"Assumes",
"positive",
"by",
"default",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L527-L532 |
10,969 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.sign | protected int sign(Match m, String... ctrlLabel)
{
int sign = 1;
for (String lab : ctrlLabel)
{
Control ctrl = (Control) m.get(lab, getPattern());
sign *= sign(ctrl);
}
return sign;
} | java | protected int sign(Match m, String... ctrlLabel)
{
int sign = 1;
for (String lab : ctrlLabel)
{
Control ctrl = (Control) m.get(lab, getPattern());
sign *= sign(ctrl);
}
return sign;
} | [
"protected",
"int",
"sign",
"(",
"Match",
"m",
",",
"String",
"...",
"ctrlLabel",
")",
"{",
"int",
"sign",
"=",
"1",
";",
"for",
"(",
"String",
"lab",
":",
"ctrlLabel",
")",
"{",
"Control",
"ctrl",
"=",
"(",
"Control",
")",
"m",
".",
"get",
"(",
... | Checks the cumulative sign of the chained controls.
@param m result match
@param ctrlLabel labels for controls
@return sign | [
"Checks",
"the",
"cumulative",
"sign",
"of",
"the",
"chained",
"controls",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L540-L550 |
10,970 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.labeledInactive | protected boolean labeledInactive(Match m, String simpleLabel, String complexLabel)
{
PhysicalEntityChain chain = getChain(m, simpleLabel, complexLabel);
PhysicalEntityChain.Activity activity = chain.checkActivityLabel();
return activity == PhysicalEntityChain.Activity.INACTIVE;
} | java | protected boolean labeledInactive(Match m, String simpleLabel, String complexLabel)
{
PhysicalEntityChain chain = getChain(m, simpleLabel, complexLabel);
PhysicalEntityChain.Activity activity = chain.checkActivityLabel();
return activity == PhysicalEntityChain.Activity.INACTIVE;
} | [
"protected",
"boolean",
"labeledInactive",
"(",
"Match",
"m",
",",
"String",
"simpleLabel",
",",
"String",
"complexLabel",
")",
"{",
"PhysicalEntityChain",
"chain",
"=",
"getChain",
"(",
"m",
",",
"simpleLabel",
",",
"complexLabel",
")",
";",
"PhysicalEntityChain"... | Checks if a PE chain is labeled as inactive.
@param m the result match
@param simpleLabel simple end of the chain
@param complexLabel complex end of the chain
@return true if labeled inactive | [
"Checks",
"if",
"a",
"PE",
"chain",
"is",
"labeled",
"as",
"inactive",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L559-L564 |
10,971 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.writeResultDetailed | protected void writeResultDetailed(Map<BioPAXElement, List<Match>> matches, OutputStream out,
int columns) throws IOException
{
OutputStreamWriter writer = new OutputStreamWriter(out);
// write the header
String header = getHeader();
if (header != null)
{
writer.write(header);
}
else
{
for (i... | java | protected void writeResultDetailed(Map<BioPAXElement, List<Match>> matches, OutputStream out,
int columns) throws IOException
{
OutputStreamWriter writer = new OutputStreamWriter(out);
// write the header
String header = getHeader();
if (header != null)
{
writer.write(header);
}
else
{
for (i... | [
"protected",
"void",
"writeResultDetailed",
"(",
"Map",
"<",
"BioPAXElement",
",",
"List",
"<",
"Match",
">",
">",
"matches",
",",
"OutputStream",
"out",
",",
"int",
"columns",
")",
"throws",
"IOException",
"{",
"OutputStreamWriter",
"writer",
"=",
"new",
"Out... | Writes the result as a tab delimited format, where the column values are customized.
@param matches result matches
@param out output stream
@param columns number of columns in the result
@throws IOException if cannot write to the stream | [
"Writes",
"the",
"result",
"as",
"a",
"tab",
"delimited",
"format",
"where",
"the",
"column",
"values",
"are",
"customized",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L703-L763 |
10,972 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.createSIFInteraction | public Set<SIFInteraction> createSIFInteraction(Match m, IDFetcher fetcher)
{
BioPAXElement sourceBpe = m.get(((SIFMiner) this).getSourceLabel(), getPattern());
BioPAXElement targetBpe = m.get(((SIFMiner) this).getTargetLabel(), getPattern());
Set<String> sources = fetchIDs(sourceBpe, fetcher);
Set<String> ta... | java | public Set<SIFInteraction> createSIFInteraction(Match m, IDFetcher fetcher)
{
BioPAXElement sourceBpe = m.get(((SIFMiner) this).getSourceLabel(), getPattern());
BioPAXElement targetBpe = m.get(((SIFMiner) this).getTargetLabel(), getPattern());
Set<String> sources = fetchIDs(sourceBpe, fetcher);
Set<String> ta... | [
"public",
"Set",
"<",
"SIFInteraction",
">",
"createSIFInteraction",
"(",
"Match",
"m",
",",
"IDFetcher",
"fetcher",
")",
"{",
"BioPAXElement",
"sourceBpe",
"=",
"m",
".",
"get",
"(",
"(",
"(",
"SIFMiner",
")",
"this",
")",
".",
"getSourceLabel",
"(",
")",... | Creates a SIF interaction for the given match.
@param m match to use for SIF creation
@param fetcher ID generator from BioPAX object
@return SIF interaction | [
"Creates",
"a",
"SIF",
"interaction",
"for",
"the",
"given",
"match",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L784-L818 |
10,973 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java | MinerAdapter.getIdentifiers | protected Set<String> getIdentifiers(Match m, String label)
{
BioPAXElement el = m.get(label, getPattern());
if (idFetcher != null) return idFetcher.fetchID(el);
Set<String> set = new HashSet<String>();
if (el instanceof ProteinReference)
{
set.add(getGeneSymbol((ProteinReference) el));
}
else if (e... | java | protected Set<String> getIdentifiers(Match m, String label)
{
BioPAXElement el = m.get(label, getPattern());
if (idFetcher != null) return idFetcher.fetchID(el);
Set<String> set = new HashSet<String>();
if (el instanceof ProteinReference)
{
set.add(getGeneSymbol((ProteinReference) el));
}
else if (e... | [
"protected",
"Set",
"<",
"String",
">",
"getIdentifiers",
"(",
"Match",
"m",
",",
"String",
"label",
")",
"{",
"BioPAXElement",
"el",
"=",
"m",
".",
"get",
"(",
"label",
",",
"getPattern",
"(",
")",
")",
";",
"if",
"(",
"idFetcher",
"!=",
"null",
")"... | Uses uniprot name or gene symbol as identifier.
@param m current match
@param label label of the related EntityReference in the pattern
@return identifier | [
"Uses",
"uniprot",
"name",
"or",
"gene",
"symbol",
"as",
"identifier",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L866-L883 |
10,974 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java | VNode.update | public void update(LGraphObject lGraphObj)
{
if (lGraphObj instanceof CoSEGraph)
{
return;
}
LNode lNode = (LNode)lGraphObj;
this.glyph.getBbox().setX((float) lNode.getLeft());
this.glyph.getBbox().setY((float) lNode.getTop());
this.placeStateAnd... | java | public void update(LGraphObject lGraphObj)
{
if (lGraphObj instanceof CoSEGraph)
{
return;
}
LNode lNode = (LNode)lGraphObj;
this.glyph.getBbox().setX((float) lNode.getLeft());
this.glyph.getBbox().setY((float) lNode.getTop());
this.placeStateAnd... | [
"public",
"void",
"update",
"(",
"LGraphObject",
"lGraphObj",
")",
"{",
"if",
"(",
"lGraphObj",
"instanceof",
"CoSEGraph",
")",
"{",
"return",
";",
"}",
"LNode",
"lNode",
"=",
"(",
"LNode",
")",
"lGraphObj",
";",
"this",
".",
"glyph",
".",
"getBbox",
"("... | Function that will take place when VNode objects will update in layout process of ChiLay
@param lGraphObj LGraphObject for whom the update will take place. | [
"Function",
"that",
"will",
"take",
"place",
"when",
"VNode",
"objects",
"will",
"update",
"in",
"layout",
"process",
"of",
"ChiLay"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java#L123-L135 |
10,975 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java | VNode.setBounds | public void setBounds(float w, float h)
{
this.glyph.getBbox().setW(w);
this.glyph.getBbox().setH(h);
} | java | public void setBounds(float w, float h)
{
this.glyph.getBbox().setW(w);
this.glyph.getBbox().setH(h);
} | [
"public",
"void",
"setBounds",
"(",
"float",
"w",
",",
"float",
"h",
")",
"{",
"this",
".",
"glyph",
".",
"getBbox",
"(",
")",
".",
"setW",
"(",
"w",
")",
";",
"this",
".",
"glyph",
".",
"getBbox",
"(",
")",
".",
"setH",
"(",
"h",
")",
";",
"... | Sets the bound of this VNode by given width and height
@param w new width
@param h new height | [
"Sets",
"the",
"bound",
"of",
"this",
"VNode",
"by",
"given",
"width",
"and",
"height"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java#L142-L146 |
10,976 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java | VNode.setSizeAccordingToClass | public void setSizeAccordingToClass()
{
String glyphClass = this.glyph.getClazz();
//If glyph class is not specified return here
if (glyphClass.equalsIgnoreCase(NONE))
return;
if (glyphClass.equalsIgnoreCase(SOURCE_AND_SINK))
{
setBounds(SOURCE_AND_S... | java | public void setSizeAccordingToClass()
{
String glyphClass = this.glyph.getClazz();
//If glyph class is not specified return here
if (glyphClass.equalsIgnoreCase(NONE))
return;
if (glyphClass.equalsIgnoreCase(SOURCE_AND_SINK))
{
setBounds(SOURCE_AND_S... | [
"public",
"void",
"setSizeAccordingToClass",
"(",
")",
"{",
"String",
"glyphClass",
"=",
"this",
".",
"glyph",
".",
"getClazz",
"(",
")",
";",
"//If glyph class is not specified return here",
"if",
"(",
"glyphClass",
".",
"equalsIgnoreCase",
"(",
"NONE",
")",
")",... | Chooses a proper bound for this VNode according to its class. | [
"Chooses",
"a",
"proper",
"bound",
"for",
"this",
"VNode",
"according",
"to",
"its",
"class",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java#L151-L236 |
10,977 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java | VNode.calcReqWidthByStateAndInfos | public int calcReqWidthByStateAndInfos(List<Glyph> stateORinfoList)
{
int wholeSize = 0;
int count = 0;
for (Glyph tmpGlyph: stateORinfoList)
{
String text;
if (tmpGlyph.getState() != null)
{
text = tmpGlyph.getState().getValue();... | java | public int calcReqWidthByStateAndInfos(List<Glyph> stateORinfoList)
{
int wholeSize = 0;
int count = 0;
for (Glyph tmpGlyph: stateORinfoList)
{
String text;
if (tmpGlyph.getState() != null)
{
text = tmpGlyph.getState().getValue();... | [
"public",
"int",
"calcReqWidthByStateAndInfos",
"(",
"List",
"<",
"Glyph",
">",
"stateORinfoList",
")",
"{",
"int",
"wholeSize",
"=",
"0",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"Glyph",
"tmpGlyph",
":",
"stateORinfoList",
")",
"{",
"String",
"tex... | Calculates required width according to the given list state and info glyphs of this VNode.
This method also previously computes the width and height of state and info glyphs
according to their label.
@param stateORinfoList list that keeps state or info glyphs of this VNode
@return new width that is adjusted so that a... | [
"Calculates",
"required",
"width",
"according",
"to",
"the",
"given",
"list",
"state",
"and",
"info",
"glyphs",
"of",
"this",
"VNode",
".",
"This",
"method",
"also",
"previously",
"computes",
"the",
"width",
"and",
"height",
"of",
"state",
"and",
"info",
"gl... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java#L246-L311 |
10,978 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java | VNode.updateSizeForStateAndInfo | public void updateSizeForStateAndInfo()
{
// Find all state and info glyphs
for (Glyph glyph : this.glyph.getGlyph())
{
if (glyph.getClazz() == STATE_VARIABLE)
{
stateGlyphs.add(glyph);
}
else if (glyph.getClazz() == UNIT_OF_INF... | java | public void updateSizeForStateAndInfo()
{
// Find all state and info glyphs
for (Glyph glyph : this.glyph.getGlyph())
{
if (glyph.getClazz() == STATE_VARIABLE)
{
stateGlyphs.add(glyph);
}
else if (glyph.getClazz() == UNIT_OF_INF... | [
"public",
"void",
"updateSizeForStateAndInfo",
"(",
")",
"{",
"// Find all state and info glyphs",
"for",
"(",
"Glyph",
"glyph",
":",
"this",
".",
"glyph",
".",
"getGlyph",
"(",
")",
")",
"{",
"if",
"(",
"glyph",
".",
"getClazz",
"(",
")",
"==",
"STATE_VARIA... | If glyph attribute of this VNode object includes any "state of information" or "unit of information" glyphs, this method updates the
size of VNode accordingly. | [
"If",
"glyph",
"attribute",
"of",
"this",
"VNode",
"object",
"includes",
"any",
"state",
"of",
"information",
"or",
"unit",
"of",
"information",
"glyphs",
"this",
"method",
"updates",
"the",
"size",
"of",
"VNode",
"accordingly",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VNode.java#L317-L355 |
10,979 | BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/NeighborhoodQuery.java | NeighborhoodQuery.run | public Set<GraphObject> run()
{
// result set of neighborhood query
Set<GraphObject> queryResult = new HashSet<GraphObject>();
// if upstream is selected
if (direction == Direction.UPSTREAM || direction == Direction.BOTHSTREAM)
{
// run BFS in upstream direction
BFS bfsBackward = new BFS(sour... | java | public Set<GraphObject> run()
{
// result set of neighborhood query
Set<GraphObject> queryResult = new HashSet<GraphObject>();
// if upstream is selected
if (direction == Direction.UPSTREAM || direction == Direction.BOTHSTREAM)
{
// run BFS in upstream direction
BFS bfsBackward = new BFS(sour... | [
"public",
"Set",
"<",
"GraphObject",
">",
"run",
"(",
")",
"{",
"// result set of neighborhood query\r",
"Set",
"<",
"GraphObject",
">",
"queryResult",
"=",
"new",
"HashSet",
"<",
"GraphObject",
">",
"(",
")",
";",
"// if upstream is selected\r",
"if",
"(",
"dir... | Executes the query.
@return Neighborhood | [
"Executes",
"the",
"query",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/NeighborhoodQuery.java#L53-L87 |
10,980 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.add | private void add(Constraint constr, int... ind)
{
assert ind.length > 0;
assert constr.getVariableSize() == ind.length;
for (int i = 0; i < (constr.canGenerate() ? ind.length - 1 : ind.length); i++)
{
assert ind[i] <= lastIndex;
}
constraints.add(new MappedConst(constr, ind));
if (constr.canGenerat... | java | private void add(Constraint constr, int... ind)
{
assert ind.length > 0;
assert constr.getVariableSize() == ind.length;
for (int i = 0; i < (constr.canGenerate() ? ind.length - 1 : ind.length); i++)
{
assert ind[i] <= lastIndex;
}
constraints.add(new MappedConst(constr, ind));
if (constr.canGenerat... | [
"private",
"void",
"add",
"(",
"Constraint",
"constr",
",",
"int",
"...",
"ind",
")",
"{",
"assert",
"ind",
".",
"length",
">",
"0",
";",
"assert",
"constr",
".",
"getVariableSize",
"(",
")",
"==",
"ind",
".",
"length",
";",
"for",
"(",
"int",
"i",
... | Creates a mapped constraint with the given constraint and the indexes it applies.
@param constr constraint to add
@param ind indices to map the constraint to the element in the pattern | [
"Creates",
"a",
"mapped",
"constraint",
"with",
"the",
"given",
"constraint",
"and",
"the",
"indexes",
"it",
"applies",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L76-L96 |
10,981 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.removeLastConstraint | public void removeLastConstraint()
{
if (constraints.isEmpty()) return;
MappedConst mc = constraints.get(constraints.size() - 1);
constraints.remove(mc);
if (mc.canGenerate() && mc.getInds()[mc.getInds().length - 1] == lastIndex)
{
setLastIndexToMaxFound();
}
} | java | public void removeLastConstraint()
{
if (constraints.isEmpty()) return;
MappedConst mc = constraints.get(constraints.size() - 1);
constraints.remove(mc);
if (mc.canGenerate() && mc.getInds()[mc.getInds().length - 1] == lastIndex)
{
setLastIndexToMaxFound();
}
} | [
"public",
"void",
"removeLastConstraint",
"(",
")",
"{",
"if",
"(",
"constraints",
".",
"isEmpty",
"(",
")",
")",
"return",
";",
"MappedConst",
"mc",
"=",
"constraints",
".",
"get",
"(",
"constraints",
".",
"size",
"(",
")",
"-",
"1",
")",
";",
"constr... | Removes the last constraint added to the pattern. | [
"Removes",
"the",
"last",
"constraint",
"added",
"to",
"the",
"pattern",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L101-L111 |
10,982 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.setLastIndexToMaxFound | private void setLastIndexToMaxFound()
{
int max = -1;
for (MappedConst mc : constraints)
{
int[] ind = mc.getInds();
int last = ind[ind.length - 1];
if (last > max) max = last;
}
lastIndex = max;
} | java | private void setLastIndexToMaxFound()
{
int max = -1;
for (MappedConst mc : constraints)
{
int[] ind = mc.getInds();
int last = ind[ind.length - 1];
if (last > max) max = last;
}
lastIndex = max;
} | [
"private",
"void",
"setLastIndexToMaxFound",
"(",
")",
"{",
"int",
"max",
"=",
"-",
"1",
";",
"for",
"(",
"MappedConst",
"mc",
":",
"constraints",
")",
"{",
"int",
"[",
"]",
"ind",
"=",
"mc",
".",
"getInds",
"(",
")",
";",
"int",
"last",
"=",
"ind"... | This method is used after removal of an generative constraint. Searching the remaining
constraints, we decide the value of lastIndex. | [
"This",
"method",
"is",
"used",
"after",
"removal",
"of",
"an",
"generative",
"constraint",
".",
"Searching",
"the",
"remaining",
"constraints",
"we",
"decide",
"the",
"value",
"of",
"lastIndex",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L117-L127 |
10,983 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.add | public void add(Constraint constr, String... label)
{
checkLabels(constr.canGenerate(), label);
int[] ind = convertLabelsToInds(label);
if (ind.length != constr.getVariableSize())
{
throw new IllegalArgumentException("Mapped elements do not match the constraint size.");
}
// This will also increment ... | java | public void add(Constraint constr, String... label)
{
checkLabels(constr.canGenerate(), label);
int[] ind = convertLabelsToInds(label);
if (ind.length != constr.getVariableSize())
{
throw new IllegalArgumentException("Mapped elements do not match the constraint size.");
}
// This will also increment ... | [
"public",
"void",
"add",
"(",
"Constraint",
"constr",
",",
"String",
"...",
"label",
")",
"{",
"checkLabels",
"(",
"constr",
".",
"canGenerate",
"(",
")",
",",
"label",
")",
";",
"int",
"[",
"]",
"ind",
"=",
"convertLabelsToInds",
"(",
"label",
")",
";... | Creates a mapped constraint with the given generative constraint and the indexes it applies.
Also labels the last given index.
@param constr constraint to add
@param label a label for the last of the given indices | [
"Creates",
"a",
"mapped",
"constraint",
"with",
"the",
"given",
"generative",
"constraint",
"and",
"the",
"indexes",
"it",
"applies",
".",
"Also",
"labels",
"the",
"last",
"given",
"index",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L200-L218 |
10,984 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.convertLabelsToInds | private int[] convertLabelsToInds(String... label)
{
int[] ind = new int[label.length];
for (int i = 0; i < label.length; i++)
{
if (hasLabel(label[i]))
{
ind[i] = indexOf(label[i]);
}
else ind[i] = lastIndex + 1;
}
return ind;
} | java | private int[] convertLabelsToInds(String... label)
{
int[] ind = new int[label.length];
for (int i = 0; i < label.length; i++)
{
if (hasLabel(label[i]))
{
ind[i] = indexOf(label[i]);
}
else ind[i] = lastIndex + 1;
}
return ind;
} | [
"private",
"int",
"[",
"]",
"convertLabelsToInds",
"(",
"String",
"...",
"label",
")",
"{",
"int",
"[",
"]",
"ind",
"=",
"new",
"int",
"[",
"label",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"label",
".",
"length",... | Converts the labels to the indexes. Assumes the sanity of the labels already checked and if
any new label exists, it is only one and it is the last one.
@param label labels
@return indexes for labels | [
"Converts",
"the",
"labels",
"to",
"the",
"indexes",
".",
"Assumes",
"the",
"sanity",
"of",
"the",
"labels",
"already",
"checked",
"and",
"if",
"any",
"new",
"label",
"exists",
"it",
"is",
"only",
"one",
"and",
"it",
"is",
"the",
"last",
"one",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L226-L238 |
10,985 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.convertIndsToLabels | private String[] convertIndsToLabels(int... ind)
{
String[] label = new String[ind.length];
for (int i = 0; i < ind.length; i++)
{
if (!hasLabel(ind[i])) throw new IllegalArgumentException(
"The index " + ind[i] + " does not have a label.");
label[i] = getLabel(ind[i]);
}
return label;
} | java | private String[] convertIndsToLabels(int... ind)
{
String[] label = new String[ind.length];
for (int i = 0; i < ind.length; i++)
{
if (!hasLabel(ind[i])) throw new IllegalArgumentException(
"The index " + ind[i] + " does not have a label.");
label[i] = getLabel(ind[i]);
}
return label;
} | [
"private",
"String",
"[",
"]",
"convertIndsToLabels",
"(",
"int",
"...",
"ind",
")",
"{",
"String",
"[",
"]",
"label",
"=",
"new",
"String",
"[",
"ind",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ind",
".",
"length... | Converts the indices to the labels. All indices must have an existing label.
@param ind indices
@return labels for indices | [
"Converts",
"the",
"indices",
"to",
"the",
"labels",
".",
"All",
"indices",
"must",
"have",
"an",
"existing",
"label",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L245-L256 |
10,986 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.add | public void add(Pattern p)
{
if (!hasLabel(p.getLabel(0))) throw new IllegalArgumentException("The label of first " +
"element of parameter index \"" + p.getLabel(0) + "\" not found in this pattern.");
for (MappedConst mc : p.getConstraints())
{
add(mc.getConstr(), p.convertIndsToLabels(mc.getInds()));
... | java | public void add(Pattern p)
{
if (!hasLabel(p.getLabel(0))) throw new IllegalArgumentException("The label of first " +
"element of parameter index \"" + p.getLabel(0) + "\" not found in this pattern.");
for (MappedConst mc : p.getConstraints())
{
add(mc.getConstr(), p.convertIndsToLabels(mc.getInds()));
... | [
"public",
"void",
"add",
"(",
"Pattern",
"p",
")",
"{",
"if",
"(",
"!",
"hasLabel",
"(",
"p",
".",
"getLabel",
"(",
"0",
")",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The label of first \"",
"+",
"\"element of parameter index \\\"\"",
"+",... | Appends the constraints in the parameter pattern to the desired location. Indexes in the
constraint mappings are translated so that 0 is translated to ind0, and others are translated
to orig + indAppend - 1. All slots of this pattern should already be full before calling this
method. This method makes room for the new ... | [
"Appends",
"the",
"constraints",
"in",
"the",
"parameter",
"pattern",
"to",
"the",
"desired",
"location",
".",
"Indexes",
"in",
"the",
"constraint",
"mappings",
"are",
"translated",
"so",
"that",
"0",
"is",
"translated",
"to",
"ind0",
"and",
"others",
"are",
... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L282-L291 |
10,987 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.getLabel | private String getLabel(int i)
{
for (String label : labelMap.keySet())
{
if (labelMap.get(label) == i) return label;
}
return null;
} | java | private String getLabel(int i)
{
for (String label : labelMap.keySet())
{
if (labelMap.get(label) == i) return label;
}
return null;
} | [
"private",
"String",
"getLabel",
"(",
"int",
"i",
")",
"{",
"for",
"(",
"String",
"label",
":",
"labelMap",
".",
"keySet",
"(",
")",
")",
"{",
"if",
"(",
"labelMap",
".",
"get",
"(",
"label",
")",
"==",
"i",
")",
"return",
"label",
";",
"}",
"ret... | Gets the label for the element at the specified index.
@param i index
@return label for the element at the specified index | [
"Gets",
"the",
"label",
"for",
"the",
"element",
"at",
"the",
"specified",
"index",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L298-L305 |
10,988 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.insertPointConstraint | public void insertPointConstraint(Constraint con, int ... ind)
{
assert con.getVariableSize() == 1;
for (int i : ind)
{
for (int j = 0; j < constraints.size(); j++)
{
int[] index = constraints.get(j).getInds();
if (index[index.length-1] == i)
{
constraints.add(j + 1, new MappedConst(con, ... | java | public void insertPointConstraint(Constraint con, int ... ind)
{
assert con.getVariableSize() == 1;
for (int i : ind)
{
for (int j = 0; j < constraints.size(); j++)
{
int[] index = constraints.get(j).getInds();
if (index[index.length-1] == i)
{
constraints.add(j + 1, new MappedConst(con, ... | [
"public",
"void",
"insertPointConstraint",
"(",
"Constraint",
"con",
",",
"int",
"...",
"ind",
")",
"{",
"assert",
"con",
".",
"getVariableSize",
"(",
")",
"==",
"1",
";",
"for",
"(",
"int",
"i",
":",
"ind",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"... | A point constraint deals with only one element in a match, checks its validity. This method
injects the parameter constraint multiple times among the list of mapped constraints, to the
specified indexes.
@param con constraint to add
@param ind indices to add this point constraint | [
"A",
"point",
"constraint",
"deals",
"with",
"only",
"one",
"element",
"in",
"a",
"match",
"checks",
"its",
"validity",
".",
"This",
"method",
"injects",
"the",
"parameter",
"constraint",
"multiple",
"times",
"among",
"the",
"list",
"of",
"mapped",
"constraint... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L315-L331 |
10,989 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.label | public void label(String labelText, int index)
{
if (labelMap.containsKey(labelText)) throw new IllegalArgumentException(
"Label \"" + labelText + "\" already exists.");
if (labelMap.containsValue(index)) throw new IllegalArgumentException(
"Index \"" + index + "\" already has a label.");
labelMap.put(la... | java | public void label(String labelText, int index)
{
if (labelMap.containsKey(labelText)) throw new IllegalArgumentException(
"Label \"" + labelText + "\" already exists.");
if (labelMap.containsValue(index)) throw new IllegalArgumentException(
"Index \"" + index + "\" already has a label.");
labelMap.put(la... | [
"public",
"void",
"label",
"(",
"String",
"labelText",
",",
"int",
"index",
")",
"{",
"if",
"(",
"labelMap",
".",
"containsKey",
"(",
"labelText",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Label \\\"\"",
"+",
"labelText",
"+",
"\"\\\" alrea... | Puts the given label for the given index.
@param labelText the label
@param index index to label | [
"Puts",
"the",
"given",
"label",
"for",
"the",
"given",
"index",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L365-L374 |
10,990 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.indexOf | public int indexOf(String labelText)
{
if (!labelMap.containsKey(labelText))
throw new IllegalArgumentException("The label \"" + labelText +
"\" is absent in pattern.");
return labelMap.get(labelText);
} | java | public int indexOf(String labelText)
{
if (!labelMap.containsKey(labelText))
throw new IllegalArgumentException("The label \"" + labelText +
"\" is absent in pattern.");
return labelMap.get(labelText);
} | [
"public",
"int",
"indexOf",
"(",
"String",
"labelText",
")",
"{",
"if",
"(",
"!",
"labelMap",
".",
"containsKey",
"(",
"labelText",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The label \\\"\"",
"+",
"labelText",
"+",
"\"\\\" is absent in pattern... | Gets the index of the given label. The label must exist, otherwise a runtime exception is
thrown.
@param labelText label to check
@return index of the label | [
"Gets",
"the",
"index",
"of",
"the",
"given",
"label",
".",
"The",
"label",
"must",
"exist",
"otherwise",
"a",
"runtime",
"exception",
"is",
"thrown",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L402-L409 |
10,991 | BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java | Pattern.updateLabel | public void updateLabel(String oldLabel, String newLabel)
{
if (hasLabel(newLabel)) throw new IllegalArgumentException(
"The label \"" + newLabel + "\" already exists.");
int i = indexOf(oldLabel);
labelMap.remove(oldLabel);
labelMap.put(newLabel, i);
} | java | public void updateLabel(String oldLabel, String newLabel)
{
if (hasLabel(newLabel)) throw new IllegalArgumentException(
"The label \"" + newLabel + "\" already exists.");
int i = indexOf(oldLabel);
labelMap.remove(oldLabel);
labelMap.put(newLabel, i);
} | [
"public",
"void",
"updateLabel",
"(",
"String",
"oldLabel",
",",
"String",
"newLabel",
")",
"{",
"if",
"(",
"hasLabel",
"(",
"newLabel",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The label \\\"\"",
"+",
"newLabel",
"+",
"\"\\\" already exists.\... | Changes a label. The oldLabel has to be an existing label and new label has to be a new
label.
@param oldLabel label to update
@param newLabel updated label | [
"Changes",
"a",
"label",
".",
"The",
"oldLabel",
"has",
"to",
"be",
"an",
"existing",
"label",
"and",
"new",
"label",
"has",
"to",
"be",
"a",
"new",
"label",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Pattern.java#L417-L425 |
10,992 | BioPAX/Paxtools | paxtools-console/src/main/java/org/biopax/paxtools/examples/GOUnificationXREFtoRelationshipXREFConverter.java | GOUnificationXREFtoRelationshipXREFConverter.main | public static void main(String[] args)
throws IllegalAccessException, InvocationTargetException
{
// Process all the args
for (String arg : args)
{
log.info(arg);
if (arg.toLowerCase().endsWith("owl"))
{
try
{
... | java | public static void main(String[] args)
throws IllegalAccessException, InvocationTargetException
{
// Process all the args
for (String arg : args)
{
log.info(arg);
if (arg.toLowerCase().endsWith("owl"))
{
try
{
... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
"// Process all the args",
"for",
"(",
"String",
"arg",
":",
"args",
")",
"{",
"log",
".",
"info",
"(",
"arg",
... | args - a space seperated list of owl files to be processed | [
"args",
"-",
"a",
"space",
"seperated",
"list",
"of",
"owl",
"files",
"to",
"be",
"processed"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-console/src/main/java/org/biopax/paxtools/examples/GOUnificationXREFtoRelationshipXREFConverter.java#L35-L55 |
10,993 | BioPAX/Paxtools | paxtools-console/src/main/java/org/biopax/paxtools/examples/GOUnificationXREFtoRelationshipXREFConverter.java | GOUnificationXREFtoRelationshipXREFConverter.processXrefs | private static void processXrefs(String arg) throws
FileNotFoundException,
IllegalAccessException,
InvocationTargetException
{
//Read in the model
FileInputStream in =
new FileInputStream(new File(arg));
Model level2 =
reader.convertFromOWL(in);
//Get all unification xrefs.
Set... | java | private static void processXrefs(String arg) throws
FileNotFoundException,
IllegalAccessException,
InvocationTargetException
{
//Read in the model
FileInputStream in =
new FileInputStream(new File(arg));
Model level2 =
reader.convertFromOWL(in);
//Get all unification xrefs.
Set... | [
"private",
"static",
"void",
"processXrefs",
"(",
"String",
"arg",
")",
"throws",
"FileNotFoundException",
",",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
"//Read in the model",
"FileInputStream",
"in",
"=",
"new",
"FileInputStream",
"(",
"new",
"F... | Main conversion method. Demonstrates how to read and write a BioPAX
model and accessing its objects.
@param arg file name to be processed | [
"Main",
"conversion",
"method",
".",
"Demonstrates",
"how",
"to",
"read",
"and",
"write",
"a",
"BioPAX",
"model",
"and",
"accessing",
"its",
"objects",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-console/src/main/java/org/biopax/paxtools/examples/GOUnificationXREFtoRelationshipXREFConverter.java#L62-L101 |
10,994 | BioPAX/Paxtools | paxtools-console/src/main/java/org/biopax/paxtools/examples/GOUnificationXREFtoRelationshipXREFConverter.java | GOUnificationXREFtoRelationshipXREFConverter.convert | private static void convert(unificationXref uni, Model level2)
{
//We can not simply convert a class, so we need to remove the
//uni and insert a new relationship xref
//First get all the objects that refers to this uni
Set<XReferrable> referrables =
new HashSet<XReferrable>(uni.isXREFof(... | java | private static void convert(unificationXref uni, Model level2)
{
//We can not simply convert a class, so we need to remove the
//uni and insert a new relationship xref
//First get all the objects that refers to this uni
Set<XReferrable> referrables =
new HashSet<XReferrable>(uni.isXREFof(... | [
"private",
"static",
"void",
"convert",
"(",
"unificationXref",
"uni",
",",
"Model",
"level2",
")",
"{",
"//We can not simply convert a class, so we need to remove the",
"//uni and insert a new relationship xref",
"//First get all the objects that refers to this uni",
"Set",
"<",
"... | This method converts the given unification xref to a relationship xref
@param uni xref to be converted
@param level2 model containing the xref | [
"This",
"method",
"converts",
"the",
"given",
"unification",
"xref",
"to",
"a",
"relationship",
"xref"
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-console/src/main/java/org/biopax/paxtools/examples/GOUnificationXREFtoRelationshipXREFConverter.java#L108-L145 |
10,995 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java | SBGNLayoutManager.connectArcToPort | private void connectArcToPort(SbgnPDNode lPort, Port vPort)
{
//Iterate over the edges of l level port
for (Object e: (lPort.getEdges()))
{
//Ignore rigid edges
if(((LEdge)e).type.equals("rigid edge"))
continue;
//Determine the if vPort i... | java | private void connectArcToPort(SbgnPDNode lPort, Port vPort)
{
//Iterate over the edges of l level port
for (Object e: (lPort.getEdges()))
{
//Ignore rigid edges
if(((LEdge)e).type.equals("rigid edge"))
continue;
//Determine the if vPort i... | [
"private",
"void",
"connectArcToPort",
"(",
"SbgnPDNode",
"lPort",
",",
"Port",
"vPort",
")",
"{",
"//Iterate over the edges of l level port",
"for",
"(",
"Object",
"e",
":",
"(",
"lPort",
".",
"getEdges",
"(",
")",
")",
")",
"{",
"//Ignore rigid edges",
"if",
... | This method connects the existing arcs to the newly created
ports which are created by ChiLay and SBGNPD Layout.
@param lPort l level port object.
@param vPort v level port object. | [
"This",
"method",
"connects",
"the",
"existing",
"arcs",
"to",
"the",
"newly",
"created",
"ports",
"which",
"are",
"created",
"by",
"ChiLay",
"and",
"SBGNPD",
"Layout",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java#L185-L205 |
10,996 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java | SBGNLayoutManager.populateCompartmentOccurencesMap | private void populateCompartmentOccurencesMap(Glyph targetGlyph, HashMap<String, Integer> compartmentIDandOccurenceMap)
{
String rootID = "root";
// if compartment ref of targetGlyph node is not null, increment its occurence by 1
if(targetGlyph.getCompartmentRef() != null)
{
... | java | private void populateCompartmentOccurencesMap(Glyph targetGlyph, HashMap<String, Integer> compartmentIDandOccurenceMap)
{
String rootID = "root";
// if compartment ref of targetGlyph node is not null, increment its occurence by 1
if(targetGlyph.getCompartmentRef() != null)
{
... | [
"private",
"void",
"populateCompartmentOccurencesMap",
"(",
"Glyph",
"targetGlyph",
",",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"compartmentIDandOccurenceMap",
")",
"{",
"String",
"rootID",
"=",
"\"root\"",
";",
"// if compartment ref of targetGlyph node is not null... | Updates a hashmap by incrementing the number of nodes in the compartment glyph that includes targetGlyph.
It is assumed that given hashmap includes compartment ids' as keys and number of nodes as values.This method
is an utility method that will be used to populate a hashmap while determining the compartment node of a ... | [
"Updates",
"a",
"hashmap",
"by",
"incrementing",
"the",
"number",
"of",
"nodes",
"in",
"the",
"compartment",
"glyph",
"that",
"includes",
"targetGlyph",
".",
"It",
"is",
"assumed",
"that",
"given",
"hashmap",
"includes",
"compartment",
"ids",
"as",
"keys",
"an... | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java#L311-L341 |
10,997 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java | SBGNLayoutManager.createVNodes | private void createVNodes(VCompound parent,List<Glyph> glyphs)
{
for(Glyph glyph: glyphs )
{
if (!glyphClazzOneOf(glyph, GlyphClazz.UNIT_OF_INFORMATION, GlyphClazz.STATE_VARIABLE))
{
// if(glyph.getClazz().equals(GlyphClazz.PROCESS.getClazz()))
// ... | java | private void createVNodes(VCompound parent,List<Glyph> glyphs)
{
for(Glyph glyph: glyphs )
{
if (!glyphClazzOneOf(glyph, GlyphClazz.UNIT_OF_INFORMATION, GlyphClazz.STATE_VARIABLE))
{
// if(glyph.getClazz().equals(GlyphClazz.PROCESS.getClazz()))
// ... | [
"private",
"void",
"createVNodes",
"(",
"VCompound",
"parent",
",",
"List",
"<",
"Glyph",
">",
"glyphs",
")",
"{",
"for",
"(",
"Glyph",
"glyph",
":",
"glyphs",
")",
"{",
"if",
"(",
"!",
"glyphClazzOneOf",
"(",
"glyph",
",",
"GlyphClazz",
".",
"UNIT_OF_IN... | Recursively creates VNodes from Glyphs of Sbgn.
@param parent Parent of the glyphs that are passed as second arguement.
@param glyphs Glyphs that are child of parent which is passed as first arguement. | [
"Recursively",
"creates",
"VNodes",
"from",
"Glyphs",
"of",
"Sbgn",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java#L390-L418 |
10,998 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java | SBGNLayoutManager.createLEdges | private void createLEdges(List<Arc> arcs)
{
for(Arc arc: arcs )
{
LEdge lEdge = layout.newEdge(null);
lEdge.type = arc.getClazz();
lEdge.label = arc.getId();
LNode sourceLNode = viewToLayout.get(glyphToVNode.get(arc.getSource()));
LNode tar... | java | private void createLEdges(List<Arc> arcs)
{
for(Arc arc: arcs )
{
LEdge lEdge = layout.newEdge(null);
lEdge.type = arc.getClazz();
lEdge.label = arc.getId();
LNode sourceLNode = viewToLayout.get(glyphToVNode.get(arc.getSource()));
LNode tar... | [
"private",
"void",
"createLEdges",
"(",
"List",
"<",
"Arc",
">",
"arcs",
")",
"{",
"for",
"(",
"Arc",
"arc",
":",
"arcs",
")",
"{",
"LEdge",
"lEdge",
"=",
"layout",
".",
"newEdge",
"(",
"null",
")",
";",
"lEdge",
".",
"type",
"=",
"arc",
".",
"ge... | Creates LNodes from Arcs of Sbgn and adds it to the passed layout object.
@param arcs List of arc objects from which the LEdges will be constructed for ChiLay Layout component. | [
"Creates",
"LNodes",
"from",
"Arcs",
"of",
"Sbgn",
"and",
"adds",
"it",
"to",
"the",
"passed",
"layout",
"object",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java#L426-L440 |
10,999 | BioPAX/Paxtools | sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java | SBGNLayoutManager.createLNode | private void createLNode(VNode vNode, VNode parent)
{
LNode lNode = layout.newNode(vNode);
lNode.type = vNode.glyph.getClazz();
lNode.label = vNode.glyph.getId();
LGraph rootLGraph = layout.getGraphManager().getRoot();
//Add corresponding nodes to corresponding maps
... | java | private void createLNode(VNode vNode, VNode parent)
{
LNode lNode = layout.newNode(vNode);
lNode.type = vNode.glyph.getClazz();
lNode.label = vNode.glyph.getId();
LGraph rootLGraph = layout.getGraphManager().getRoot();
//Add corresponding nodes to corresponding maps
... | [
"private",
"void",
"createLNode",
"(",
"VNode",
"vNode",
",",
"VNode",
"parent",
")",
"{",
"LNode",
"lNode",
"=",
"layout",
".",
"newNode",
"(",
"vNode",
")",
";",
"lNode",
".",
"type",
"=",
"vNode",
".",
"glyph",
".",
"getClazz",
"(",
")",
";",
"lNo... | Helper function for creating LNode objects from VNode objects and adds them to the given layout.
@param vNode VNode object from which a corresponding LNode object will be created.
@param parent parent of vNode, if not null vNode will be added to layout as child node. | [
"Helper",
"function",
"for",
"creating",
"LNode",
"objects",
"from",
"VNode",
"objects",
"and",
"adds",
"them",
"to",
"the",
"given",
"layout",
"."
] | 2f93afa94426bf8b5afc2e0e61cd4b269a83288d | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java#L449-L492 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.