From b9b2e4f37ac5b250d53ba30c08d94bf38d89c2dd Mon Sep 17 00:00:00 2001 From: Andrew Madonna Date: Mon, 16 Jan 2017 10:08:15 -0500 Subject: [PATCH] Update mudations file url and fix docker compose --- api/management/commands/acquiredata.py | 2 +- api/management/commands/loaddata.py | 4 ++++ docker-compose.yml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/management/commands/acquiredata.py b/api/management/commands/acquiredata.py index d06ccb9..d6c3e3c 100644 --- a/api/management/commands/acquiredata.py +++ b/api/management/commands/acquiredata.py @@ -35,5 +35,5 @@ def handle(self, *args, **options): mutation_path = os.path.join(options['path'], 'mutation-matrix.tsv.bz2') if not os.path.exists(mutation_path): - mutation_url = 'https://ndownloader.figshare.com/files/5864862' + mutation_url = 'https://ndownloader.figshare.com/files/7311953' urlretrieve(mutation_url, mutation_path) diff --git a/api/management/commands/loaddata.py b/api/management/commands/loaddata.py index 06c22ad..94e4790 100644 --- a/api/management/commands/loaddata.py +++ b/api/management/commands/loaddata.py @@ -20,6 +20,7 @@ def add_arguments(self, parser): def handle(self, *args, **options): # Diseases if Disease.objects.count() == 0: + print('Loading diseases table...') disease_path = os.path.join(options['path'], 'diseases.tsv') with open(disease_path) as disease_file: disease_reader = csv.DictReader(disease_file, delimiter='\t') @@ -34,6 +35,7 @@ def handle(self, *args, **options): # Samples if Sample.objects.count() == 0: + print('Loading samples table...') sample_path = os.path.join(options['path'], 'samples.tsv') with open(sample_path) as sample_file: sample_reader = csv.DictReader(sample_file, delimiter='\t') @@ -51,6 +53,7 @@ def handle(self, *args, **options): # Genes if Gene.objects.count() == 0: + print('Loading genes table...') gene_path = os.path.join(options['path'], 'genes.tsv') with open(gene_path) as gene_file: gene_reader = csv.DictReader(gene_file, delimiter='\t') @@ -70,6 +73,7 @@ def handle(self, *args, **options): # Mutations if Mutation.objects.count() == 0: + print('Loading mutations table...') mutation_path = os.path.join(options['path'], 'mutation-matrix.tsv.bz2') with bz2.open(mutation_path , 'rt') as mutation_file: mutation_reader = csv.DictReader(mutation_file, delimiter='\t') diff --git a/docker-compose.yml b/docker-compose.yml index b1d7f57..123aa03 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: image: postgres core: build: . - command: bash -c "python manage.py makemigrations genes && python manage.py makemigrations organisms && python manage.py migrate && python manage.py runserver 0.0.0.0:8000" + command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000" volumes: - .:/code ports: