SNP-Ranger is a Python tool for functional SNP analysis.
Given a GBK annotation file and the output from the SNP exporter tool in Mauve, SNP-ranger identifies whether an SNP falls within the range of annotated features.
This method streamlines the process of identifying functionally relevant SNPs while reducing the likelihood of reporting SNPs from contaminants.
SNP-Ranger requires two inputs:
- The reference (or first) GBK file used for progressiveMauve alignment.
- The SNP export file generated by Mauve.
SNP-Ranger generates a plain text output listing SNPs along with their parent nodes, relative positions, and annotations.
It excludes SNPs outside the range of annotated tRNA, rRNA, or CDS regions. If an SNP is found in an unannotated region, the script will notify the user for further investigation.
The tool can be run through a gui interface, via the following:
-
Step 1 - Clone this repo
git clone https://github.com/camilla-eldridge/SNP-Ranger.git -
Step 2 - Navigate into the repo directory and run:
python gui.py -
Step 3 - Use the Browse feature to find your input files. Remember to select the first gbk file that was selected during ProgressiveMauve alignment.
-
Step 4 - Click on Find my SNPs!
Once run you should see text output as below, indicating which SNPs were located within an annotated range.
The snp_ranger script can be run on the command line using the following command:
snp_ranger.py Exported_SNPS.txt first_gbk_file > snps.txt The following Python 3 modules are required:
sysregextypingtkinter
- This script was tested using GBK files generated by Prokka v1.7.
- Ensure the alignment is correctly interpreted — SNPs may arise from annotated regions of contaminant species aligning or misannotations between reference and target genomes.
This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). You are free to share and adapt this code, provided you credit the original author and indicate any modifications made.
