Ludovic PLATON

Fix rejection

...@@ -61,8 +61,11 @@ To keep this files, use the parameter --keep\_features. ...@@ -61,8 +61,11 @@ To keep this files, use the parameter --keep\_features.
61 61
62 Default usage: 62 Default usage:
63 ``` bash 63 ``` bash
64 -python scripts/predict.py --featurer=${path_IRSOM}/bin/Featurer --file=fasta_file.fasta --model=${path_IRSOM}/model/species/ --output=output_dir_of_result 64 +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}]
65 ``` 65 ```
66 66
67 +The rejection threshold can be set with the option `--reject`.
68 +By default there is no rejection.
69 +
67 As for the train script, the features are removed by default. 70 As for the train script, the features are removed by default.
68 To keep them, use the parameter --keep\_features. 71 To keep them, use the parameter --keep\_features.
......
...@@ -28,7 +28,7 @@ from SLSOM.SOM import * ...@@ -28,7 +28,7 @@ from SLSOM.SOM import *
28 from SLSOM.util import * 28 from SLSOM.util import *
29 29
30 def save_pred(som,data,data_names,y,proba,bmu,path): 30 def save_pred(som,data,data_names,y,proba,bmu,path):
31 - y_label = ["Noncoding" if x==1 else if x==0 "Coding" else "Rejected" for x in y] 31 + y_label = ["Noncoding" if x==1 else "Coding" if x==0 else "Rejected" for x in y]
32 res = np.array([ 32 res = np.array([
33 [data_names[i],bmu[i],y_label[i]]+[proba[i,j] for j in range(proba.shape[1])] 33 [data_names[i],bmu[i],y_label[i]]+[proba[i,j] for j in range(proba.shape[1])]
34 for i in range(data.shape[0])]) 34 for i in range(data.shape[0])])
......