Skip to content

Commit

Permalink
🐛 Fix SampleRelationship target ID lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
znatty22 committed Jun 12, 2024
1 parent ed6c8aa commit f1fc3e0
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions kf_lib_data_ingest/target_api_plugins/kids_first_dataservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,12 @@ def get_key_components(cls, record, get_target_id_from_record):
Sample,
{
CONCEPT.SAMPLE.ID: record[
CONCEPT.SAMPLE_RELATIONSHIP.PARENT_SAMPLE
]
CONCEPT.SAMPLE_RELATIONSHIP.PARENT_SAMPLE.ID
],
CONCEPT.SAMPLE.TARGET_SERVICE_ID: record[
CONCEPT.SAMPLE_RELATIONSHIP.PARENT_SAMPLE.TARGET_SERVICE_ID
],

},
)
),
Expand All @@ -530,8 +534,12 @@ def get_key_components(cls, record, get_target_id_from_record):
Sample,
{
CONCEPT.SAMPLE.ID: record[
CONCEPT.SAMPLE_RELATIONSHIP.CHILD_SAMPLE
]
CONCEPT.SAMPLE_RELATIONSHIP.CHILD_SAMPLE.ID
],
CONCEPT.SAMPLE.TARGET_SERVICE_ID: record[
CONCEPT.SAMPLE_RELATIONSHIP.CHILD_SAMPLE.TARGET_SERVICE_ID
],

},
)
),
Expand Down Expand Up @@ -1111,7 +1119,8 @@ class SequencingExperimentGenomicFile:
class_name = "sequencing_experiment_genomic_file"
api_path = "sequencing-experiment-genomic-files"
target_id_concept = CONCEPT.SEQUENCING_GENOMIC_FILE.TARGET_SERVICE_ID
service_id_fields = {"kf_id", "sequencing_experiment_id", "genomic_file_id"}
service_id_fields = {
"kf_id", "sequencing_experiment_id", "genomic_file_id"}

@classmethod
def get_key_components(cls, record, get_target_id_from_record):
Expand Down

0 comments on commit f1fc3e0

Please sign in to comment.