-
Notifications
You must be signed in to change notification settings - Fork 1
7. Helper scripts
Several helper scripts have been written to aid in metabolic modelling tasks and data processing, located in helper_scripts directory.
This script will improve the annotations and metadata tagging of metabolic model reactions and metabolites using a reference model of high quality. For most cases, this is the universal.json. For an updated universal.json compatible with modern releases of COBRApy, see here
- The script takes input directory containing metabolic model file/s and reference model file (model file formats:
.xml,.json,.sbml) - Convert model file to the
.xmlSBML v3.1 format - Use the reference model and the universal model to improve the annotations of the input model
- MEMOTE reports will be generated for the pre- and post-annotation model files for comparison.
python improve_model_annotations.py --models model_directory --reference reference/iWFL1372_iML1515_iYS1720.json
- cobra=0.20.0
- memote=0.13.0
- urllib3=1.26.3
- python=3.6
The best way to install this is to access the script this directory and run the script directly in command line.
# Create conda environment
conda create -y --name metabolic_model_env python=3.6.12
# Activate environment
conda activate metabolic_model_env
# Install dependancies
conda install -y -c bioconda cobra=0.20.0
conda install -y -c conda-forge urllib3
pip install memote==0.13.0
# Test script
python improve_model_annotations.py -h
improve_model_annotations.py [-h] -m MODELS -r REFERENCE [-y YA_NAME]
required arguments:
-m MODELS, --models MODELS
Directory of model files to be annotated
-r REFERENCE, --reference REFERENCE
Reference model file annotations will be copied from. Reference model provided (iWFL1372_iML1515_iYS1720.json). Can also use BiGG Universal model found
here: https://zenodo.org/record/6713279
optional arguments:
-y YA_NAME, --ya_name YA_NAME
What is ya name?
The better the reference model you use, the better your model annotations will likely be. The iWFL1372_iML1515_iYS1720.json model is a merged model of iWFL1372, iML1515 and iYS1720, all of which are well-curated and have good model annotations. The universal.json model is another great choice.
This script takes a directory containing .tsv files from the Bactabolize fba command and merges them together into a longtable format for analysis in a program like R.
- The script takes input directory of growth profile files (file format:
.tsv) - Merges together with column header
- Outputs new file
fba_profiles_merged_longtable.tsv
bash merge_fba_profiles_longtable.sh -f fba_profiles_directory
- unix environment with basename, dirname and getopts
The best way to install this is to access the script this directory and run the script directly in command line.
# bash merge_fba_profiles_longtable.sh [-h] -f fba_profiles_directory
Command line options:
Required:
-f Directory containing FBA profiles outputted from Bactabolize's fba command. Files in .tsv format.
Optional:
-h Print this help menu
Example:
bash merge_fba_profiles_longtable.sh -f fba_profiles_directory
This script will do a string replace from "cpd00007" (SEED ID) to "o2" (BiGG ID) for oxygen so models can be initialised and FBA, single gene knockout analysis etc performed. ModelSEED and KBase models will not effectively run in Bactabolize. This is because it utilises the BiGG ID for oxygen (o2_c, o2_p and o2_e).
- The script takes input metabolic model file/s (model file formats:
.xml,.json) - String replace for SEED IDs incompatible with Bactabolize
- Outputs new file which can be used with Bactabolize's main functions
bash SEED_to_BiGG_model_convert.sh -m input.xml
- unix environment with basename, dirname and getopts
The best way to install this is to access the script this directory and run the script directly in command line.
bash SEED_to_BiGG_model_convert.sh [-h] -m model.xml
Command line options:
Required:
-m Model file to be converted. Takes .xml or .json
Optional:
-h Print this help menu
Example:
bash SEED_to_BiGG_model_convert.sh -m model.xml
bash SEED_to_BiGG_model_convert.sh -m model.json