Skip to content

Exporting and publishing data

Michał Krassowski edited this page Mar 15, 2021 · 19 revisions

Prepare to export

Activate the virtual environment and enter website directory

source virtual_environment/bin/activate
cd website

Note: the path to the virtual environment may be retrieved from app.wsgi.

Choose what to export

Check what is available for export. To see categories type:

./manage.py export --help

To see what is available in mutations category use:

./manage.py export mutations --help

Export data

Run the following command to export mutations from TCGA dataset:

./manage.py export mutations --source mc3

You can restrict mutations to these which appear in primary isoforms only:

./manage.py export mutations --source mc3 --only_primary_isoforms

When the process is finished you will see a message with the location of the output file.

Publishing the data

First move the file to a directory which is hosted publicly:

mkdir -p static/exported
mv exported/<name_of_exported_file> static/exported/<name_of_exported_file>

Then login to the CMS and add an appropriate link to the "Downloads" page.

Publishing ActiveDriver inputs

./manage.py export protein_related -e sequences_ac disorder_ac sites_ac
./manage.py export mutations -s clinvar mc3 pcawg esp6500 thousand_genomes --only_primary_isoforms
./manage.py export mutations -s clinvar mc3 pcawg esp6500 thousand_genomes

Publishing PTM mutations and site-specific network

./manage.py export protein_related --exporters site_specific_network_of_kinases_and_targets
cp exported/site-specific_network_of_kinases_and_targets.tsv static/exported/
./manage.py export protein_related --exporters mc3_muts_affecting_ptm_sites pcawg_muts_affecting_ptm_sites
./manage.py export protein_related --exporters clinvar_muts_affecting_ptm_sites population_muts_affecting_ptm_sites
cp exported/*_sites.tsv static/exported/.
cd static/exported
zip all.zip *_mutations_affecting_ptm_sites.tsv site-specific_network_of_kinases_and_targets.tsv
zip clinvar_mutations_affecting_ptm_sites.tsv.zip clinvar_mutations_affecting_ptm_sites.tsv
zip mc3_mutations_affecting_ptm_sites.tsv.zip mc3_mutations_affecting_ptm_sites.tsv
zip pcawg_mutations_affecting_ptm_sites.tsv.zip pcawg_mutations_affecting_ptm_sites.tsv
zip population_mutations_affecting_ptm_sites.tsv.zip population_mutations_affecting_ptm_sites.tsv
zip site-specific_network_of_kinases_and_targets.tsv.zip site-specific_network_of_kinases_and_targets.tsv

Gene name-isoform id mapping

./manage.py export protein_related --exporters primary_isoforms

PTM-mutations with genomic coordinates:

./manage.py export mutations -s clinvar mc3 pcawg esp6500 thousand_genomes -t genomic_ptm
mv exported/mutations/genomic_ptm_* static/exported/mutations/