Skip to content

Commit

Permalink
Merge pull request #48 from BackofenLab/input
Browse files Browse the repository at this point in the history
fixed eval call
  • Loading branch information
teresa-m authored Nov 24, 2022
2 parents ebf4495 + 6eb2cd6 commit b85f6e6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,33 @@ Throughout the program, several output files are generated and stored in the fol
#### Validate your model using the **eval** mode
You can also use CheRRIs **eval** mode to create a validation result table and than use the [compute_f1](./scripts/plots/compute_f1.py) to get the F1 score.

In the following is a example call to validate a theoretical model build from DataA
In the following is a example call to validate a theoretical model build from DataA with data form a different source e.g. DataB
```
cherri eval -i1 /path/to/Model_folder/DataA/feature_files/feature_filtered_<DataA>_context_<150>_pos_occ -g human -l human -o /path/to/Model_folder -n <val_modelA> -c 150 -st on -m /path/to/Model_folder/DataA/model/optimized/full_<DataA>_context_<150>.model -mp /path/to/Model_folder/DataA/feature_files/training_data_<DataA>_context_<150>.npz -j 10 -on evaluation -hf on
cherri eval -i1 /path/to/Model_folder/Datab/feature_files/feature_filtered_<DataB>_context_<150>_pos_occ -g human -l human -o /path/to/Model_folder -n <eval_modelA_using_DataB> -c 150 -st on -m /path/to/Model_folder/DataA/model/optimized/full_<DataA>_context_<150>.model -mp /path/to/Model_folder/DataA/feature_files/training_data_<DataA>_context_<150>.npz -j 10 -on evaluation -hf on
```

In the following is a example call to cross validate a theoretical model build from DataA. The biofilm-cv will split the data into 5 parts used 4 to retrain a model and the left out to evaluate.


```
python -m biofilm.biofilm-cv --infile /path/to/Model_folder/DataA/feature_files/training_data_<DataA>_context_<150>.npz --foldselect 0 --model /path/to/Model_folder/DataA/model/optimized/full_<DataA>_context_<150>.model --out /path/to/Model_folder
```

```
python -m biofilm.biofilm-cv --infile /path/to/Model_folder/DataA/feature_files/training_data_<DataA>_context_<150>.npz --foldselect 1 --model /path/to/Model_folder/DataA/model/optimized/full_<DataA>_context_<150>.model --out /path/to/Model_folder
```
```
python -m biofilm.biofilm-cv --infile /path/to/Model_folder/DataA/feature_files/training_data_<DataA>_context_<150>.npz --foldselect 2 --model /path/to/Model_folder/DataA/model/optimized/full_<DataA>_context_<150>.model --out /path/to/Model_folder
```
```
python -m biofilm.biofilm-cv --infile /path/to/Model_folder/DataA/feature_files/training_data_<DataA>_context_<150>.npz --foldselect 3 --model /path/to/Model_folder/DataA/model/optimized/full_<DataA>_context_<150>.model --out /path/to/Model_folder
```
```
python -m biofilm.biofilm-cv --infile /path/to/Model_folder/DataA/feature_files/training_data_<DataA>_context_<150>.npz --foldselect 4 --model /path/to/Model_folder/DataA/model/optimized/full_<DataA>_context_<150>.model --out /path/to/Model_folder
```



Than use the result file to compute the F1 score using [compute_f1](./scripts/plots/compute_f1.py).

### Build a new CheRRI model in training mode
Expand Down
2 changes: 1 addition & 1 deletion bin/cherri
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ from ubergauss.tools import loadfile, dumpfile

#logging.basicConfing(filenema='cherri.log'level=logging.DEBUG)

__version__ = "0.6"
__version__ = "0.7"

"""
Expand Down
2 changes: 1 addition & 1 deletion bin/find_occupied_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def main():

if len(replicates) == 1:
print('Info: only one experiment is used to build occupied regions')
in_file = replicates[0]
in_file = input_path_RRIs + replicates[0]
print(in_file)
# df_replicat = rl.read_chira_data(in_file)
sep = rl.check_file_type(in_file)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name='cherri',
version='0.6',
version='0.7',
description='Cherri is a tool for classification of RNA-RNA interactions.',
long_description=readme,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit b85f6e6

Please sign in to comment.