populationgenomics / metamist

Sample level metadata system
MIT License
1 stars 1 forks source link

Create Test Subset Fails When epid != esid #814

Closed vivbak closed 4 weeks ago

vivbak commented 1 month ago

At the moment, if the external participant id does not match the external sample id, the script will fail with a key error.

 File "/Users/vivian/Desktop/Code/sample-metadata/scripts/create_test_subset.py", line 461, in transfer_analyses
    new_sequencing_group_id = get_new_sg_id(
  File "/Users/vivian/Desktop/Code/sample-metadata/scripts/create_test_subset.py", line 425, in get_new_sg_id
    sample_to_sg_attribute_map[peid_sid_key].get(new_sg_attributes)
KeyError: ('NA12878', 'XPGLCL85') 

It makes sense that this went unnoticed, because often these values are the same in production.