Machine learning methods to predict the anti-microbial resistance of Salmonella.
git clone https://github.com/superphy/AMR_Predictor.git
)conda env create -f data/envi.yaml
If you do not have your own MIC labels and would like to use ours (from NCBI SRA May 2019) skip to step 5
If you only want predictions with no evaluations, remove predict/mic_labels.xlsx and skip to step 6
If you have your own mic labels, proceed with step 4
In mic_labels.xlsx the names of the genomes need to be in a column titled run and the MIC values need to be in columns labeled like MIC_AMP, MIC_AMC, etc
See predict/mic_labels.xlsx for acceptable MIC formats
snakemake -s predict/mic_clean.smk
snakemake -j X -s predict/predict.smk
where X is the number of cores you wish to usegit clone https://github.com/superphy/AMR_Predictor.git
)conda env create -f data/envi.yaml
source activate skmer
Run the following command, where 'X' is the number of cores you wish to use
snakemake -j X
Run the following command to run all of the tests
snakemake -s src/run_tests.smk
or
snakemake -s src/run_XGB_SVM_tests_slurm.smk && hyperas.smk
(if using slurm)
all_data_figures.py all
to save all the results as figuresFigures can be found in figures/
To find the results of an individual test, run result_grabber.py --help
run model.py with the -i flag, e.g. python src/model.py -x public -f 1000 -a AMP -i
Set the parameters in annotation/annotate.smk
run snakemake -j X -s annotation/annotate.smk
The resulting annotations and the location of the most import regions to the machine learning models can be found in annotation/
If you do not want to run all tests in step 8 above, run src/model.py --help
to see how to run the model for a specific set of parameters.