Skip to content

Exporting and publishing data

krassowski edited this page Jun 9, 2017 · 19 revisions

Prepare to export

Activate the virtual environment and enter website directory

source virtual_environment/bin/activate
cd website

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 following command to export mutations from TCGA dataset:

./manage.py export mutations --source cancer

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

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

When the process is finished you will see a message with 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 appropriate link to "Downloads" page.

Example: publishing PTM mutations and site-specific network

./manage.py export protein_related --exporters site_specific_network_of_kinases_and_targets
mv exported/site-specific_network_of_kinases_and_targets.tsv static/exported/
./manage.py export protein_related --exporters mc3_muts_affecting_ptm_sites
./manage.py export protein_related --exporters clinvar_muts_affecting_ptm_sites population_muts_affecting_ptm_sites
mv exported/*_sites.tsv static/exported/.
zip all.zip *_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 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