Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Ludovic PLATON
/
IRSOM
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ludovic PLATON
2018-05-09 16:01:56 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
646b068c525401d11f1942c596bb51a9f109a026
646b068c
1 parent
ec68c62b
Fix rejection
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
README.md
scripts/predict.py
README.md
View file @
646b068
...
...
@@ -61,8 +61,11 @@ To keep this files, use the parameter --keep\_features.
Default usage:
```
bash
python scripts/predict.py --featurer
=
${
path_IRSOM
}
/bin/Featurer --file
=
fasta_file.fasta --model
=
${
path_IRSOM
}
/model/species/ --output
=
output_dir_of_result
python scripts/predict.py --featurer
=
${
path_IRSOM
}
/bin/Featurer --file
=
fasta_file.fasta --model
=
${
path_IRSOM
}
/model/species/ --output
=
output_dir_of_result
[
--reject
=
${
rejection_threshold
}
]
```
The rejection threshold can be set with the option
`--reject`
.
By default there is no rejection.
As for the train script, the features are removed by default.
To keep them, use the parameter --keep
\_
features.
...
...
scripts/predict.py
View file @
646b068
...
...
@@ -28,7 +28,7 @@ from SLSOM.SOM import *
from
SLSOM.util
import
*
def
save_pred
(
som
,
data
,
data_names
,
y
,
proba
,
bmu
,
path
):
y_label
=
[
"Noncoding"
if
x
==
1
else
if
x
==
0
"Coding"
else
"Rejected"
for
x
in
y
]
y_label
=
[
"Noncoding"
if
x
==
1
else
"Coding"
if
x
==
0
else
"Rejected"
for
x
in
y
]
res
=
np
.
array
([
[
data_names
[
i
],
bmu
[
i
],
y_label
[
i
]]
+
[
proba
[
i
,
j
]
for
j
in
range
(
proba
.
shape
[
1
])]
for
i
in
range
(
data
.
shape
[
0
])])
...
...
Please
register
or
login
to post a comment