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

fixing dataset bug for collections response #354

Closed
wants to merge 3 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
2 changes: 1 addition & 1 deletion beacon/api_version.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
api_version: v2.0-399a0d3
api_version: v2.0-4ee99e2
10 changes: 5 additions & 5 deletions beacon/db/cohorts.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_individuals_of_cohort(entry_id: Optional[str], qparams: RequestParams, d
limit = 100
idq="id"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_analyses_of_cohort(entry_id: Optional[str], qparams: RequestParams, dataset: str):
Expand All @@ -94,7 +94,7 @@ def get_analyses_of_cohort(entry_id: Optional[str], qparams: RequestParams, data
limit = 100
idq="biosampleId"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_variants_of_cohort(entry_id: Optional[str], qparams: RequestParams, dataset: str):
Expand All @@ -119,7 +119,7 @@ def get_variants_of_cohort(entry_id: Optional[str], qparams: RequestParams, data
limit = 100
idq="caseLevelData.biosampleId"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset

def get_runs_of_cohort(entry_id: Optional[str], qparams: RequestParams, dataset: str):
collection = 'cohorts'
Expand All @@ -143,7 +143,7 @@ def get_runs_of_cohort(entry_id: Optional[str], qparams: RequestParams, dataset:
limit = 100
idq="biosampleId"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_biosamples_of_cohort(entry_id: Optional[str], qparams: RequestParams, dataset: str):
Expand All @@ -169,7 +169,7 @@ def get_biosamples_of_cohort(entry_id: Optional[str], qparams: RequestParams, da
limit = 100
idq="id"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_filtering_terms_of_cohort(entry_id: Optional[str], qparams: RequestParams):
Expand Down
10 changes: 5 additions & 5 deletions beacon/db/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_variants_of_biosample(entry_id: Optional[str], qparams: RequestParams, d
limit = 100
idq="caseLevelData.biosampleId"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_variants_of_dataset(entry_id: Optional[str], qparams: RequestParams, dataset: str):
Expand Down Expand Up @@ -143,7 +143,7 @@ def get_variants_of_dataset(entry_id: Optional[str], qparams: RequestParams, dat
limit = 100

count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_biosamples_of_dataset(entry_id: Optional[str], qparams: RequestParams, dataset: str):
Expand All @@ -169,7 +169,7 @@ def get_biosamples_of_dataset(entry_id: Optional[str], qparams: RequestParams, d
limit = 100
idq="id"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_individuals_of_dataset(entry_id: Optional[str], qparams: RequestParams, dataset: str):
Expand All @@ -194,7 +194,7 @@ def get_individuals_of_dataset(entry_id: Optional[str], qparams: RequestParams,
limit = 100
idq="id"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def filter_public_datasets(requested_datasets_ids):
Expand Down Expand Up @@ -239,7 +239,7 @@ def get_runs_of_dataset(entry_id: Optional[str], qparams: RequestParams, dataset
limit = 100
idq="biosampleId"
count, dataset_count, docs = get_docs_by_response_type(include, query, datasets_dict, dataset, limit, skip, mongo_collection, idq)
return schema, count, dataset_count, docs
return schema, count, dataset_count, docs, dataset


def get_analyses_of_dataset(entry_id: Optional[str], qparams: RequestParams, dataset: str):
Expand Down
Loading