Skip to content

Commit

Permalink
For now, create_test_subset.py copies only the primary external_id
Browse files Browse the repository at this point in the history
[TODO] In future we will represent the extra external_ids in GraphQLSample
too and be able to copy all of them.
  • Loading branch information
jmarshall committed Jun 13, 2024
1 parent 417bd12 commit 6b1e633
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/create_test_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

DEFAULT_SAMPLES_N = 10

PRIMARY_EXTERNAL_ORG = ''

QUERY_ALL_DATA = gql(
"""
query getAllData($project: String!, $sids: [String!]) {
Expand Down Expand Up @@ -297,7 +299,7 @@ def transfer_samples_sgs_assays(
existing_pid = upserted_participant_map[s['participant']['externalId']]

sample_upsert = SampleUpsert(
external_id=s['externalId'],
external_ids={PRIMARY_EXTERNAL_ORG: s['externalId']},
type=sample_type or None,
meta=(copy_files_in_dict(s['meta'], project) or {}),
participant_id=existing_pid,
Expand Down

0 comments on commit 6b1e633

Please sign in to comment.