Commit eec5332a authored by jdhayhurst's avatar jdhayhurst

adding links options

parent 235b547d
Pipeline #59385 passed with stages
in 6 minutes and 21 seconds
......@@ -135,7 +135,7 @@ def _add_gwas_catalog_href(info_array, study_accession):
return info_array
def _get_array_to_display(datasets, variant=None, chromosome=None, paginate=True):
def _get_array_to_display(datasets, variant=None, chromosome=None, paginate=True, links=False):
if datasets is None: return {}
if len(datasets[REFERENCE_DSET]) <= 0: return {}
......@@ -174,7 +174,7 @@ def _get_array_to_display(datasets, variant=None, chromosome=None, paginate=True
element_info['gene_id'] = gene
element_info['tissue'] = tissue
if paginate:
if paginate or links:
element_info['_links'] = {'self': _create_href(method_name='api.get_chromosome_variants',
params={'variant_id': specific_variant, 'study_accession': datasets[STUDY_DSET][index],
'chromosome': specific_chromosome})}
......@@ -322,9 +322,10 @@ def _get_basic_arguments(args):
study = _retrieve_endpoint_arguments(args, "study", None)
trait = _retrieve_endpoint_arguments(args, "molecular_trait_id", None)
paginate = argu.str2bool(_retrieve_endpoint_arguments(args, "paginate", True))
links = argu.str2bool(_retrieve_endpoint_arguments(args, "links", False))
qtl_group = _retrieve_endpoint_arguments(args, "qtl_group", None)
return start, size, p_lower, p_upper, pval_interval, quant_method, snp, tissue, gene, study, trait, paginate, qtl_group
return start, size, p_lower, p_upper, pval_interval, quant_method, snp, tissue, gene, study, trait, paginate, links, qtl_group
def _get_start_size(args):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment