From 31c66167f51635dec7e5c039fcebd7db2fb1780e Mon Sep 17 00:00:00 2001 From: steve-fischer-200 Date: Wed, 23 Apr 2025 20:56:26 -0400 Subject: [PATCH 1/3] update ud meta data --- .../lib/wdk/model/records/datasetRecords.xml | 228 +++++++++++------- 1 file changed, 145 insertions(+), 83 deletions(-) diff --git a/Model/lib/wdk/model/records/datasetRecords.xml b/Model/lib/wdk/model/records/datasetRecords.xml index 4157bfb0..f8b4f0d9 100644 --- a/Model/lib/wdk/model/records/datasetRecords.xml +++ b/Model/lib/wdk/model/records/datasetRecords.xml @@ -179,7 +179,12 @@ --> - + + + + + + @@ -999,11 +1004,13 @@ Based on evolutionarily informed expectations of gene content of near-universal coalesce(dsp.display_category, dsp.category) as newcategory FROM ApidbTuning.DatasetPresenter dsp WHERE project_id = '@PROJECT_ID@' - -- UNION - -- SELECT DISTINCT - -- CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, - -- null as newcategory - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT DISTINCT + CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, + null as newcategory + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' + ]]> @@ -1016,7 +1023,8 @@ Based on evolutionarily informed expectations of gene content of near-universal SELECT DISTINCT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as newcategory - FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1042,9 +1050,11 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION select DISTINCT null as dataset_sha1_digest, - CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, + CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as dataset_display_name - from @VDI_CONTROL_SCHEMA@.availableuserdatasets d + from @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' + ]]> @@ -1060,6 +1070,37 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as dataset_display_name FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' + ]]> + + + + + + + + + + + + + + + + @@ -1190,6 +1231,7 @@ Based on evolutionarily informed expectations of gene content of near-universal , null as custom_download_tab , null as custom_download_ack FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1220,6 +1262,7 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as study_categories FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1298,6 +1341,7 @@ Based on evolutionarily informed expectations of gene content of near-universal , null , null from @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1455,6 +1499,7 @@ Based on evolutionarily informed expectations of gene content of near-universal , null , null from @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1471,6 +1516,7 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT DISTINCT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as display_name FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1496,9 +1542,10 @@ Based on evolutionarily informed expectations of gene content of near-universal LEFT JOIN apidbtuning.organismattributes oa ON dsp.name = oa.internal_abbrev || '_primary_genome_RSRC' WHERE dsp.project_id = '@PROJECT_ID@' AND dsp.category != 'Link outs' - -- UNION - -- SELECT DISTINCT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as display_name - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT DISTINCT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as display_name + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1527,9 +1574,10 @@ Based on evolutionarily informed expectations of gene content of near-universal FROM apidbtuning.datasetpresenter dsp LEFT JOIN apidbtuning.organismattributes oa ON dsp.name = oa.internal_abbrev || '_primary_genome_RSRC' WHERE dsp.project_id = '@PROJECT_ID@' - -- UNION - -- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as megabase_pairs, null as genecount - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as megabase_pairs, null as genecount + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1583,10 +1631,11 @@ Based on evolutionarily informed expectations of gene content of near-universal GROUP BY dataset_presenter_id ) dp ON dsp.dataset_presenter_id = dp.dataset_presenter_id WHERE dsp.project_id = '@PROJECT_ID@' - -- UNION - -- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, - -- CASE WHEN is_public = 1 THEN 'yes' ELSE 'no' END as is_public - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, + CASE WHEN is_public = 1 THEN 'yes' ELSE 'no' END as is_public + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1651,9 +1700,10 @@ Based on evolutionarily informed expectations of gene content of near-universal FROM apidbtuning.datasetpresenter dsp LEFT JOIN all_versions_filtered av ON dsp.dataset_presenter_id = av.dataset_presenter_id WHERE dsp.project_id = '@PROJECT_ID@' - -- UNION - -- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as genome_version, null as annotation_version, null as functional_annotation_version - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as genome_version, null as annotation_version, null as functional_annotation_version + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1730,24 +1780,24 @@ Based on evolutionarily informed expectations of gene content of near-universal FROM apidbTuning.EupathBuildDates WHERE project = '@PROJECT_ID@' ) introduced ON dsp.build_number_introduced = introduced.build_number::numeric - -- TODO: add this back - -- UNION ALL - -- SELECT CONCAT('EDAUD_', d.dataset_id) as dataset_id - -- , null as dataset_name - -- , null as dataset_name_pattern - -- , null as version - -- , d.name as short_display_name - -- , d.description - -- , d.summary::TEXT as summary - -- , null as protocol - -- , null as usage - -- , null as type - -- , null as is_species_scope - -- , null as build_number_introduced - -- , null as eupath_release - -- , null as pmids - -- , null as pmids_download - --FROM @VDI_CONTROL_SCHEMA@.dataset_meta d -- NOTE: We're reaching into VDI control and selecting from dataset_meta here. This is because availabledatasets has duplicate rows and cannot be selected "distinct"ly since we're selecting clobs. + UNION ALL + SELECT CONCAT('EDAUD_', d.dataset_id) as dataset_id + , null as dataset_name + , null as dataset_name_pattern + , null as version + , d.name as short_display_name + , d.description + , d.summary::TEXT as summary + , null as protocol + , null as usage + , null as type + , null as is_species_scope + , null as build_number_introduced + , to_char(d.release_date, 'YYYY-MON-DD') as eupath_release + , null as pmids + , null as pmids_download + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1888,7 +1938,8 @@ Based on evolutionarily informed expectations of gene content of near-universal , null as eupath_release , null as pmids , null as pmids_download - FROM @VDI_CONTROL_SCHEMA@.dataset_meta d -- NOTE: We're reaching into VDI control and selecting from dataset_meta here. This is because availabledatasets has duplicate rows and cannot be selected "distinct"ly since we're selecting clobs. + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1896,13 +1947,13 @@ Based on evolutionarily informed expectations of gene content of near-universal - + @@ -1913,11 +1964,11 @@ Based on evolutionarily informed expectations of gene content of near-universal null as owner, null as community from apidbTuning.DatasetPresenter dsp - -- UNION - -- SELECT CONCAT('EDAUD_', dataset_id) as dataset_id, - -- owner, - -- is_public as community - -- from @VDI_CONTROL_SCHEMA@.dataset + UNION + SELECT CONCAT('EDAUD_', dataset_id) as dataset_id, + owner, + is_public as community + from @VDI_CONTROL_SCHEMA@.dataset ]]> @@ -1935,12 +1986,13 @@ Based on evolutionarily informed expectations of gene content of near-universal dsp.release_policy from apidbTuning.DatasetPresenter dsp where dsp.project_id = '@PROJECT_ID@' - -- UNION - -- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id - -- , null as caveat - -- , null as acknowledgement - -- , null as release_policy - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id + , null as caveat + , null as acknowledgement + , null as release_policy + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -1978,20 +2030,15 @@ Based on evolutionarily informed expectations of gene content of near-universal AND dsc.is_primary_contact = true AND dsp.project_id = '@PROJECT_ID@' UNION --- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id --- , dc.name as contact --- , affiliation as institution --- , email --- , short_attribution --- from @VDI_CONTROL_SCHEMA@.availableuserdatasets d, @VDI_CONTROL_SCHEMA@.dataset_contact dc --- where dc.is_primary = 1 --- and dc.dataset_id = d.user_dataset_id SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id - , null as contact - , null as institution - , null as email - , null as short_attribution - FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + , dc.name as contact + , affiliation as institution + , email + , short_attribution + from @VDI_CONTROL_SCHEMA@.availableuserdatasets d, @VDI_CONTROL_SCHEMA@.dataset_contact dc + where dc.is_primary = 1 + and dc.dataset_id = d.user_dataset_id + and d.accessibility != 'private' ]]> @@ -2027,13 +2074,16 @@ Based on evolutionarily informed expectations of gene content of near-universal LEFT JOIN ApidbTuning.DatasetContact dsc ON dsp.dataset_presenter_id = dsc.dataset_presenter_id WHERE dsc.is_primary_contact = true AND dsp.project_id = '@PROJECT_ID@' - -- UNION - -- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id - -- , null as contact - -- , null as institution - -- , null as email - -- , null as short_attribution - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id + , dc.name as contact + , affiliation as institution + , email + , short_attribution + from @VDI_CONTROL_SCHEMA@.availableuserdatasets d, @VDI_CONTROL_SCHEMA@.dataset_contact dc + where dc.is_primary = 1 + and dc.dataset_id = d.user_dataset_id + and d.accessibility != 'private' ]]> @@ -2056,9 +2106,10 @@ Based on evolutionarily informed expectations of gene content of near-universal FROM apidbtuning.datasetPresenter dsp LEFT JOIN apollo_dataset ad ON dsp.dataset_presenter_id = ad.dataset_presenter_id WHERE dsp.project_id = '@PROJECT_ID@' - -- UNION - -- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, 'N/A' as in_apollo - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, 'N/A' as in_apollo + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -2083,6 +2134,7 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, project_id as project FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -2125,9 +2177,10 @@ Based on evolutionarily informed expectations of gene content of near-universal LEFT JOIN apidbtuning.organismattributes tn ON dsnt.taxon_id = tn.component_taxon_id ) t GROUP BY dataset_id - --UNION - --SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as organism_prefix - --FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as organism_prefix + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -2159,9 +2212,10 @@ Based on evolutionarily informed expectations of gene content of near-universal -- lower(substr(ENCODE(DIGEST(replace(name, '_ebi_', '_'), 'SHA1'),'hex'), 0, 10)) -- as old_dataset_id -- FROM apidbtuning.datasetpresenter where name like '%_ebi_%' - -- UNION - -- SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, CONCAT('EDAUD_', d.user_dataset_id) as old_dataset_id - -- FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + UNION + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, CONCAT('EDAUD_', d.user_dataset_id) as old_dataset_id + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -2173,6 +2227,7 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, CONCAT('EDAUD_', d.user_dataset_id) as old_dataset_id FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d + where accessibility != 'private' ]]> @@ -2354,6 +2409,13 @@ Based on evolutionarily informed expectations of gene content of near-universal FROM ApidbTuning.DatasetPresenter dsp, ApidbTuning.DatasetContact dsc WHERE dsp.dataset_presenter_id = dsc.dataset_presenter_id ORDER BY dsc.is_primary_contact desc, dsc.dataset_contact_id asc + UNION + SELECT d.name as dataset_name, CONCAT('EDAUD_', d.user_dataset_id) as dataset_id + , dc.name as contact_name + , affiliation + from @VDI_CONTROL_SCHEMA@.availableuserdatasets d, @VDI_CONTROL_SCHEMA@.dataset_contact dc + where dc.dataset_id = d.user_dataset_id + and d.accessibility != 'private' ]]> From f0f86ae8fae9038444ada12cda7292d793fef49d Mon Sep 17 00:00:00 2001 From: steve-fischer-200 Date: Mon, 28 Apr 2025 12:30:46 -0400 Subject: [PATCH 2/3] add JSON fields --- .../lib/wdk/model/records/datasetRecords.xml | 104 +++++++++--------- 1 file changed, 55 insertions(+), 49 deletions(-) diff --git a/Model/lib/wdk/model/records/datasetRecords.xml b/Model/lib/wdk/model/records/datasetRecords.xml index f8b4f0d9..28cc837d 100644 --- a/Model/lib/wdk/model/records/datasetRecords.xml +++ b/Model/lib/wdk/model/records/datasetRecords.xml @@ -423,7 +423,22 @@ + + + + + + + + + + + + +
@@ -1009,8 +1024,6 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as newcategory FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' - ]]> @@ -1024,7 +1037,6 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as newcategory FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1053,8 +1065,6 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as dataset_display_name from @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' - ]]> @@ -1070,7 +1080,6 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as dataset_display_name FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1084,23 +1093,6 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.accessibility, d.days_for_approval FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' - ]]> - - - - - - - - @@ -1231,7 +1223,6 @@ Based on evolutionarily informed expectations of gene content of near-universal , null as custom_download_tab , null as custom_download_ack FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1262,7 +1253,6 @@ Based on evolutionarily informed expectations of gene content of near-universal CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as study_categories FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1341,7 +1331,6 @@ Based on evolutionarily informed expectations of gene content of near-universal , null , null from @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1499,7 +1488,6 @@ Based on evolutionarily informed expectations of gene content of near-universal , null , null from @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1516,7 +1504,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT DISTINCT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as display_name FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1545,7 +1532,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT DISTINCT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, d.name as display_name FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1577,7 +1563,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as megabase_pairs, null as genecount FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1633,9 +1618,8 @@ Based on evolutionarily informed expectations of gene content of near-universal WHERE dsp.project_id = '@PROJECT_ID@' UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, - CASE WHEN is_public = 1 THEN 'yes' ELSE 'no' END as is_public + CASE WHEN accessibility != 'private' THEN 'yes' ELSE 'no' END as is_public FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1703,7 +1687,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as genome_version, null as annotation_version, null as functional_annotation_version FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1797,7 +1780,6 @@ Based on evolutionarily informed expectations of gene content of near-universal , null as pmids , null as pmids_download FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1939,7 +1921,6 @@ Based on evolutionarily informed expectations of gene content of near-universal , null as pmids , null as pmids_download FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -1962,12 +1943,12 @@ Based on evolutionarily informed expectations of gene content of near-universal @@ -1992,7 +1973,6 @@ Based on evolutionarily informed expectations of gene content of near-universal , null as acknowledgement , null as release_policy FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -2038,7 +2018,6 @@ Based on evolutionarily informed expectations of gene content of near-universal from @VDI_CONTROL_SCHEMA@.availableuserdatasets d, @VDI_CONTROL_SCHEMA@.dataset_contact dc where dc.is_primary = 1 and dc.dataset_id = d.user_dataset_id - and d.accessibility != 'private' ]]> @@ -2083,7 +2062,6 @@ Based on evolutionarily informed expectations of gene content of near-universal from @VDI_CONTROL_SCHEMA@.availableuserdatasets d, @VDI_CONTROL_SCHEMA@.dataset_contact dc where dc.is_primary = 1 and dc.dataset_id = d.user_dataset_id - and d.accessibility != 'private' ]]> @@ -2109,7 +2087,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, 'N/A' as in_apollo FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -2134,7 +2111,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, project_id as project FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -2171,16 +2147,26 @@ Based on evolutionarily informed expectations of gene content of near-universal FROM ( SELECT DISTINCT dsnt.dataset_presenter_id as dataset_id , CASE when tn.organism_name is null then null - ELSE REGEXP_REPLACE('Plasmodium vivax P01','^(\w*)\s(\w*)\s(\.*)','\1 \2<\I>')||'' + ELSE REGEXP_REPLACE(tn.organism_name,'^(\w*)\s(\w*)\s(\.*)','\1 \2<\I>') || '' END as org FROM apidbtuning.datasetnametaxon dsnt LEFT JOIN apidbtuning.organismattributes tn ON dsnt.taxon_id = tn.component_taxon_id ) t GROUP BY dataset_id UNION - SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, null as organism_prefix - FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' + SELECT dataset_id, + regexp_replace( + substr(string_agg(org,'
' order by org), 1, 4000) , '
[A-Za-z\. <>&]+$', '
...') AS organism_prefix + FROM ( + SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, + substr(string_agg(oa.organism_name,'
' order by org), 1, 4000) , '
[A-Za-z\. <>&]+$', '
...') AS organism_prefix + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d, + @VDI_CONTROL_SCHEMA@.dataset_organism do, + apidbtuning.organismattributes oa + where d.user_dataset_id = o.dataset_id + and do.organism_abbrev = oa.internal_abbrev + ) t + GROUP BY dataset_id ]]> @@ -2215,7 +2201,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, CONCAT('EDAUD_', d.user_dataset_id) as old_dataset_id FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -2227,7 +2212,6 @@ Based on evolutionarily informed expectations of gene content of near-universal UNION SELECT CONCAT('EDAUD_', d.user_dataset_id) as dataset_id, CONCAT('EDAUD_', d.user_dataset_id) as old_dataset_id FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets d - where accessibility != 'private' ]]> @@ -2239,6 +2223,29 @@ Based on evolutionarily informed expectations of gene content of near-universal + + + + + + + + + >'studyDesign' AS study_design, + json->>'disease' AS disease, + json->>'country' AS country, + json->>'years' AS years, + json->>'ages' AS ages, + json->>'sample_type' AS sample_type, + FROM @VDI_CONTROL_SCHEMA@.dataset_properties dp, @VDI_CONTROL_SCHEMA@.AvailableUserDatasets aud + where dp.dataset_id = aud.user_dataset_id + ]]> + + + @@ -2415,7 +2422,6 @@ Based on evolutionarily informed expectations of gene content of near-universal , affiliation from @VDI_CONTROL_SCHEMA@.availableuserdatasets d, @VDI_CONTROL_SCHEMA@.dataset_contact dc where dc.dataset_id = d.user_dataset_id - and d.accessibility != 'private' ]]> From fa0c6e3460684cffc8558eee6de9f10f4912217e Mon Sep 17 00:00:00 2001 From: steve-fischer-200 Date: Mon, 28 Apr 2025 13:30:43 -0400 Subject: [PATCH 3/3] accessibility --- Model/lib/wdk/model/records/datasetRecords.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Model/lib/wdk/model/records/datasetRecords.xml b/Model/lib/wdk/model/records/datasetRecords.xml index 28cc837d..65342c8b 100644 --- a/Model/lib/wdk/model/records/datasetRecords.xml +++ b/Model/lib/wdk/model/records/datasetRecords.xml @@ -179,10 +179,10 @@
--> - - - - + + + +