Skip to content

Commit

Permalink
Fixed engine parameter mid path issue
Browse files Browse the repository at this point in the history
* Since we use centralise location for root directory
  mid path need to be specific enough to avoid clashes
  • Loading branch information
victorskl committed Aug 27, 2021
1 parent b9f8eca commit 33860d4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 3 additions & 1 deletion data_processors/pipeline/lambdas/dragen_tso_ctdna.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def handler(event, context) -> dict:
)

subject_id = metadata_srv.get_subject_id_from_library_id(library_id)
workflow_engine_parameters = wfl_helper.get_engine_parameters(subject_id)
# NOTE: event['tso500_sample']['sample_id'] is already in the form of sample_id + "_" + library_id
mid_path = subject_id + "/" + event['tso500_sample']['sample_id']
workflow_engine_parameters = wfl_helper.get_engine_parameters(mid_path)

wfl_run = wes_handler.launch({
'workflow_id': workflow_id,
Expand Down
3 changes: 2 additions & 1 deletion data_processors/pipeline/lambdas/dragen_wgs_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def handler(event, context) -> dict:
)

subject_id = metadata_srv.get_subject_id_from_library_id(library_id)
workflow_engine_parameters = wfl_helper.get_engine_parameters(subject_id)
mid_path = subject_id + "/" + library_id
workflow_engine_parameters = wfl_helper.get_engine_parameters(mid_path)

wfl_run = wes_handler.launch({
'workflow_id': workflow_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_handler(self):

workflow: dict = dragen_tso_ctdna.handler({
"tso500_sample": {
"sample_id": "sample_id",
"sample_id": "PRJ000001_L0000001",
"sample_name": "sample_name",
"sample_type": "DNA",
"pair_id": "sample_name"
Expand Down
4 changes: 2 additions & 2 deletions data_processors/pipeline/lambdas/tests/test_dragen_wgs_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ def test_handler(self):
when(metadata_srv).get_subject_id_from_library_id(...).thenReturn("SBJ0001")

workflow: dict = dragen_wgs_qc.handler({
"library_id": "SAMPLE_NAME",
"library_id": "L0000001",
"fastq_list_rows": [
{
"rgid": "index1.index2.lane",
"rgsm": "sample_name",
"rglb": "sample_library",
"rglb": "L0000001",
"lane": 1,
"read_1": {
"class": "File",
Expand Down
4 changes: 2 additions & 2 deletions data_processors/pipeline/lambdas/tests/test_tumor_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_handler(self):
"fastq_list_rows": [{
"rgid": "index1.index2.lane",
"rgsm": "sample_name",
"rglb": "UnknownLibrary",
"rglb": "L0000001",
"lane": 1,
"read_1": {
"class": "File",
Expand All @@ -32,7 +32,7 @@ def test_handler(self):
"tumor_fastq_list_rows": [{
"rgid": "index1.index2.lane",
"rgsm": "sample_name",
"rglb": "UnknownLibrary",
"rglb": "L0000002",
"lane": 1,
"read_1": {
"class": "File",
Expand Down
6 changes: 5 additions & 1 deletion data_processors/pipeline/lambdas/tumor_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def handler(event, context) -> dict:
tumor_fastq_list_rows = event['tumor_fastq_list_rows']
sample_name = event['sample_name']

normal_library_id = fastq_list_rows[0]['rglb']
tumor_library_id = tumor_fastq_list_rows[0]['rglb']

# Set workflow helper
wfl_helper = SecondaryAnalysisHelper(WorkflowType.TUMOR_NORMAL)

Expand Down Expand Up @@ -171,7 +174,8 @@ def handler(event, context) -> dict:

# If no running workflows were found, we proceed to preparing and kicking it off
workflow_run_name = wfl_helper.construct_workflow_name(subject_id=subject_id)
workflow_engine_parameters = wfl_helper.get_engine_parameters(subject_id)
mid_path = subject_id + "/" + tumor_library_id + "_" + normal_library_id
workflow_engine_parameters = wfl_helper.get_engine_parameters(mid_path)

wfl_run = wes_handler.launch({
'workflow_id': workflow_id,
Expand Down

0 comments on commit 33860d4

Please sign in to comment.