From ece7a615b2c13dedc1c3cdca06f92f714023a5b4 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 19 May 2025 10:48:21 -0500 Subject: Rework order of execution of potential steps. --- scripts/load_phenotypes_to_db.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py index 378497f..d31ade6 100644 --- a/scripts/load_phenotypes_to_db.py +++ b/scripts/load_phenotypes_to_db.py @@ -139,16 +139,16 @@ def load_data(conn, job): # b. Save all the data items (DataIds are vibes), return new IDs data = save_phenotypes_data( cursor, dataidmap, samples, , _control_data["pheno"]) - # c. If standard errors and N exist, save them too - # (use IDs returned in `b` above). + # 4. Cross-reference Phenotype, Publication, and PublishData in PublishXRef + xrefs = cross_reference_phenotypes_publications_and_data( + cursor, __merge_map_with_publications__(dataidmap)) + # 5. If standard errors and N exist, save them too + # (use IDs returned in `3. b.` above). data_se = save_phenotypes_data( cursor, dataidmap, samples, , _control_data["phenose"]) data_n = save_phenotypes_n( cursor, dataidmap, samples, , _control_data["phenonum"]) - # 4. Cross-reference Phenotype, Publication, and PublishData in PublishXRef - xrefs = cross_reference_phenotypes_publications_and_data( - cursor, __merge_map_with_publications__(dataidmap)) - # 5. If entirely new data, update authorisations (break this down) + # 6. If entirely new data, update authorisations (break this down) update_auth(_user, _species, _population, _dataset, _phenos) return 0 -- cgit v1.2.3