From d75d494fc922fc7eac679d93ec7a358020df0010 Mon Sep 17 00:00:00 2001 From: steve-fischer-200 Date: Mon, 28 Apr 2025 13:19:19 -0400 Subject: [PATCH 1/2] update user dataset meta info --- .../lib/wdk/model/records/datasetRecords.xml | 124 +++++++++++++----- 1 file changed, 89 insertions(+), 35 deletions(-) diff --git a/Model/lib/wdk/model/records/datasetRecords.xml b/Model/lib/wdk/model/records/datasetRecords.xml index 56c1a198..e140cb43 100644 --- a/Model/lib/wdk/model/records/datasetRecords.xml +++ b/Model/lib/wdk/model/records/datasetRecords.xml @@ -285,7 +285,7 @@ while in protected and private studies there will be human intervention in the d - + @@ -429,7 +429,22 @@ OR if the linkName and or URL require access to other attributes....also how to + + + + + + + + + + + + +
@@ -1082,6 +1097,19 @@ Based on evolutionarily informed expectations of gene content of near-universal + + + + + + + + @@ -1335,8 +1363,6 @@ where mystudies.dataset_id = dp.dataset_presenter_id - - @@ -1633,7 +1659,7 @@ where mystudies.dataset_id = dp.dataset_presenter_id where dsp.dataset_presenter_id = dp.dataset_presenter_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 ]]> @@ -1940,7 +1966,7 @@ select dsp.dataset_presenter_id as dataset_id, @@ -1949,12 +1975,12 @@ select dsp.dataset_presenter_id as dataset_id, @@ -2012,20 +2038,14 @@ select dsp.dataset_presenter_id as dataset_id, where dsp.dataset_presenter_id = dsc.dataset_presenter_id (+) and dsc.is_primary_contact = 1 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 ]]> @@ -2061,20 +2081,14 @@ select dsp.dataset_presenter_id as dataset_id, where dsp.dataset_presenter_id = dsc.dataset_presenter_id (+) and dsc.is_primary_contact = 1 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 ]]> @@ -2170,8 +2184,25 @@ from apidbtuning.datasetnametaxon dsnt ) 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 +SELECT dataset_id, + REGEXP_REPLACE( + SUBSTR( + LISTAGG(org, '
') WITHIN GROUP (ORDER BY org), 1, 4000 + ), + '
[A-Za-z\. <>&]+$', '
...' + ) AS organism_prefix +FROM ( + SELECT DISTINCT 'EDAUD_' || aud.user_dataset_id AS dataset_id, + CASE + WHEN oa.organism_name IS NULL THEN NULL + ELSE REGEXP_REPLACE(oa.organism_name, '^(\w*)\s(\w*)\s(\.*)', '\1 \2') || '' + END AS org + FROM @VDI_CONTROL_SCHEMA@.availableuserdatasets aud + LEFT JOIN @VDI_CONTROL_SCHEMA@.dataset_organism dd ON aud.user_dataset_id = dd.dataset_id + LEFT JOIN apidbtuning.organismattributes oa ON dd.organism_abbrev = oa.internal_abbrev + ) t +GROUP BY dataset_id; + ]]> @@ -2246,6 +2277,29 @@ from apidbtuning.datasetnametaxon dsnt + + + + + + + + + + + + From 8447015fe588b046e2ec186c14259091a739c627 Mon Sep 17 00:00:00 2001 From: steve-fischer-200 Date: Mon, 28 Apr 2025 13:30:05 -0400 Subject: [PATCH 2/2] accessibility --- Model/lib/wdk/model/records/datasetRecords.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Model/lib/wdk/model/records/datasetRecords.xml b/Model/lib/wdk/model/records/datasetRecords.xml index e140cb43..a48f677c 100644 --- a/Model/lib/wdk/model/records/datasetRecords.xml +++ b/Model/lib/wdk/model/records/datasetRecords.xml @@ -179,6 +179,11 @@ --> + + + + +