Skip to content

Commit

Permalink
2.0.2 (start inline doc deparsing)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Oct 18, 2024
1 parent 78e1013 commit 4f60d92
Show file tree
Hide file tree
Showing 44 changed files with 653 additions and 290 deletions.
1 change: 1 addition & 0 deletions bycon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
update_rootpars_from_local_or_HOST()
rest_path_elements()
set_beacon_defaults()
arguments_set_defaults()
parse_arguments()
set_entities()
initialize_bycon_service()
Expand Down
1 change: 0 additions & 1 deletion bycon/byconServiceLibs/bycon_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
################################################################################

class ByconPlotPars:

def __init__(self):
self.plot_type = BYC_PARS.get("plot_type", "histoplot")
self.plot_defaults = BYC.get("plot_defaults", {})
Expand Down
4 changes: 2 additions & 2 deletions bycon/byconServiceLibs/datatable_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def import_datatable_dict_line(parent, fieldnames, lineobj, primary_scope="biosa
################################################################################

def create_table_header(io_params):
"""podmd
podmd"""
"""
"""
header_labs = [ ]
for par, par_defs in io_params.items():
pres = par_defs.get("prefix_split", {})
Expand Down
4 changes: 2 additions & 2 deletions bycon/byconServiceLibs/export_file_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def export_pgxseg_download(datasets_results, ds_id):
################################################################################

def write_variants_bedfile(datasets_results, ds_id):
"""podmd
"""
##### Accepts
* a Bycon `h_o` handover object with its `target_values` representing `_id`
Expand All @@ -157,7 +157,7 @@ def write_variants_bedfile(datasets_results, ds_id):
+separate configuration entry and subroutine.
* evaluate to use "bedDetails" format
podmd"""
"""
if not (local_paths := BYC.get("local_paths")):
return False
tmp_path = path.join( *local_paths[ "server_tmp_dir_loc" ])
Expand Down
8 changes: 8 additions & 0 deletions bycon/byconServiceLibs/ontology_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
)

class OntologyMaps:
"""
The `OntologyMaps` class is used to create, retrieve and store ontology maps,
i.e. the corresponding terms for codes from different ontologies or controlled
vocabularies. In the context of the Progenetix Beacon as a data-rich `bycon`
deployment, a particlular use is the mapping of codes from different cancer
related diagnostic codes, specifically from ICD-O 3 histology/topography doublets
with NCIt cancer codes.
"""
def __init__(self):
self.query = {}
self.term_groups = []
Expand Down
3 changes: 1 addition & 2 deletions bycon/config/plot_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# `bycon` package.

plot_type_defs:

histoplot:
description: >-
The default option, used to plot histograms of the CNV frequencies per
Expand Down Expand Up @@ -63,7 +63,6 @@ plot_type_defs:
#------------------------------------------------------------------------------#

plot_parameters:

# To limit the amount of pre-defined parameters accepted through the `bycon`
# interface we are using a special syntax for plot parameters. Plot parameters
# (see below for all pre-defined ones) are provided as a single string to `plotPars`
Expand Down
9 changes: 6 additions & 3 deletions bycon/config/services_entity_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cytomapper:
beacon_schema:
entity_type: cytobandMapping
schema: https://progenetix.org/services/schemas/CytobandMapping/
path_id_value_bycon_parameter: cytoBands
path_id_value_bycon_parameter: cyto_bands

endpoints:
request_entity_path_id: endpoints
Expand Down Expand Up @@ -78,6 +78,7 @@ geoLocation:

ids:
request_entity_path_id: ids
path_id_value_bycon_parameter: id

intervalFrequencies:
request_entity_path_id: intervalFrequencies
Expand Down Expand Up @@ -155,8 +156,10 @@ sampleplots:
schema: NA
path_id_value_bycon_parameter: biosample_ids

schemas:
request_entity_path_id: schemas
byconschemas:
request_entity_path_aliases:
- schemas
request_entity_path_id: byconschemas
path_id_value_bycon_parameter: id

uploader:
Expand Down
19 changes: 16 additions & 3 deletions bycon/lib/cgi_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,27 @@

################################################################################

def parse_arguments():
class ByconParameters:
def __init__(self):
self.arg_defs = BYC.get("argument_definitions", {})
self.byc_pars = {}


################################################################################

def arguments_set_defaults():
a_defs = BYC.get("argument_definitions", {})
for a, d in a_defs.items():
if "default" in d:
BYC_PARS.update({a: d["default"]})
if "local" in ENV:
if "local" in d:
if "local" in d and "local" in ENV:
BYC_PARS.update({a: d["local"]})


################################################################################

def parse_arguments():
if "local" in ENV:
args_update_form()
else:
r_m = environ.get('REQUEST_METHOD', '')
Expand Down
Loading

0 comments on commit 4f60d92

Please sign in to comment.