Update README.md
Browse files
README.md
CHANGED
|
@@ -9,4 +9,45 @@ tags:
|
|
| 9 |
---
|
| 10 |
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
|
| 12 |
+
# tRNA-based classification model
|
| 13 |
+
|
| 14 |
+
The dataset contains:
|
| 15 |
+
1. Generic files used for training the dataset
|
| 16 |
+
2. Supplementary data used for labeling
|
| 17 |
+
3. An HTML file with a step-by-step description of the research
|
| 18 |
+
4. Python scripts used to train the models
|
| 19 |
+
|
| 20 |
+
## Setup
|
| 21 |
+
Download Miniconda and use:
|
| 22 |
+
```bash
|
| 23 |
+
conda env create -f environment.yml
|
| 24 |
+
```
|
| 25 |
+
to replicate the working environment.
|
| 26 |
+
|
| 27 |
+
If any packages are missing during python code execution, install them manually using pip, based on import error messages.
|
| 28 |
+
|
| 29 |
+
## Steps for replication:
|
| 30 |
+
1. Download supplementary data from https://doi.org/10.7554/eLife.71402
|
| 31 |
+
2. **ftp_urls.txt** contains a list of genome download addresses (most of them are available).
|
| 32 |
+
3. Run **full.sh** to download genomes and extract features for model training from full dataset, saved as **FEATURES_ALL.ndjson** (genomes are removed to preserve memory)
|
| 33 |
+
4. Run **80_20_split_fixed.py** on **FEATURES_ALL.ndjson** together with both supplementary files to perform an automatic stratified 80/20 split, with archaeal and contaminated genomes filtered out.
|
| 34 |
+
5. Run **Mass_models.py** on **FEATURES_ALL.ndjson**, **Supp1.csv**, **Supp2.xlsx**
|
| 35 |
+
|
| 36 |
+
Run Mass_models.py using FEATURES_ALL.ndjson, Supp1.csv, and Supp2.xlsx.
|
| 37 |
+
Example run settings:
|
| 38 |
+
```python
|
| 39 |
+
python3 Mass_models.py
|
| 40 |
+
--ndjson split_dataset/subset01/
|
| 41 |
+
--supp2 Supp2.xlsx
|
| 42 |
+
--supp1 Supp1.csv
|
| 43 |
+
--outdir .
|
| 44 |
+
--train_mode both
|
| 45 |
+
--weight_mode both
|
| 46 |
+
--model all
|
| 47 |
+
--metric all
|
| 48 |
+
--n_trials 30
|
| 49 |
+
--timeout 5400
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+

|