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
ab48d2c3
Commit
ab48d2c3
authored
Feb 6, 2022
by
Mia_Le
Browse files
Options
Downloads
Patches
Plain Diff
output messages hinzugefügt
parent
026eda27
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cami/cami.py
+9
-6
9 additions, 6 deletions
cami/cami.py
cami/cami_suite.py
+2
-1
2 additions, 1 deletion
cami/cami_suite.py
with
11 additions
and
7 deletions
cami/cami.py
+
9
−
6
View file @
ab48d2c3
...
...
@@ -27,9 +27,7 @@ def main(ppi_network, seeds, tools, tool_weights, consensus, evaluate,
seed_lst
=
[
name2index
[
v
]
for
v
in
seed_lst
]
# set weights for seed genes in ppi_graph
for
seed
in
seed_lst
:
ppi_graph
.
vertex_properties
[
"
weight
"
][
seed
]
=
10.0
for
seed
in
seed_lst
:
print
(
ppi_graph
.
vertex_properties
[
"
weight
"
][
seed
])
ppi_graph
.
vertex_properties
[
"
cami_score
"
][
seed
]
=
10.0
else
:
print
(
'
Abort. Please try again.
'
)
exit
(
1
)
...
...
@@ -38,6 +36,8 @@ def main(ppi_network, seeds, tools, tool_weights, consensus, evaluate,
if
output_dir
==
None
:
output_dir
=
f
'
{
home_path
}
/data/output
'
if
not
os
.
path
.
exists
(
output_dir
):
os
.
mkdir
(
output_dir
)
while
output_dir
[
-
1
]
==
'
/
'
:
output_dir
=
output_dir
[:
-
1
]
...
...
@@ -80,17 +80,20 @@ def main(ppi_network, seeds, tools, tool_weights, consensus, evaluate,
cami
=
cami_suite
.
cami
(
ppi_graph
,
seed_lst
,
tool_wrappers
,
output_dir
,
identifier
,
tmp_dir
)
if
visualize
:
cami
.
visualize
=
True
if
consensus
:
cami
.
create_consensus
()
if
visualize
:
cami
.
visualize
()
if
evaluate
:
cami
.
make_evaluation
()
if
not
consensus
and
not
evaluate
:
cami
.
create_consensus
()
if
visualize
:
cami
.
visualize
()
cami
.
make_evaluation
()
if
save_temps
:
...
...
This diff is collapsed.
Click to expand it.
cami/cami_suite.py
+
2
−
1
View file @
ab48d2c3
...
...
@@ -122,12 +122,13 @@ class cami():
all_vertices
=
cami_vertices
.
union
(
putative_vertices
)
for
vertex
in
all_vertices
:
outputfile
.
write
(
f
'
{
name
[
vertex
]
}
\t
{
[
self
.
code2toolname
[
idx
]
for
idx
,
code
in
enumerate
(
predicted_by
[
vertex
])
if
code
==
1
]
}
\t
{
cami_scores
[
vertex
]
}
\t
{
str
(
vertex
)
}
\n
'
)
print
(
f
'
saved all predictions by the used tools in:
{
self
.
output_dir
}
/all_predictions_
{
self
.
uid
}
.tsv
'
)
with
open
(
f
'
{
self
.
output_dir
}
/CAMI_
{
self
.
uid
}
_output.tsv
'
,
'
w
'
)
as
outputfile
:
outputfile
.
write
(
'
gene
\t
index_in_graph
\t
cami_score
\n
'
)
for
vertex
in
cami_vlist
:
outputfile
.
write
(
f
'
{
name
[
vertex
]
}
\t
{
str
(
vertex
)
}
\t
{
cami_scores
[
vertex
]
}
\n
'
)
print
(
f
'
saved cami output in:
{
self
.
output_dir
}
/CAMI_
{
self
.
uid
}
_output.tsv
'
)
# for visualization
# transform the vertex indices to their corresponding gene names
self
.
result_gene_sets
[
'
CAMI
'
]
=
cami_genes
...
...
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