Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master to spanish-beacon #320

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions beacon/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#
# Beacon general info
#
beacon_id = 'org.ega-archive.ga4gh-approval-beacon-test' # ID of the Beacon
beacon_name = 'GA4GH Approval Beacon Test' # Name of the Beacon service
beacon_id = 'org.ega-archive.beacon-ri-demo' # ID of the Beacon
beacon_name = 'Beacon Reference Implementation demo' # Name of the Beacon service
api_version = 'v2.0.0' # Version of the Beacon implementation
uri = 'https://beacon-apis-demo.ega-archive.org/api/'

Expand Down
2 changes: 1 addition & 1 deletion beacon/db/cohorts.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_analyses_of_cohort(entry_id: Optional[str], qparams: RequestParams, data
count = get_count(client.beacon.cohorts, query)
with open("/beacon/beacon/request/cohorts.yml", 'r') as datasets_file:
datasets_dict = yaml.safe_load(datasets_file)
cohort_ids=get_cross_query(datasets_dict[entry_id],'biosampleIds','id')
cohort_ids=get_cross_query(datasets_dict[entry_id],'biosampleIds','biosampleId')
query = apply_filters(cohort_ids, qparams.query.filters, collection, {})
schema = DefaultSchemas.ANALYSES
with open("/beacon/beacon/request/datasets.yml", 'r') as datasets_file:
Expand Down
64 changes: 39 additions & 25 deletions deploy/Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
build:
docker-compose up -d --build
docker-compose up -d --build beacon permissions db
sleep 10
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.filtering_terms.deleteMany({})"'
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.analyses.deleteMany({})"'
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.biosamples.deleteMany({})"'
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.cohorts.deleteMany({})"'
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.datasets.deleteMany({})"'
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.genomicVariations.deleteMany({})"'
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.individuals.deleteMany({})"'
docker exec deploy-db-1 /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.runs.deleteMany({})"'
docker cp cancer_dataset/analyses.json deploy-db-1:tmp/analyses.json
docker cp cancer_dataset/biosamples.json deploy-db-1:tmp/biosamples.json
docker cp cancer_dataset/cohorts.json deploy-db-1:tmp/cohorts.json
docker cp cancer_dataset/datasets.json deploy-db-1:tmp/datasets.json
docker cp cancer_dataset/genomicVariations.json deploy-db-1:tmp/genomicVariations.json
docker cp cancer_dataset/individuals.json deploy-db-1:tmp/individuals.json
docker cp cancer_dataset/runs.json deploy-db-1:tmp/runs.json
docker cp cancer_dataset/filtering_terms.json deploy-db-1:tmp/filtering_terms.json
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/datasets.json --collection datasets
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/individuals.json --collection individuals
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/cohorts.json --collection cohorts
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/analyses.json --collection analyses
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/biosamples.json --collection biosamples
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/runs.json --collection runs
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/genomicVariations.json --collection genomicVariations
docker exec deploy-db-1 mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/filtering_terms.json --collection filtering_terms
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.filtering_terms.deleteMany({})"'
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.analyses.deleteMany({})"'
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.biosamples.deleteMany({})"'
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.cohorts.deleteMany({})"'
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.datasets.deleteMany({})"'
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.genomicVariations.deleteMany({})"'
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.individuals.deleteMany({})"'
docker exec rimongo /bin/bash -c 'mongo beacon -u root -p example --authenticationDatabase admin --eval "db.runs.deleteMany({})"'
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/analyses.json rimongo:tmp/analyses.json
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/biosamples.json rimongo:tmp/biosamples.json
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/cohorts.json rimongo:tmp/cohorts.json
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/datasets.json rimongo:tmp/datasets.json
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/genomicVariations.json rimongo:tmp/genomicVariations.json
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/individuals.json rimongo:tmp/individuals.json
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/runs.json rimongo:tmp/runs.json
docker cp /data/vault/bio-scratch/arnau/beacon/beacon2-ri-tools-v2_test_anot/filtering_terms.json rimongo:tmp/filtering_terms.json
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/datasets.json --collection datasets
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/individuals.json --collection individuals
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/cohorts.json --collection cohorts
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/analyses.json --collection analyses
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/biosamples.json --collection biosamples
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/runs.json --collection runs
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/genomicVariations.json --collection genomicVariations
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/filtering_terms.json --collection filtering_terms
docker cp data/analyses.json rimongo:tmp/analyses.json
docker cp data/biosamples.json rimongo:tmp/biosamples.json
docker cp data/cohorts.json rimongo:tmp/cohorts.json
docker cp data/datasets.json rimongo:tmp/datasets.json
docker cp data/genomicVariations.json rimongo:tmp/genomicVariations.json
docker cp data/individuals.json rimongo:tmp/individuals.json
docker cp data/runs.json rimongo:tmp/runs.json
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/datasets.json --collection datasets
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/individuals.json --collection individuals
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/cohorts.json --collection cohorts
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/analyses.json --collection analyses
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/biosamples.json --collection biosamples
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/runs.json --collection runs
docker exec rimongo mongoimport --jsonArray --uri "mongodb://root:[email protected]:27017/beacon?authSource=admin" --file /tmp/genomicVariations.json --collection genomicVariations
docker exec beacon python beacon/reindex.py
docker exec beacon python beacon/db/extract_filtering_terms.py
4 changes: 2 additions & 2 deletions deploy/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# Beacon general info
#
beacon_id = 'org.ega-archive.ga4gh-approval-beacon-test' # ID of the Beacon
beacon_name = 'GA4GH Approval Beacon Test' # Name of the Beacon service
beacon_id = 'org.ega-archive.beacon-ri-demo' # ID of the Beacon
beacon_name = 'Beacon Reference Implementation demo' # Name of the Beacon service
api_version = 'v2.0.0' # Version of the Beacon implementation
uri = 'https://beacon-apis-demo.ega-archive.org/api/'

Expand Down
115 changes: 0 additions & 115 deletions deploy/data/cohorts_av.json

This file was deleted.

79 changes: 0 additions & 79 deletions deploy/data/datasets_av.json

This file was deleted.

Loading
Loading