Skip to content
Snippets Groups Projects
Commit ea1acd89 authored by Le, Mia's avatar Le, Mia
Browse files

Added a TemplateWrapper for the integration of new Algorithms

parent 4818687a
No related branches found
No related tags found
No related merge requests found
...@@ -18,17 +18,15 @@ class TemplateWrapper(AlgorithmWrapper): ...@@ -18,17 +18,15 @@ class TemplateWrapper(AlgorithmWrapper):
The only instance variables that need to be defined for each tool individually are: The only instance variables that need to be defined for each tool individually are:
- name (string): The name of the algorithm/tool - name (string): The name of the algorithm/tool
- code (int): A unique integer code for this tool. Choose any number that is not taken by other tools yet (currently taken are: 0,1,2,3) - code (int): A unique integer code for this tool. Choose any number (<21) that is not taken by other tools yet (currently taken are: 0,1,2,3)
- any constant numbers or variables that are defined in the config file for this tool - any constant numbers or variables that are defined in the config file for this tool
""" """
super().__init__() super().__init__()
self.name = 'DIAMOnD' self.name = '<tool_name>'
self.code = 1 self.code = 4
config = ConfigParser() config = ConfigParser()
config.read(self.config) config.read(self.config)
self.alpha = int(config.get('diamond', 'alpha')) # self.nof_predictions = int(config.get('<tool_name>', 'nof_predictions'))
self.pred_factor = int(config.get('diamond', 'pred_factor'))
self.max_preds = int(config.get('diamond', 'max_preds'))
def run_algorithm(self, inputparams): def run_algorithm(self, inputparams):
"""Execute the algorithm. Ideally the algorithm is a command line tool that takes """Execute the algorithm. Ideally the algorithm is a command line tool that takes
......
...@@ -34,7 +34,7 @@ def csv2graph(inputfile, ...@@ -34,7 +34,7 @@ def csv2graph(inputfile,
break break
g.vertex_properties["cami_score"] = g.new_vertex_property("float", val=0.0) g.vertex_properties["cami_score"] = g.new_vertex_property("float", val=0.0)
values = (nof_tools + 6) * [-1] values = (20) * [-1]
g.vertex_properties["predicted_by"] = g.new_vertex_property("vector<int16_t>", val=values) g.vertex_properties["predicted_by"] = g.new_vertex_property("vector<int16_t>", val=values)
return g return g
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment