Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cami
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chow Castro, Marcos
cami
Commits
ea1acd89
Commit
ea1acd89
authored
3 years ago
by
Le, Mia
Browse files
Options
Downloads
Patches
Plain Diff
Added a TemplateWrapper for the integration of new Algorithms
parent
4818687a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cami/TemplateWrapper.py
+4
-6
4 additions, 6 deletions
cami/TemplateWrapper.py
cami/preprocess.py
+1
-1
1 addition, 1 deletion
cami/preprocess.py
with
5 additions
and
7 deletions
cami/TemplateWrapper.py
+
4
−
6
View file @
ea1acd89
...
...
@@ -18,17 +18,15 @@ class TemplateWrapper(AlgorithmWrapper):
The only instance variables that need to be defined for each tool individually are:
- 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
"""
super
().
__init__
()
self
.
name
=
'
DIAMOnD
'
self
.
code
=
1
self
.
name
=
'
<tool_name>
'
self
.
code
=
4
config
=
ConfigParser
()
config
.
read
(
self
.
config
)
self
.
alpha
=
int
(
config
.
get
(
'
diamond
'
,
'
alpha
'
))
self
.
pred_factor
=
int
(
config
.
get
(
'
diamond
'
,
'
pred_factor
'
))
self
.
max_preds
=
int
(
config
.
get
(
'
diamond
'
,
'
max_preds
'
))
# self.nof_predictions = int(config.get('<tool_name>', 'nof_predictions'))
def
run_algorithm
(
self
,
inputparams
):
"""
Execute the algorithm. Ideally the algorithm is a command line tool that takes
...
...
This diff is collapsed.
Click to expand it.
cami/preprocess.py
+
1
−
1
View file @
ea1acd89
...
...
@@ -34,7 +34,7 @@ def csv2graph(inputfile,
break
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
)
return
g
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment