-
Notifications
You must be signed in to change notification settings - Fork 1
Database
MySQL
The schema is provided to get the understanding of the database structure and manipulating the SQL dump according to the schema. It is strictly not advisable to use this schema to manually create the structure in the MySQL database and should only be handled by the Django ORM using migrate scripts.
The SQL dump strictly needs to be in the given format. The ensembl dump can be easily formatted according to the required way using the script manipulate.sh residing in the root folder. The script does nothing significant other than renaming the tables to prefix it with core_. After that, it adds the column names in the Insert statements to ensure the right column names are used. The manipulate.sh can be used following the steps:
- Rename your dump to
db.sqland place in the same directory as ofmanipulate.sh. - Open the same directory in your terminal and type
./manipulate.sh. - After completion, just import the updated
db.sqlnormally to the created database
The populate_species.py script can be used to add species thumbnail, description and common name to the database once the scientific name and taxon id is populated. The script can be run:
-
Activate your environment
Go to the ecircdb-backend directory and activate the created environment
$ source <env_name>/bin/activate
-
Run shell
$ python manage.py shell
-
Run the script
Ensure that your device is connected with an active internet connection needed to download the relevant information from the Ensembl and Wikipedia
import populate_species.py
The sample fastqc quality reports need to be in the following format. However, the files can be anywhere and the corresponding path can be included in the core_sample table. But, the following format can be used for the pre-configured ensembl dump:
/ecircdb-backend/media/fastq_export/<species_common_name_in_lowercase>/QC/<sample_accession_in_lowercase>_fastqc.html
For ex.
/ecircdb-backend/media/fastq_export/dog/QC/do22633_fastqc.html
