From fa18b47bc120f797969323ef81b78427a2ca81dc Mon Sep 17 00:00:00 2001 From: Alexis Lucattini Date: Wed, 22 Nov 2023 18:00:49 +1100 Subject: [PATCH 1/3] Rename keys for deidentified sample parameters Resolves https://github.com/umccr/cttso-ica-to-pieriandx/issues/193 --- .../lambda_code.py | 4 ++-- .../lambda_code.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_defaults_and_launch_validation_workflow/lambda_code.py b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_defaults_and_launch_validation_workflow/lambda_code.py index 344cce7..3c6857f 100644 --- a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_defaults_and_launch_validation_workflow/lambda_code.py +++ b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_defaults_and_launch_validation_workflow/lambda_code.py @@ -188,10 +188,10 @@ def lambda_handler(event, context): ) # For deidentified - we rename the external subject id as the study subject identifier else: - sample_df["study_identifier"] = sample_df["project_name"] + sample_df["study_id"] = sample_df["project_name"] sample_df = sample_df.rename( columns={ - "external_subject_id": "study_subject_identifier" + "external_subject_id": "participant_id" } ) diff --git a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_redcap_and_launch_clinical_workflow/lambda_code.py b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_redcap_and_launch_clinical_workflow/lambda_code.py index d383ed4..5aed03f 100644 --- a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_redcap_and_launch_clinical_workflow/lambda_code.py +++ b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/get_metadata_from_portal_and_redcap_and_launch_clinical_workflow/lambda_code.py @@ -303,12 +303,12 @@ def lambda_handler(event, context): "external_subject_id": "mrn" } ) - # Step 7b - for deidentified samples, use study_identified and study_subject_identifier + # Step 7b - for deidentified samples, use study_identified and participant_id else: - merged_df["study_identifier"] = merged_df["project_name"] + merged_df["study_id"] = merged_df["project_name"] merged_df = merged_df.rename( columns={ - "external_subject_id": "study_subject_identifier" + "external_subject_id": "participant_id" } ) From 181182a04c892ad75a7f6c93f66cefa48a5f1f26 Mon Sep 17 00:00:00 2001 From: Alexis Lucattini Date: Wed, 22 Nov 2023 18:02:01 +1100 Subject: [PATCH 2/3] Hacky workaround, use subject identifier to filter out NTCs --- .../lambda_code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py index d7a3510..9c6c3c8 100644 --- a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py +++ b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py @@ -242,7 +242,8 @@ def get_libraries_for_processing(merged_df) -> pd.DataFrame: " ( " " glims_needs_redcap == False " " ) " - " ) " + " ) and " + " not subject_id == 'SBJ00006' " ") ", engine="python" # Required for the isnull bit - https://stackoverflow.com/a/54099389/6946787 ) From 1585f790142adf0f669e176626a94960562abcd0 Mon Sep 17 00:00:00 2001 From: Alexis Lucattini Date: Wed, 22 Nov 2023 18:07:20 +1100 Subject: [PATCH 3/3] Updated changelog --- deploy/cttso-ica-to-pieriandx-cdk/Changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md b/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md index 0419190..046cd4d 100644 --- a/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md +++ b/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md @@ -17,6 +17,12 @@ are nested under deploy/cttso-ica-to-pieriandx-cdk. * Resolves https://github.com/umccr/cttso-ica-to-pieriandx/issues/185 * Use non-latest docker tag. (https://github.com/umccr/cttso-ica-to-pieriandx/pull/191) * Resolves https://github.com/umccr/cttso-ica-to-pieriandx/issues/190 +* Fix deidentified samples where wrong keys used for study id and participant id (https://github.com/umccr/cttso-ica-to-pieriandx/pull/194) + * Resolves https://github.com/umccr/cttso-ica-to-pieriandx/issues/193 + +### Workarounds +* Don't submit NTC samples (https://github.com/umccr/cttso-ica-to-pieriandx/pull/195) + ## 2023-11-08