Detailed (and perhaps complementary) instructions can also be found at MGT-docs.
-
Download this code.
-
Assuming you want to set up the database now for your organism called NewBacteria, then run the following two commands:
find . -type f -exec sed -i.bak “s/Salmonella/NewBacteria/g” {} ;
find . -type f -exec sed -i.bak “s/salmonella/newBacteria/g” {} ;
Make sure you type the cases correctly.
-
Create two databases:
-
A 'default' database for storing information of users that sign up.
-
A 'newBacteria' (note the case) database for storing the species specific MGT information.
-
Define your Loci and Schemes and add to the database by following instructions in Scripts/readme.md
-
Then update the various variables in Mgt/settings.py. Some ones to pay special attention to are:
-
SECRET_KEY - a unique combination of characters only known to your we application.
-
MY_URL - your website's url
-
DATABASES - your databases connection information.
-
EMAIL_HOST_USER - your notification systems username
-
EMAIL_HOST_PASSWORD - your notification systems password
-
DEFAULT_FROM_EMAIL - your notification systems address
-
SUBDIR_REFERENCES = 'location/to/References/'
-
SUBDIR_ALLELES = 'location/to/Alleles/'
-
MEDIA_ROOT = "location/to/Uploads/"
-
Update registration templates in Home/templates/django_registration and Home/templates/registration if you want different messages to appear. Alternatively you can also turn off registration in the Mgt/settings.py file by setting REGISTRATION_OPEN=FALSE
-
Now you can run a local testing server as:
python3 manage.py runserver
- In script MgtAllele2Db/Allele_to_mgt_db.py, update dbUsername to your database username.
isolate_info = ["dbUsername",args.project,"Public",input_acc,input_acc,"","","","","","","","","","","","","","A"]
- In script MgtAllele2Db/convert_metadata.py, update dbUsername to your database username.
outstringls = ["dbUsername"]
- In script Scripts/bioentrezMetadataGet.py, update "yourRegisteredEntrezEmailId", note that the email you use has to be one you used to register with NCBI.
Entrez.email = "yourRegisteredEntrezEmailId"
- Finally, to automate the process of extracting alleles and assigning MGT, you can use set up a cron job.