Skip to content

Add biobank merge code#1304

Merged
mandawilson merged 8 commits into
knowledgesystems:masterfrom
callachennault:biobank-merge
Jun 18, 2026
Merged

Add biobank merge code#1304
mandawilson merged 8 commits into
knowledgesystems:masterfrom
callachennault:biobank-merge

Conversation

@callachennault

@callachennault callachennault commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

For msk_solid_heme and msk_archer, the following steps have been added:

  1. merge data_clinical_patient_biobank into data_clinical_patient, remove data_clinical_patient_biobank
  2. data_timeline_biobank_specimen and ALIQUOT_STATUS now included in study import

questions:

  • maybe for curation - should data_clinical_patient_biobank be a standalone file or should it be merged into data_clinical_patient?
  • to discuss - if merged - what should happen if merging data_clinical_patient_biobank and data_clinical_patient fails?

TODO

  • test this code with an import into triage

@callachennault callachennault marked this pull request as ready for review February 26, 2026 20:54
Move biobank download/merge into fetch-dmp-data-for-import.sh with best-effort aws s3 cp so a missing biobank file does not abort the import, and set BIOBANK_SKIPPED flags when biobank data is omitted.
Extract return-based try_upload_to_s3 and try_download_from_s3 so biobank fetch can skip failed downloads without changing existing upload_to_s3 and download_from_s3 behavior.
Remove unused BIOBANK_SKIPPED flags and the download_biobank_file_from_s3 wrapper; document rm/touch before biobank downloads in merge_biobank_clinical_data.
Merge biobank clinical data when the file is already present from downloadFromS3AllStudies; keep timeline on clinical merge failure and clean up the merged file only when combine fails.
Comment thread import-scripts/s3_functions.sh
# Files not in S3 will be removed from the local destination (for directories)
# PATH_TO_OVERWRITE must end in PATH_IN_S3 (if provided), and cannot be "/"
function download_from_s3() {
if ! try_download_from_s3 "$1" "$2" "$3"; then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above - would document args

Add Args blocks to upload_to_s3, download_from_s3, and the try_* wrappers so callers can see path, S3 prefix, and bucket parameters.
@mandawilson mandawilson merged commit f52cf18 into knowledgesystems:master Jun 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants