From 8b5a1072842306a3ab0d9c15ab79f9dd18b9ff3a Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Tue, 9 Dec 2025 10:34:58 -0500
Subject: [PATCH 01/66] fix tuning table syntax errors
---
Model/lib/xml/tuningManager/apiTuningManager.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index 42d8cba58..b7c2e2767 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -1588,14 +1588,14 @@ create index Organism_projectId_idx&1 ON OrganismAttributes&1 (project_id, sourc
@@ -2313,7 +2313,7 @@ create index Organism_projectId_idx&1 ON OrganismAttributes&1 (project_id, sourc
-
+
Text for PreferredProduct table on gene record page.
@@ -2453,7 +2453,7 @@ create index Organism_projectId_idx&1 ON OrganismAttributes&1 (project_id, sourc
-
+
all products for each gene
From 46f440f53489a7a9d0c1e593d3fbd4234e59a07d Mon Sep 17 00:00:00 2001
From: Steve <43149795+steve-fischer-200@users.noreply.github.com>
Date: Tue, 9 Dec 2025 12:25:51 -0500
Subject: [PATCH 02/66] fix intronjunction queries (#130)
---
.../model/questions/params/organismParams.xml | 2 +-
.../model/questions/queries/geneQueries.xml | 15 ++++++----
.../model/questions/queries/spanQueries.xml | 19 +++++++-----
.../records/junctionAttributeQueries.xml | 6 ++--
Model/lib/xml/jbrowse/genomeQueries.xml | 30 +++++++++----------
5 files changed, 39 insertions(+), 33 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 1a88a696c..8438fe595 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -391,7 +391,7 @@
WITH FilterQuery AS (
SELECT DISTINCT ga.organism, ga.org_abbrev
- FROM apidbtuning.geneintronjunction gij, apidbtuning.GeneAttributes ga
+ FROM webready.geneintronjunction_p gij, apidbtuning.GeneAttributes ga
WHERE ga.source_id = gij.gene_source_id
)
/* end filter query */
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index 4b3d7b36a..842b89d16 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -2176,7 +2176,7 @@
, gij.total_unique
, gij.total_isrpm
, gij.annotated_intron
- FROM apidbtuning.geneintronjunction gij, webready.TranscriptAttributes_p ga
+ FROM webready.geneintronjunction_p gij, webready.TranscriptAttributes_p ga
WHERE ga.na_sequence_id = gij.na_sequence_id
AND (
gij.segment_end BETWEEN ga.start_min - $$max_flanking_bp$$ AND ga.end_max + $$max_flanking_bp$$
@@ -2186,6 +2186,7 @@
AND gij.total_unique >= $$min_total_unique$$
AND gij.taxon_id = ga.taxon_id
AND ga.org_abbrev IN ($$organism$$)
+ AND gij.org_abbrev IN ($$organism$$)
) , gmi AS (
SELECT gene_source_id, source_id, max(total_unique) AS max_unique, max(total_isrpm) AS max_isrpm
FROM core
@@ -2210,12 +2211,13 @@
= $$min_total_unique$$
AND gij.annotated_intron = 'No'
AND gij.percent_max between $$percent_max.min$$ and $$percent_max.max$$
AND ga.org_abbrev in ($$organism$$)
+ AND gij.org_abbrev in ($$organism$$)
AND gij.taxon_id = ga.taxon_id
GROUP BY ga.gene_source_id, ga.source_id, ga.project_id
]]>
@@ -3187,6 +3189,7 @@
+
@@ -3218,8 +3221,8 @@
WHERE igi.bait_gene_feature_id = pf.gene_na_feature_id
) AS prey_number_of_baits, bait_number_of_preys, 'bait' AS bait_or_prey
FROM webready.GeneId_p ga
- , webready.TranscriptAttributes_p bf
- , webready.TranscriptAttributes_p pf
+ , apidbtuning.TranscriptAttributes bf
+ , apidbtuning.TranscriptAttributes pf
, apidb.GeneInteraction gi
WHERE lower($$single_gene_id$$) = lower(ga.id) AND ga.gene = bf.gene_source_id AND
gi.number_of_searches >= $$min_searches$$ AND gi.times_observed >= $$min_observed$$ AND
@@ -3232,8 +3235,8 @@
WHERE igi.prey_gene_feature_id = bf.gene_na_feature_id
) AS bait_number_of_preys, 'prey' AS bait_or_prey
FROM webready.GeneId_p ga
- , webready.TranscriptAttributes_p bf
- , webready.TranscriptAttributes_p pf
+ , apidbtuning.TranscriptAttributes bf
+ , apidbtuning.TranscriptAttributes pf
, apidb.GeneInteraction gi
WHERE lower($$single_gene_id$$) = lower(ga.id) AND ga.gene = pf.gene_source_id AND
gi.number_of_searches >= $$min_searches$$ AND gi.times_observed >= $$min_observed$$ AND
diff --git a/Model/lib/wdk/model/questions/queries/spanQueries.xml b/Model/lib/wdk/model/questions/queries/spanQueries.xml
index 1529303f7..fd18021d1 100644
--- a/Model/lib/wdk/model/questions/queries/spanQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/spanQueries.xml
@@ -194,11 +194,12 @@ select INTRON_FEATURE_ID as feature_id,
gsa.project_id,
ab.internal_abbrev,
CONCAT(gij.sequence_source_id, ':', gij.segment_start, '-', gij.segment_end, CASE gij.is_reversed WHEN 0 THEN ':f' WHEN 1 THEN ':r' END) as source_id
- from ApidbTuning.GeneIntronJunction gij, webready.GenomicSeqJunctionStats_p stats ,sres.taxonname tn ,webready.GenomicSeqAttributes_p gsa ,apidbtuning.organismattributes ab
+ from webready.GeneIntronJunction_p gij, webready.GenomicSeqJunctionStats_p stats ,sres.taxonname tn ,webready.GenomicSeqAttributes_p gsa ,apidbtuning.organismattributes ab
WHERE gij.na_sequence_id = stats.na_sequence_id
and gsa.taxon_id = tn.taxon_id
and gsa.na_sequence_ID = gij.na_sequence_id
and ab.organism_name = gsa.organism
+ and gij.org_abbrev in ($$organism_span$$)
and gsa.org_abbrev in ($$organism_span$$)
and stats.org_abbrev in ($$organism_span$$)
AND gij.segment_end - gij.segment_start <= stats.max_intron_length * 2
@@ -229,19 +230,21 @@ select INTRON_FEATURE_ID as feature_id,
and gsa.taxon_id = tn.taxon_id
and gsa.na_sequence_ID = gij.na_sequence_id
and ab.organism_name = gsa.organism
+ and gij.org_abbrev in ($$organism_span$$)
and gsa.org_abbrev in ($$organism_span$$)
and stats.org_abbrev in ($$organism_span$$)
AND gij.segment_end - gij.segment_start <= stats.max_intron_length * 4
AND gij.total_unique >= CASE WHEN contained = 1 THEN stats.min_annot_score ELSE 5*stats.min_annot_score END
AND (gij.contained = 0 or gij.percent_max >= stats.min_annot_percent_max)
AND gij.intron_feature_id not in (
- select gij.intron_feature_id
- from ApidbTuning.GeneIntronJunction gij, webready.GenomicSeqJunctionStats_p stats
- WHERE gij.na_sequence_id = stats.na_sequence_id
- AND gij.segment_end - gij.segment_start <= stats.max_intron_length * 2
- AND gij.total_unique >= CASE WHEN contained = 1 THEN stats.perc01_annot_score ELSE 5*stats.perc01_annot_score END
- AND (gij.contained = 0 or gij.percent_max >= 2 /*stats.perc0005_annot_percent_max*/)
-
+ select gij.intron_feature_id
+ from ApidbTuning.GeneIntronJunction gij, webready.GenomicSeqJunctionStats_p stats
+ WHERE gij.na_sequence_id = stats.na_sequence_id
+ AND gij.segment_end - gij.segment_start <= stats.max_intron_length * 2
+ AND gij.total_unique >= CASE WHEN contained = 1 THEN stats.perc01_annot_score ELSE 5*stats.perc01_annot_score END
+ AND (gij.contained = 0 or gij.percent_max >= 2 /*stats.perc0005_annot_percent_max*/)
+ AND gij.org_abbrev in ($$organism_span$$)
+ AND stats.org_abbrev in ($$organism_span$$)
)
)
where (confidence = $$Intron_junction_confidence$$ or 'all' = $$Intron_junction_confidence$$)
diff --git a/Model/lib/wdk/model/records/junctionAttributeQueries.xml b/Model/lib/wdk/model/records/junctionAttributeQueries.xml
index 09cc38b4f..469fe0351 100644
--- a/Model/lib/wdk/model/records/junctionAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/junctionAttributeQueries.xml
@@ -60,7 +60,7 @@
-->
- SELECT count(*) FROM ApidbTuning.GeneIntronJunction
+ SELECT count(*) FROM webready.GeneIntronJunction_p
@@ -73,7 +73,7 @@
@@ -96,7 +96,7 @@
diff --git a/Model/lib/xml/jbrowse/genomeQueries.xml b/Model/lib/xml/jbrowse/genomeQueries.xml
index c09172db3..38624e396 100644
--- a/Model/lib/xml/jbrowse/genomeQueries.xml
+++ b/Model/lib/xml/jbrowse/genomeQueries.xml
@@ -143,8 +143,8 @@ ORDER BY
WHEN gij.is_reversed = 1 THEN '-1'
ELSE '.'
END AS strand
- FROM ApidbTuning.GeneIntronJunction gij
- JOIN ApidbTuning.GeneIntJuncStats stats
+ FROM webready.GeneIntronJunction_p gij
+ JOIN webready.GenomicSeqJunctionStats_p stats
ON gij.na_sequence_id = stats.na_sequence_id
where gij.parent_id = $srcfeature_id
AND gij.segment_start <= $rend
@@ -176,8 +176,8 @@ gij.annotated_intron, gij.annotated_intron as annotatedintron, gij.gene_source_i
WHEN gij.is_reversed = 1 THEN '-1'
ELSE '.'
END AS strand
- FROM ApidbTuning.GeneIntronJunction gij
- JOIN ApidbTuning.GeneIntJuncStats stats
+ FROM webready.GeneIntronJunction_p gij
+ JOIN webready.GenomicSeqJunctionStats_p stats
ON gij.na_sequence_id = stats.na_sequence_id
where gij.na_sequence_id = $srcfeature_id
AND gij.segment_start <= $rend
@@ -202,8 +202,8 @@ gij.annotated_intron, gij.annotated_intron as annotatedintron, gij.gene_source_i
WHEN gij.is_reversed = 1 THEN '-1'
ELSE '.'
END AS strand
- FROM ApidbTuning.GeneIntronJunction gij
- JOIN ApidbTuning.GeneIntJuncStats stats
+ FROM webready.GeneIntronJunction_p gij
+ JOIN webready.GenomicSeqJunctionStats_p stats
ON gij.na_sequence_id = stats.na_sequence_id
where gij.na_sequence_id= $srcfeature_id
AND gij.segment_start <= $rend
@@ -226,8 +226,8 @@ gij.annotated_intron, gij.annotated_intron as annotatedintron, gij.gene_source_i
WHEN gij.is_reversed = 1 THEN '-1'
ELSE '.'
END AS strand
- FROM ApidbTuning.GeneIntronJunction gij
- JOIN ApidbTuning.GeneIntJuncStats stats
+ FROM webready.GeneIntronJunction_p gij
+ JOIN webready.GenomicSeqJunctionStats_p stats
ON gij.na_sequence_id = stats.na_sequence_id
where gij.na_sequence_id = $srcfeature_id
AND gij.segment_start <= $rend
@@ -252,8 +252,8 @@ gij.annotated_intron, gij.annotated_intron as annotatedintron, gij.gene_source_i
WHEN gij.is_reversed = 1 THEN '-1'
ELSE '.'
END AS strand
- FROM ApidbTuning.GeneIntronJunction gij
- JOIN ApidbTuning.GeneIntJuncStats stats
+ FROM webready.GeneIntronJunction_p gij
+ JOIN webready.GenomicSeqJunctionStats_p stats
ON gij.na_sequence_id = stats.na_sequence_id
where gij.na_sequence_id = $srcfeature_id
AND gij.segment_start <= $rend
@@ -265,7 +265,7 @@ gij.annotated_intron, gij.annotated_intron as annotatedintron, gij.gene_source_i
AND (gij.contained = 0 or gij.percent_max >= stats.min_annot_percent_max)
AND gij.intron_feature_id not in (
select gij.intron_feature_id
- from ApidbTuning.GeneIntronJunction gij, ApidbTuning.GeneIntJuncStats stats
+ from webready.GeneIntronJunction_p gij, webready.GenomicSeqJunctionStats_p stats
where gij.na_sequence_id = $srcfeature_id
AND gij.segment_start <= $rend
AND gij.segment_end >= $base_start
@@ -2645,7 +2645,7 @@ WHERE loc.na_sequence_id = $srcfeature_id
ANNOTATED_INTRON,
to_char(segment_start - 10) || ',' || to_char(segment_end + 1) as tstarts,
to_char(10) || ',' || to_char(10) as blocksizes
- from ApidbTuning.GeneIntronJunction gij, ApidbTuning.GeneIntJuncStats stats
+ from webready.GeneIntronJunction_p gij, webready.GenomicSeqJunctionStats_p stats
where gij.na_sequence_id= $srcfeature_id
AND gij.segment_start <= $rend
AND gij.segment_end >= $base_start
@@ -2671,7 +2671,7 @@ WHERE loc.na_sequence_id = $srcfeature_id
ANNOTATED_INTRON,
to_char(segment_start - 10) || ',' || to_char(segment_end + 1) as tstarts,
to_char(10) || ',' || to_char(10) as blocksizes
- from ApidbTuning.GeneIntronJunction gij, ApidbTuning.GeneIntJuncStats stats
+ from webready.GeneIntronJunction_p gij, webready.GenomicSeqJunctionStats_p stats
where gij.na_sequence_id = $srcfeature_id
AND gij.segment_start <= $rend
AND gij.segment_end >= $base_start
@@ -2698,7 +2698,7 @@ WHERE loc.na_sequence_id = $srcfeature_id
ANNOTATED_INTRON,
to_char(segment_start - 10) || ',' || to_char(segment_end + 1) as tstarts,
to_char(10) || ',' || to_char(10) as blocksizes
- from ApidbTuning.GeneIntronJunction gij, ApidbTuning.GeneIntJuncStats stats
+ from webready.GeneIntronJunction_p gij, webready.GenomicSeqJunctionStats_p stats
where gij.na_sequence_id = $srcfeature_id
AND gij.segment_start <= $rend
AND gij.segment_end >= $base_start
@@ -2710,7 +2710,7 @@ WHERE loc.na_sequence_id = $srcfeature_id
AND (gij.contained = 0 or gij.percent_max >= stats.min_annot_percent_max)
AND gij.intron_feature_id not in (
select gij.intron_feature_id
- from ApidbTuning.GeneIntronJunction gij, ApidbTuning.GeneIntJuncStats stats
+ from webready.GeneIntronJunction_p gij, webready.GenomicSeqJunctionStats_p stats
where gij.na_sequence_id = $srcfeature_id
AND gij.segment_start <= $rend
AND gij.segment_end >= $base_start
From d305fea6d17c8fdf80ed5293ec396b4523c89717 Mon Sep 17 00:00:00 2001
From: Steve <43149795+steve-fischer-200@users.noreply.github.com>
Date: Tue, 9 Dec 2025 12:29:59 -0500
Subject: [PATCH 03/66] avoid use of dots.nasequence (#128)
---
.../model/questions/params/organismParams.xml | 10 ++++----
.../model/questions/queries/geneQueries.xml | 6 +++--
.../questions/queries/genomicQueries.xml | 9 +++----
.../model/records/genomicAttributeQueries.xml | 24 +++++++------------
4 files changed, 20 insertions(+), 29 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 8438fe595..7de643449 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -639,9 +639,8 @@
/* withSequenceStrains filter query */
WITH FilterQuery AS (
SELECT DISTINCT sa.organism
- FROM dots.NaSequence ns, apidbtuning.GenomicSeqAttributes sa, apidb.organism o
- WHERE ns.na_sequence_id = sa.na_sequence_id
- AND sa.taxon_id = o.taxon_id
+ FROM apidbtuning.GenomicSeqAttributes sa, apidb.organism o
+ WHERE sa.taxon_id = o.taxon_id
AND (sa.project_id = '@PROJECT_ID@' OR 'UniDB' = '@PROJECT_ID@')
)
/* end filter query */
@@ -699,9 +698,8 @@
/* withSequenceStrains filter query */
WITH FilterQuery AS (
SELECT DISTINCT sa.organism, o.abbrev
- FROM dots.NaSequence ns, apidbtuning.GenomicSeqAttributes sa, apidb.organism o
- WHERE ns.na_sequence_id = sa.na_sequence_id
- AND sa.taxon_id = o.taxon_id
+ FROM apidbtuning.GenomicSeqAttributes sa, apidb.organism o
+ WHERE sa.taxon_id = o.taxon_id
AND (sa.project_id = '@PROJECT_ID@' OR 'UniDB' = '@PROJECT_ID@')
)
/* end filter query */
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index 842b89d16..435016110 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -5196,9 +5196,10 @@
= $$start_point$$
AND (gene_start_min <= $$end_point$$ OR $$end_point$$ = 0)
diff --git a/Model/lib/wdk/model/questions/queries/genomicQueries.xml b/Model/lib/wdk/model/questions/queries/genomicQueries.xml
index 34ef543aa..1699b2631 100644
--- a/Model/lib/wdk/model/questions/queries/genomicQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/genomicQueries.xml
@@ -68,10 +68,9 @@
@@ -327,12 +326,10 @@
, pan.name
FROM apidb.chrcopynumber ccn
, study.protocolappnode pan
- , dots.nasequence ns
, webready.GenomicSeqAttributes_p sa
WHERE ccn.protocol_app_node_id in ($$CNV_strain$$)
AND ccn.protocol_app_node_id = pan.protocol_app_node_id
- AND ns.na_sequence_id = ccn.na_sequence_id
- AND ns.source_id = sa.source_id
+ AND sa.na_sequence_id = ccn.na_sequence_id
AND sa.chromosome IS NOT NULL
)
, median AS (
diff --git a/Model/lib/wdk/model/records/genomicAttributeQueries.xml b/Model/lib/wdk/model/records/genomicAttributeQueries.xml
index 0e7f0a6a8..6287c4e15 100644
--- a/Model/lib/wdk/model/records/genomicAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/genomicAttributeQueries.xml
@@ -328,20 +328,20 @@
- SELECT ns.source_id, gs.project_id,
- ns.source_id as gff_seqid,
+ SELECT gs.source_id, gs.project_id,
+ gs.source_id as gff_seqid,
gs.project_id as gff_source,
s.name as gff_type,
1 as gff_fstart,
- ns.length as gff_fend,
+ gs.length as gff_fend,
'.' as gff_score,
'+' as gff_strand,
'.' as gff_phase,
- ns.source_id as gff_attr_id,
- ns.source_id as gff_attr_web_id,
- ns.source_id as gff_attr_name,
- ns.description as gff_attr_description,
- ns.length as gff_attr_size,
+ gs.source_id as gff_attr_id,
+ gs.source_id as gff_attr_web_id,
+ gs.source_id as gff_attr_name,
+ gs.sequence_description as gff_attr_description,
+ gs.length as gff_attr_size,
'dsDNA' as gff_attr_molecule_type,
--TODO add this back
--SUBSTR(tn.name, 1, regexp_instr(tn.name || ' ', ' ', 1, 2) - 1) as gff_attr_organism_name,
@@ -352,17 +352,11 @@
WHEN s.name = 'apicoplast_chromosome' THEN 'plastid'
ELSE 'nuclear' END) as gff_attr_localization
FROM webready.GenomicSeqAttributes_p gs,
- dots.NaSequence ns,
- sres.externaldatabase ed,
- sres.externaldatabaserelease edr,
sres.TaxonName tn,
sres.Taxon t,
sres.GeneticCode g,
sres.OntologyTerm s
- WHERE ns.na_sequence_id = gs.na_sequence_id
- AND ns.external_database_release_id = edr.external_database_release_id
- AND edr.external_database_id = ed.external_database_id
- AND ns.taxon_id = tn.taxon_id
+ WHERE gs.taxon_id = tn.taxon_id
AND tn.name_class = 'scientific name'
AND gs.taxon_id = t.taxon_id
AND gs.so_id = s.source_id
From a44fa1ba4f5f985e462c9d9009edb1aeed0fae55 Mon Sep 17 00:00:00 2001
From: Steve <43149795+steve-fischer-200@users.noreply.github.com>
Date: Tue, 9 Dec 2025 18:35:48 -0500
Subject: [PATCH 04/66] use partition keys for taxonspecies_p (#124)
---
Model/lib/wdk/model/records/geneTableQueries.xml | 7 +++++++
Model/lib/wdk/model/records/transcriptAttributeQueries.xml | 1 +
2 files changed, 8 insertions(+)
diff --git a/Model/lib/wdk/model/records/geneTableQueries.xml b/Model/lib/wdk/model/records/geneTableQueries.xml
index bfb7ab9ac..628540bd5 100644
--- a/Model/lib/wdk/model/records/geneTableQueries.xml
+++ b/Model/lib/wdk/model/records/geneTableQueries.xml
@@ -164,6 +164,7 @@
AND ts.SPECIES_TAXON_ID = t.taxon_id
AND ss.ncbi_tax_id = t.ncbi_tax_id
and ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ and ts.org_abbrev IN (%%PARTITION_KEYS%%)
)
SELECT ta.gene_source_id AS source_id
, ta.project_id
@@ -512,6 +513,7 @@
AND ga.genus_species = sn.name
AND dds.category in ('RNASeq','DNA Microarray Assay', 'SAGE', 'RT PCR')
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ AND ts.org_abbrev IN (%%PARTITION_KEYS%%)
GROUP BY ga.source_id, ga.project_id, ga.organism, ga.genus_species, graph_descrip.dataset,
tn.name, dp.dataset_presenter_id, module,x_axis,y_axis, is_graph_custom,order_num,
dds.category,dp.short_attribution --,ga.paralog_number
@@ -623,6 +625,7 @@
AND ga.genus_species = sn.name
AND dds.category = 'Protein expression (quantitative)'
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ AND ts.org_abbrev IN (%%PARTITION_KEYS%%)
) g
]]>
@@ -726,6 +729,7 @@
AND dds.name NOT LIKE '%CDS%' -- TODO: this is here for the horn dataset
AND ga.genus_species = sn.name
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ AND ts.org_abbrev IN (%%PARTITION_KEYS%%)
) g
]]>
@@ -937,6 +941,7 @@
AND ga.genus_species = sn.name
AND dds.category = 'Immunology'
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ AND ts.org_abbrev IN (%%PARTITION_KEYS%%)
) g
) h
, apidbtuning.datasetpresenter datapres
@@ -1158,6 +1163,7 @@ from (
AND ga.genus_species = sn.name
AND dds.category = 'Phenotype'
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ AND ts.org_abbrev IN (%%PARTITION_KEYS%%)
) g
]]>
@@ -1698,6 +1704,7 @@ from (
AND ga.genus_species = sn.name
AND dds.category = 'Phenotype'
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ AND ts.org_abbrev IN (%%PARTITION_KEYS%%)
) g
]]>
diff --git a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
index 0e4a97192..4c70ff4ef 100644
--- a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
@@ -1077,6 +1077,7 @@ ELSE 'N/A' end as apollo_link_out
)
AND ds.taxon_id = ts.taxon_id
AND ts.species_taxon_id = tn.taxon_id
+ AND ts.org_abbrev in (%%PARTITION_KEYS%%)
) d RIGHT JOIN webready.GeneAttributes_p ga ON ga.species = d.species
WHERE ga.org_abbrev in (%%PARTITION_KEYS%%)
]]>
From 624fc6854969ee80516391cdbdbb3514b294c022 Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Tue, 9 Dec 2025 23:02:25 -0500
Subject: [PATCH 05/66] add get only syntenic orthologs (inner join) and add
union for unity mapping reference
---
.../LoadRefSynOrthologousGenesTable.psql | 40 ++++++++++---------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/Model/lib/psql/webready/comparative/LoadRefSynOrthologousGenesTable.psql b/Model/lib/psql/webready/comparative/LoadRefSynOrthologousGenesTable.psql
index 093145e3a..3747f51cb 100644
--- a/Model/lib/psql/webready/comparative/LoadRefSynOrthologousGenesTable.psql
+++ b/Model/lib/psql/webready/comparative/LoadRefSynOrthologousGenesTable.psql
@@ -11,31 +11,35 @@ DECLARE
BEGIN
FOR orgrecord IN
SELECT org_abbrev, sanitized_org_abbrev, ref_strain_abbrev as ref_org_abbrev
- FROM :SCHEMA.organismabbreviation_p oa, apidb.organism o
- WHERE oa.org_abbrev = o.abbrev
+ FROM :SCHEMA.organismabbreviation_p oa, apidb.organism o
+ WHERE oa.org_abbrev = o.abbrev
LOOP
INSERT INTO :SCHEMA.RefSynOrthologousGenes_p (source_id, ref_source_id, org_abbrev, project_id, modification_date)
WITH syn_pairs AS (
- SELECT DISTINCT ga.source_id, sg.syn_na_feature_id as ref_na_feature_id
- FROM :SCHEMA.SyntenicGene_p sg, :SCHEMA.GeneAttributes_p ga
- WHERE sg.na_sequence_id = ga.na_sequence_id
- AND ga.org_abbrev = orgrecord.org_abbrev
- and sg.syn_organism_abbrev = orgrecord.ref_org_abbrev
- AND sg.end_max >= ga.start_min
- AND sg.start_min <= ga.end_max
- ),
+ SELECT DISTINCT ga.source_id, sg.syn_na_feature_id as ref_na_feature_id
+ FROM :SCHEMA.SyntenicGene_p sg, :SCHEMA.GeneAttributes_p ga
+ WHERE sg.na_sequence_id = ga.na_sequence_id
+ AND ga.org_abbrev = orgrecord.org_abbrev
+ and sg.syn_organism_abbrev = orgrecord.ref_org_abbrev
+ AND sg.end_max >= ga.start_min
+ AND sg.start_min <= ga.end_max
+ ),
ortholog_pairs AS (SELECT gog.gene_id as source_id, ga_ref.na_feature_id as ref_na_feature_id, gog_ref.gene_id as ref_source_id
- FROM :SCHEMA.GeneOrthologGroup gog
- JOIN :SCHEMA.GeneOrthologGroup gog_ref ON gog.group_id = gog_ref.group_id
- JOIN :SCHEMA.GeneAttributes_p ga_ref on gog_ref.gene_id = ga_ref.source_id
- WHERE gog.org_abbrev = orgrecord.org_abbrev
- AND gog_ref.org_abbrev = orgrecord.ref_org_abbrev
- and ga_ref.org_abbrev = orgrecord.ref_org_abbrev
+ FROM :SCHEMA.GeneOrthologGroup gog
+ JOIN :SCHEMA.GeneOrthologGroup gog_ref ON gog.group_id = gog_ref.group_id
+ JOIN :SCHEMA.GeneAttributes_p ga_ref on gog_ref.gene_id = ga_ref.source_id
+ WHERE gog.org_abbrev = orgrecord.org_abbrev
+ AND gog_ref.org_abbrev = orgrecord.ref_org_abbrev
+ and ga_ref.org_abbrev = orgrecord.ref_org_abbrev
)
SELECT ortholog_pairs.source_id, ortholog_pairs.ref_source_id, orgrecord.org_abbrev, ':PROJECT_ID', current_timestamp
FROM ortholog_pairs
- LEFT JOIN syn_pairs ON ortholog_pairs.source_id = syn_pairs.source_id AND ortholog_pairs.ref_na_feature_id = syn_pairs.ref_na_feature_id:PLPGSQL_DELIM
-
+ INNER JOIN syn_pairs ON ortholog_pairs.source_id = syn_pairs.source_id AND ortholog_pairs.ref_na_feature_id = syn_pairs.ref_na_feature_id
+ UNION
+ SELECT ga.source_id, ga.source_id as ref_source_id, ga.org_abbrev, ga.project_id, current_timestamp
+ FROM :SCHEMA.geneattributes_p ga
+ WHERE ga.org_abbrev = orgrecord.org_abbrev
+ AND ga.org_abbrev = orgrecord.ref_org_abbrev:PLPGSQL_DELIM
END LOOP:PLPGSQL_DELIM
END $$;
From 4a56b4f444ab80bc064b0006ce0a79a293154734 Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Tue, 9 Dec 2025 23:08:48 -0500
Subject: [PATCH 06/66] filter metatable by taxa
---
Model/lib/wdk/model/records/geneTableQueries.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Model/lib/wdk/model/records/geneTableQueries.xml b/Model/lib/wdk/model/records/geneTableQueries.xml
index 628540bd5..976693f1e 100644
--- a/Model/lib/wdk/model/records/geneTableQueries.xml
+++ b/Model/lib/wdk/model/records/geneTableQueries.xml
@@ -4200,7 +4200,7 @@ where org_abbrev in (%%PARTITION_KEYS%%)
, ta.name AS organisms
FROM
(
- SELECT DISTINCT dmr.target_name, dmr.target_type, tn.name
+ SELECT DISTINCT dmr.target_name, dmr.target_type, tn.name, dd.taxon_id
FROM
ApidbTuning.DatasetDatasource dd
INNER JOIN ApidbTuning.DatasetModelRef dmr ON dd.dataset_presenter_id = dmr.dataset_presenter_id
@@ -4212,6 +4212,7 @@ where org_abbrev in (%%PARTITION_KEYS%%)
, webready.GeneAttributes_p ga
-- GROUP BY ga.source_id, ga.project_id, target_name, target_type
WHERE ga.org_abbrev IN (%%PARTITION_KEYS%%)
+ AND ga.taxon_id = ta.taxon_id
ORDER BY ga.source_id, target_name
]]>
From baca6e50bd4d176ecf25d52375cb86104d54e05c Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Wed, 10 Dec 2025 13:30:39 -0500
Subject: [PATCH 07/66] adjust MetaTable query
---
Model/lib/wdk/model/records/geneTableQueries.xml | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/Model/lib/wdk/model/records/geneTableQueries.xml b/Model/lib/wdk/model/records/geneTableQueries.xml
index 976693f1e..050136490 100644
--- a/Model/lib/wdk/model/records/geneTableQueries.xml
+++ b/Model/lib/wdk/model/records/geneTableQueries.xml
@@ -4192,7 +4192,7 @@ where org_abbrev in (%%PARTITION_KEYS%%)
+ ]]>
From a5ff61a799e0a259ae1c8155588988ceb86ab0f0 Mon Sep 17 00:00:00 2001
From: bindu
Date: Wed, 10 Dec 2025 13:48:10 -0500
Subject: [PATCH 08/66] TODO : add cellularLocalizationWdkAttributes attr in
attributeList, for cellularLocalizationEdaQuestion
---
Model/lib/dst/cellularLocalization.dst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Model/lib/dst/cellularLocalization.dst b/Model/lib/dst/cellularLocalization.dst
index 72c83dfbf..f4be53f29 100644
--- a/Model/lib/dst/cellularLocalization.dst
+++ b/Model/lib/dst/cellularLocalization.dst
@@ -18,8 +18,9 @@ prop=cellularLocalizationWdkAttributes
+
Date: Wed, 10 Dec 2025 14:43:55 -0500
Subject: [PATCH 09/66] first pass at replace study and studylink with claude
---
Model/lib/dst/expression.dst | 13 +-
Model/lib/dst/quantProteomics.dst | 10 +-
.../wdk/model/questions/params/geneParams.xml | 73 ++++++------
.../questions/queries/compoundQueries.xml | 12 +-
.../model/questions/queries/geneQueries.xml | 62 +++++-----
.../wdk/model/records/geneTableQueries.xml | 111 ++++++++----------
6 files changed, 132 insertions(+), 149 deletions(-)
diff --git a/Model/lib/dst/expression.dst b/Model/lib/dst/expression.dst
index e09ed2434..df08174b2 100644
--- a/Model/lib/dst/expression.dst
+++ b/Model/lib/dst/expression.dst
@@ -19,21 +19,20 @@ from study.study s
where name = '${datasetName}'
/**
-select distinct s.study_id as internal
+select distinct s.node_set_id as internal
, s.name as term
- , REGEXP_REPLACE (s.name, '\[(.)+\]', '') AS display
+ , REGEXP_REPLACE (s.name, '\[(.)+\]', '') AS display
, d.name
-from study.study s
- , study.studylink sl
+from study.nodeset s
+ , study.nodenodeset sl
, RESULTS.NAFEATUREDIFFRESULT dr
, SRES.EXTERNALDATABASERELEASE r
, sres.externaldatabase d
-where
+where
s.EXTERNAL_DATABASE_RELEASE_ID = r.EXTERNAL_DATABASE_RELEASE_ID
and r.EXTERNAL_DATABASE_ID = d.EXTERNAL_DATABASE_ID
-and s.study_id = sl.study_id
+and s.node_set_id = sl.node_set_id
and sl.PROTOCOL_APP_NODE_ID = dr.PROTOCOL_APP_NODE_ID
-and s.INVESTIGATION_ID is null
and d.name = '${datasetName}'
ORDER BY s.name desc
**/
diff --git a/Model/lib/dst/quantProteomics.dst b/Model/lib/dst/quantProteomics.dst
index 15ffc2319..d7b321dee 100644
--- a/Model/lib/dst/quantProteomics.dst
+++ b/Model/lib/dst/quantProteomics.dst
@@ -83,17 +83,17 @@ prop=dataType
-select distinct s.study_id as internal, s.name as term, s.name as display
-from study.study s, sres.externaldatabase ed, sres.externaldatabaserelease edr
- ,results.nafeaturediffresult ndr, study.protocolappnode pan, study.studylink sl
+select distinct s.node_set_id as internal, s.name as term, s.name as display
+from study.nodeset s, sres.externaldatabase ed, sres.externaldatabaserelease edr
+ ,results.nafeaturediffresult ndr, study.protocolappnode pan, study.nodenodeset sl
where ed.external_database_id=edr.external_database_id
and s.external_database_release_id = edr.external_database_release_id
and ed.name='${datasetName}'
-and s.study_id = sl.study_id
+and s.node_set_id = sl.node_set_id
and sl.protocol_app_node_id = pan.protocol_app_node_id
and ndr.protocol_app_node_id = pan.protocol_app_node_id
and s.name NOT like 'Quantitative Mass Spec%'
-order by s.study_id
+order by s.node_set_id
diff --git a/Model/lib/wdk/model/questions/params/geneParams.xml b/Model/lib/wdk/model/questions/params/geneParams.xml
index 73d557f1c..a8d8c744c 100644
--- a/Model/lib/wdk/model/questions/params/geneParams.xml
+++ b/Model/lib/wdk/model/questions/params/geneParams.xml
@@ -6558,9 +6558,8 @@ products of your selected type (or types).
WHEN s.name ='BSF Const MetaCycle' THEN 'BSF Const'
WHEN s.name ='PF Alt MetaCycle' THEN 'PF Alt'
ELSE 'PF Const' END AS term
- FROM study.study s, study.study i
- WHERE i.name = 'tbruTREU927_Rijo_Circadian_Regulation_ebi_rnaSeq_RSRC'
- AND i.study_id = s.INVESTIGATION_ID and s.name like '%MetaCycle%'
+ FROM study.nodeset s
+ WHERE s.name like '%MetaCycle%'
@@ -6616,10 +6615,10 @@ products of your selected type (or types).
FROM sres.externaldatabase d
, sres.externaldatabaserelease r
, apidb.nafeatureWGCNAResults fwr
- , study.studylink sl
- , study.study s
+ , study.nodenodeset sl
+ , study.nodeset s
WHERE sl.protocol_app_node_id = fwr.protocol_app_node_id
- AND sl.study_id= s.study_id
+ AND sl.node_set_id= s.node_set_id
AND r.external_database_release_id = s.external_database_release_id
AND d.external_database_id = r.external_database_id
]]>
@@ -6643,10 +6642,10 @@ products of your selected type (or types).
pan.protocol_app_node_id as internal
, regexp_replace(pan.name,'(((\w+)\s){1}).*', '\1') as display --clean pan.name by keeping only the first full word
from study.protocolappnode pan
- , study.study s
- , study.studylink sl
+ , study.nodeset s
+ , study.nodenodeset sl
where s.external_database_release_id = $$wgcnaDataset$$
- and s.study_id = sl.study_id
+ and s.node_set_id = sl.node_set_id
and sl.protocol_app_node_id = pan.protocol_app_node_id
and pan.name like '%module%'
) a
@@ -6669,10 +6668,10 @@ products of your selected type (or types).
FROM sres.externaldatabase d
, sres.externaldatabaserelease r
, apidb.nafeaturelist fl
- , study.studylink sl
- , study.study s
+ , study.nodenodeset sl
+ , study.nodeset s
WHERE sl.protocol_app_node_id = fl.protocol_app_node_id
- AND sl.study_id= s.study_id
+ AND sl.node_set_id= s.node_set_id
AND r.external_database_release_id = s.external_database_release_id
AND d.external_database_id = r.external_database_id
]]>
@@ -6688,9 +6687,9 @@ products of your selected type (or types).
@@ -6757,9 +6756,9 @@ products of your selected type (or types).
CASE WHEN pan.name ='outlier (lopit)' THEN CONCAT('- ', upper(substr(CONCAT(replace(pan.name,' (lopit)',''), ' probability'),1,1)), substr(CONCAT(replace(pan.name,' (lopit)',''), ' probability'),2,9999))
ELSE CONCAT(upper(substr(CONCAT(replace(pan.name,' (lopit)',''), ' probability'),1,1)), substr(CONCAT(replace(pan.name,' (lopit)',''), ' probability'),2,9999)) END as display_name
, cast(null as varchar(1)) as description, cast(null as varchar(1)) as units, 'number' as type,1 as is_range,1 as precision, cast(null as varchar(1)) as display_order
- FROM study.study s , study.studyLink sl, study.ProtocolAppNode pan, apidb.LopitResults lr, apidbtuning.GeneAttributes ga
+ FROM study.nodeset s , study.nodenodeset sl, study.ProtocolAppNode pan, apidb.LopitResults lr, apidbtuning.GeneAttributes ga
WHERE s.name = $$lopit_method$$
- AND s.study_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
AND sl.protocol_app_node_id = pan.protocol_app_node_id
AND pan.protocol_app_node_id = lr.protocol_app_node_id
AND ga.na_feature_id = lr.na_feature_id
@@ -6778,17 +6777,17 @@ products of your selected type (or types).
, d.name as internal
FROM sres.externaldatabase d
, sres.externaldatabaserelease r
- , study.study s
- , study.studylink sl
+ , study.nodeset s
+ , study.nodenodeset sl
, apidb.phenotypescore ps
WHERE d.external_database_id = r.external_database_id
AND r.external_database_release_id = s.external_database_release_id
- AND s.study_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
AND sl.protocol_app_node_id = ps.protocol_app_node_id
]]>
@@ -7027,14 +7026,14 @@ products of your selected type (or types).
FROM apidb.PhenotypeScore ps
, study.protocolappnode pan
, (SELECT DISTINCT sl.protocol_app_node_id, d.name
- FROM study.study s
- , study.studylink sl
+ FROM study.nodeset s
+ , study.nodenodeset sl
, sres.externaldatabase d
, sres.externaldatabaserelease r
WHERE d.name = '$$phenotypeScoreDataset$$'
and d.external_database_id = r.external_database_id
and r.external_database_release_id = s.external_database_release_id
- and s.study_id = sl.study_id
+ and s.node_set_id = sl.node_set_id
) sl
WHERE ps.protocol_app_node_id = pan.protocol_app_node_id
AND pan.protocol_app_node_id = sl.protocol_app_node_id
@@ -7070,14 +7069,14 @@ products of your selected type (or types).
, study.protocolappnode pan
, (
SELECT distinct sl.protocol_app_node_id, d.name
- FROM study.study s
- , study.studylink sl
+ FROM study.nodeset s
+ , study.nodenodeset sl
, sres.externaldatabase d
, sres.externaldatabaserelease r
WHERE d.name = '$$phenotypeScoreDataset$$'
AND d.external_database_id = r.external_database_id
AND r.external_database_release_id = s.external_database_release_id
- AND s.study_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
) sl
WHERE p.protocol_app_node_id = pan.protocol_app_node_id
and pan.protocol_app_node_id = sl.protocol_app_node_id
@@ -7159,9 +7158,9 @@ products of your selected type (or types).
, null::numeric as number_value
, lower(p.value) as string_value
, cast(null as timestamp) as date_value
- FROM apidb.nafeaturephenotype p, study.study s, study.studylink sl
+ FROM apidb.nafeaturephenotype p, study.nodeset s, study.nodenodeset sl
WHERE s.name = 'ncraOR74A_phenotype_GeneImage_NAFeaturePhenotypeImage_RSRC'
- AND s.study_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
AND sl.protocol_app_node_id = p.protocol_app_node_id
]]>
@@ -7187,9 +7186,9 @@ products of your selected type (or types).
, 'string' as type
, 0 as is_range
, 1 as precision
- FROM apidb.nafeaturephenotype p, study.study s, study.studylink sl
+ FROM apidb.nafeaturephenotype p, study.nodeset s, study.nodenodeset sl
WHERE s.name = 'ncraOR74A_phenotype_GeneImage_NAFeaturePhenotypeImage_RSRC'
- AND s.study_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
AND sl.protocol_app_node_id = p.protocol_app_node_id
ORDER BY initcap(p.property)
]]>
@@ -7210,9 +7209,9 @@ products of your selected type (or types).
, null::numeric as number_value
, p.value as string_value
, cast(null as timestamp) as date_value
- FROM apidb.nafeaturephenotype p, study.study s, study.studylink sl
+ FROM apidb.nafeaturephenotype p, study.nodeset s, study.nodenodeset sl
WHERE s.name like '%_PHI-base_curated_phenotype_NAFeaturePhenotypeGeneric_RSRC'
- AND s.study_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
AND sl.protocol_app_node_id = p.protocol_app_node_id
AND p.property NOT IN ('Co-mutated gene(s)','Gene inducer','PHI-base entry','PMID')
AND p.property NOT like 'Comments%'
@@ -7240,9 +7239,9 @@ products of your selected type (or types).
, 'string' as type
, 0 as is_range
, 1 as precision
- FROM apidb.nafeaturephenotype p, study.study s, study.studylink sl
+ FROM apidb.nafeaturephenotype p, study.nodeset s, study.nodenodeset sl
WHERE s.name like '%_PHI-base_curated_phenotype_NAFeaturePhenotypeGeneric_RSRC'
- AND s.study_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
AND sl.protocol_app_node_id = p.protocol_app_node_id
AND p.property NOT IN ('Co-mutated gene(s)','Gene inducer','PHI-base entry','PMID')
AND p.property NOT like 'Comments%'
diff --git a/Model/lib/wdk/model/questions/queries/compoundQueries.xml b/Model/lib/wdk/model/questions/queries/compoundQueries.xml
index 9083f4b03..1c457c017 100644
--- a/Model/lib/wdk/model/questions/queries/compoundQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/compoundQueries.xml
@@ -660,12 +660,12 @@
SELECT SUM(r.value) AS value
, r.compound_id
FROM apidbtuning.profileType pt
- , study.study s
- , study.studyLink sl
+ , study.nodeset s
+ , study.nodenodeset sl
, study.protocolAppNode pan
, results.compoundMassSpec r
WHERE pt.profile_set_name = s.name
- AND sl.study_id = s.study_id
+ AND sl.node_set_id = s.node_set_id
AND sl.protocol_app_node_id = pan.protocol_app_node_id
AND pan.protocol_app_node_id = r.protocol_app_node_id
AND pan.protocol_app_node_id in ($$samples_fc_ref_generic$$)
@@ -684,12 +684,12 @@
SELECT SUM(r.value) AS value
, r.compound_id
FROM apidbtuning.profileType pt
- , study.study s
- , study.studyLink sl
+ , study.nodeset s
+ , study.nodenodeset sl
, study.protocolAppNode pan
, results.compoundMassSpec r
WHERE pt.profile_set_name = s.name
- AND sl.study_id = s.study_id
+ AND sl.node_set_id = s.node_set_id
AND sl.protocol_app_node_id = pan.protocol_app_node_id
AND pan.protocol_app_node_id = r.protocol_app_node_id
AND pan.protocol_app_node_id in ($$samples_fc_comp_generic$$)
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index d762b635c..01dca4a43 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -205,9 +205,9 @@
concat('$$metacycle_protocol$$', '%')
, (
SELECT DISTINCT regexp_replace(s.name, '[[:space:]]{1,}', '_') AS term
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
)
)
, '%'
@@ -227,9 +227,9 @@
SELECT DISTINCT protocol_app_node_id
FROM (
SELECT sl.*
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
) t
)
AND t.GENE_NA_FEATURE_ID = mc.NA_FEATURE_ID
@@ -242,9 +242,9 @@
concat('ARSresult_', '%')
, (
SELECT DISTINCT regexp_replace(s.name, '[[:space:]]{1,}', '_') AS term
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
)
)
, '%'
@@ -270,9 +270,9 @@
concat('JTKresult_', '%')
, (
SELECT DISTINCT regexp_replace(s.name, '[[:space:]]{1,}', '_') AS term
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
)
)
, '%')
@@ -282,9 +282,9 @@
SELECT DISTINCT protocol_app_node_id
FROM (
SELECT sl.*
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
) t
)
AND t.GENE_NA_FEATURE_ID = mc.NA_FEATURE_ID
@@ -300,9 +300,9 @@
WHERE name LIKE concat(concat(concat('$$metacycle_protocol$$', '%'),
(
SELECT DISTINCT regexp_replace(s.name, '[[:space:]]{1,}', '_') AS term
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
)), '%')
)
SELECT t.source_id
@@ -319,9 +319,9 @@
SELECT DISTINCT protocol_app_node_id
FROM (
SELECT sl.*
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
) t
)
AND t.GENE_NA_FEATURE_ID = mc.NA_FEATURE_ID
@@ -332,9 +332,9 @@
AND pan.name LIKE concat(concat(concat('JTKresult_', '%'),
(
SELECT DISTINCT regexp_replace(s.name, '[[:space:]]{1,}', '_') AS term
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
)), '%')
) table3
, (
@@ -356,9 +356,9 @@
WHERE name LIKE concat(concat(concat('ARSresult_', '%'),
(
SELECT DISTINCT regexp_replace(s.name, '[[:space:]]{1,}', '_') AS term
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
)), '%')
) t
)
@@ -367,9 +367,9 @@
FROM
(
SELECT sl.*
- FROM study.study s, study.studyLink sl
+ FROM study.nodeset s, study.nodenodeset sl
WHERE s.name = '$$metacycle_study_generic$$'
- AND s.investigation_id = sl.study_id
+ AND s.node_set_id = sl.node_set_id
) t
)
AND t.GENE_NA_FEATURE_ID = mc.NA_FEATURE_ID
@@ -400,9 +400,9 @@
with genePick as (
select ta.gene_source_id, pan.name
- from study.study s , study.studyLink sl, study.ProtocolAppNode pan, apidb.WGCNAResults res, webready.TranscriptAttributes_p ta
+ from study.nodeset s , study.nodenodeset sl, study.ProtocolAppNode pan, apidb.WGCNAResults res, webready.TranscriptAttributes_p ta
where s.name = 'iterativeWGCNA Dual transcriptomes of malaria-infected Gambian children'
- and s.study_id = sl.study_id
+ and s.node_set_id = sl.node_set_id
and sl.protocol_app_node_id = pan.protocol_app_node_id
and pan.protocol_app_node_id = res.protocol_app_node_id
and ta.gene_na_feature_id = res.na_feature_id
@@ -410,9 +410,9 @@
)
select ta.source_id, ta.gene_source_id, ta.project_id, REPLACE(pan.name,' (wgcna)','') as module_name, res.correlation_coefficient as kME, 'Y' as matched_result
- from study.study s , study.studyLink sl, study.ProtocolAppNode pan, apidb.WGCNAResults res, webready.TranscriptAttributes_p ta, genePick
+ from study.nodeset s , study.nodenodeset sl, study.ProtocolAppNode pan, apidb.WGCNAResults res, webready.TranscriptAttributes_p ta, genePick
where s.name = 'iterativeWGCNA Dual transcriptomes of malaria-infected Gambian children'
- and s.study_id = sl.study_id
+ and s.node_set_id = sl.node_set_id
and sl.protocol_app_node_id = pan.protocol_app_node_id
and pan.protocol_app_node_id = res.protocol_app_node_id
and ta.gene_na_feature_id = res.na_feature_id
@@ -3465,13 +3465,13 @@
study.protocolappparam ap,
study.protocolparam p,
study.output i,
- study.studylink sl,
+ study.nodenodeset sl,
STUDY.PROTOCOLAPPNODE an
WHERE an.name LIKE '%DESeq%'
AND p.protocol_param_id = ap.protocol_param_id
AND ap.protocol_app_id = i.protocol_app_id
AND i.PROTOCOL_APP_NODE_ID = an.PROTOCOL_APP_NODE_ID
- AND sl.study_id = $$profileset_generic$$
+ AND sl.node_set_id = $$profileset_generic$$
AND i.protocol_app_node_id = sl.protocol_app_node_id
AND ((p.name = 'reference' AND ap.value = $$samples_de_ref_generic_deseq$$) OR
(ap.value = $$samples_de_comp_generic_deseq$$ AND p.name = 'comparator'))
@@ -5486,17 +5486,15 @@ select distinct ta.gene_source_id
FROM results.nafeatureexpression nfe
, webready.TranscriptAttributes_p ta
, study.protocolappnode pan
- , study.studylink sl
- , study.study ps
- , study.study i
+ , study.nodenodeset sl
+ , study.nodeset ps
, sres.externaldatabaserelease r
, sres.externaldatabase d
WHERE ta.gene_na_feature_id = nfe.na_feature_id
AND nfe.protocol_app_node_id = pan.protocol_app_node_id
AND pan.protocol_app_node_id = sl.protocol_app_node_id
- AND sl.study_id = ps.study_id
- AND ps.investigation_id = i.study_id
- AND i.external_database_release_id = r.external_database_release_id
+ AND sl.node_set_id = ps.node_set_id
+ AND ps.external_database_release_id = r.external_database_release_id
AND r.external_database_id = d.external_database_id
AND d.NAME ='tbruTREU927_quantitative_massSpec_Guther_glycosomal_proteome_RSRC'
AND nfe.VALUE >= $$min_glycosome_score$$
diff --git a/Model/lib/wdk/model/records/geneTableQueries.xml b/Model/lib/wdk/model/records/geneTableQueries.xml
index 050136490..abaaee24d 100644
--- a/Model/lib/wdk/model/records/geneTableQueries.xml
+++ b/Model/lib/wdk/model/records/geneTableQueries.xml
@@ -84,12 +84,12 @@
, ed.DATASET_PRESENTER_DISPLAY_NAME
from apidb.nafeaturelist fl
, webready.GeneAttributes_p ga
- , study.studylink sl
+ , study.nodenodeset sl
, study.protocolappnode pan
- , study.study s
+ , study.nodeset s
, APIDBTUNING.EXTERNALDBDATASETPRESENTER ed
where sl.protocol_app_node_id = fl.protocol_app_node_id
- and sl.study_id= s.study_id
+ and sl.node_set_id= s.node_set_id
and fl.na_feature_id = ga.na_feature_id
and sl.PROTOCOL_APP_NODE_ID = pan.PROTOCOL_APP_NODE_ID
and s.EXTERNAL_DATABASE_RELEASE_ID = ed.EXTERNAL_DATABASE_RELEASE_ID
@@ -117,12 +117,12 @@
, ed.DATASET_PRESENTER_DISPLAY_NAME
from apidb.nafeaturelist fl
, webready.GeneAttributes_p ga
- , study.studylink sl
+ , study.nodenodeset sl
, study.protocolappnode pan
- , study.study s
+ , study.nodeset s
, APIDBTUNING.EXTERNALDBDATASETPRESENTER ed
where sl.protocol_app_node_id = fl.protocol_app_node_id
- and sl.study_id= s.study_id
+ and sl.node_set_id= s.node_set_id
and fl.na_feature_id = ga.na_feature_id
and sl.PROTOCOL_APP_NODE_ID = pan.PROTOCOL_APP_NODE_ID
and s.EXTERNAL_DATABASE_RELEASE_ID = ed.EXTERNAL_DATABASE_RELEASE_ID
@@ -1371,9 +1371,9 @@ from (
, CASE WHEN property = 'Tissue' THEN value END AS tissue
, CASE WHEN property = 'Vegetative spores' THEN value END AS vegetativespores
FROM APIDB.NAFEATUREPHENOTYPE r, webready.GeneAttributes_p ga,
- study.protocolappnode pan, study.study s, study.studylink sl
+ study.protocolappnode pan, study.nodeset s, study.nodenodeset sl
WHERE pan.PROTOCOL_APP_NODE_ID = r.PROTOCOL_APP_NODE_ID
- and s.study_id = sl.study_id
+ and s.node_set_id = sl.node_set_id
and sl.protocol_app_node_id = pan.protocol_app_node_id
and s.name LIKE '%PHI-base_curated_phenotype_NAFeaturePhenotypeGeneric_RSRC'
AND r.NA_FEATURE_ID = ga.NA_FEATURE_ID
@@ -1451,9 +1451,9 @@ from (
, CASE WHEN property = 'Virulence Model' THEN value AS virulencemodel
, CASE WHEN property = 'Species' THEN value AS species
from apidb.nafeaturephenotype r, webready.GeneAttributes_p ga,
- study.protocolappnode pan, study.study s , study.studyLink sl
+ study.protocolappnode pan, study.nodeset s , study.nodenodeset sl
where pan.protocol_app_node_id = r.protocol_app_node_id
- and s.study_id = sl.study_id
+ and s.node_set_id = sl.node_set_id
and sl.protocol_app_node_id = pan.protocol_app_node_id
and s.name LIKE '%_CGD_pheno_NAFeaturePhenotypeGeneric_RSRC'
and r.na_feature_id = ga.na_feature_id
@@ -2417,9 +2417,9 @@ from (
Date: Wed, 10 Dec 2025 15:35:33 -0500
Subject: [PATCH 10/66] fix TFBSGene_p.psql
---
Model/lib/psql/webready/orgSpecific/TFBSGene_p.psql | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Model/lib/psql/webready/orgSpecific/TFBSGene_p.psql b/Model/lib/psql/webready/orgSpecific/TFBSGene_p.psql
index 6985b6d7b..555d40fa3 100644
--- a/Model/lib/psql/webready/orgSpecific/TFBSGene_p.psql
+++ b/Model/lib/psql/webready/orgSpecific/TFBSGene_p.psql
@@ -32,7 +32,9 @@
ELSE '+'
END
END as direction
- -- , aef.*
+ , aef.primary_score
+ , aef.name
+ , aef.external_database_release_id
FROM dots.BindingSiteFeature aef,
apidb.FeatureLocation arrloc,
:SCHEMA.GeneAttributes_p ga
From 4bddc854f3a437fe8273f44a2589d3dfe8ed3342 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Wed, 10 Dec 2025 18:58:22 -0500
Subject: [PATCH 11/66] add maxRecommended msg to org params
---
.../model/questions/params/organismParams.xml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 7de643449..8bf999fcc 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -1,5 +1,9 @@
+ 5
+ You have selected more than five organisms. This will lead to slow responses. If you can, please select fewer. Also, be sure to set your Organism Preferences for an enhanced site experience
+
+
@@ -55,6 +59,12 @@
showOnlyPreferredOrganisms
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
@@ -76,6 +86,12 @@
showOnlyPreferredOrganisms
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
@@ -99,6 +115,12 @@
showOnlyPreferredOrganisms
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
showOnlyPreferredOrganisms
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
@@ -140,6 +168,12 @@
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
showOnlyPreferredOrganisms
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
@@ -210,6 +250,12 @@
showOnlyPreferredOrganisms
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
@@ -236,6 +288,12 @@
showOnlyPreferredOrganisms
highlightReferenceOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
Select the organism(s) you wish to query.
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
Select the organism(s) you wish to query.
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
@@ -291,6 +361,12 @@
showOnlyPreferredOrganisms
+
+ "%%maxRecommendedOrganisms%%"
+
+
+ "%%maxRecommendedMessage%%"
+
Date: Wed, 10 Dec 2025 19:54:43 -0500
Subject: [PATCH 12/66] fix all remianing instances of study.studylink
---
.../wdk/model/questions/params/geneParams.xml | 22 +++++++++----------
.../model/questions/params/popsetParams.xml | 4 ++--
.../model/questions/params/sharedParams.xml | 12 +++++-----
.../model/questions/queries/popsetQueries.xml | 4 ++--
.../wdk/model/records/popsetTableQueries.xml | 6 ++---
.../wdk/model/records/sampleTableQueries.xml | 6 ++---
6 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/geneParams.xml b/Model/lib/wdk/model/questions/params/geneParams.xml
index a8d8c744c..32b322762 100644
--- a/Model/lib/wdk/model/questions/params/geneParams.xml
+++ b/Model/lib/wdk/model/questions/params/geneParams.xml
@@ -8032,8 +8032,8 @@ products of your selected type (or types).
pan.protocol_app_node_id as internal,
'Uninduced sample' as display
from study.protocolappnode pan
- , study.studylink sl
- where sl.study_id = $$profileset_generic$$
+ , study.nodenodeset sl
+ where sl.node_set_id = $$profileset_generic$$
and sl.protocol_app_node_id = pan.protocol_app_node_id
and pan.name like 'No_Tet%tpm%'
@@ -8055,8 +8055,8 @@ products of your selected type (or types).
WHEN (pan.name like 'DIF%') THEN CONCAT('Induced throughout differentiation (DIF = 7 BS doublings + 6 PS doublings)', chr(185))
END as display
FROM study.protocolappnode pan
- , study.studylink sl
- WHERE sl.study_id = $$profileset_generic$$
+ , study.nodenodeset sl
+ WHERE sl.node_set_id = $$profileset_generic$$
AND sl.protocol_app_node_id = pan.protocol_app_node_id
AND pan.name not like 'No_Tet%'
AND pan.name like '%tpm%'
@@ -9213,12 +9213,12 @@ end as term
, pan.PROTOCOL_APP_NODE_ID as internal
, pan2.name as display
, pan2.node_order_num
- FROM study.studylink sl
+ FROM study.nodenodeset sl
, study.protocolappnode pan
, RESULTS.NAFEATUREDIFFRESULT dr
, webready.PANIO_p io
, study.protocolappnode pan2
- WHERE sl.study_id = '$$profileset_generic$$'
+ WHERE sl.node_set_id = '$$profileset_generic$$'
AND sl.PROTOCOL_APP_NODE_ID = pan.PROTOCOL_APP_NODE_ID
AND pan.PROTOCOL_APP_NODE_ID = dr.PROTOCOL_APP_NODE_ID
AND pan.protocol_app_node_id = io.output_pan_id
@@ -9333,13 +9333,13 @@ end as term
)
SELECT distinct ap.value as term, ap.value as internal, ap.value as display, ps.node_order_num
FROM Study.ProtocolAppNode an, Study.ProtocolAppParam ap,
- Study.StudyLink sl, Study.Study s, Study.Output o, perc_samples ps
- WHERE sl.study_id = $$profileset_generic$$
+ Study.nodenodeset sl, Study.nodeset s, Study.Output o, perc_samples ps
+ WHERE sl.node_set_id = $$profileset_generic$$
AND o.protocol_app_node_id = sl.protocol_app_node_id
AND o.protocol_app_id = ap.protocol_app_id
AND an.name like '%DESeq%'
AND o.protocol_app_node_id = an.protocol_app_node_id
- AND sl.study_id = s.study_id
+ AND sl.node_set_id = s.node_set_id
AND ps.study_name = regexp_replace (s.name, ' \[.+\]', '')
AND ap.value = ps.protocol_app_node_name
ORDER BY ps.node_order_num
@@ -9399,10 +9399,10 @@ end as term
SELECT DISTINCT
ndr.protocol_app_node_id as internal, pan.name as term,
pan.name as display
- FROM results.nafeaturediffresult ndr, study.protocolappnode pan, study.studylink sl
+ FROM results.nafeaturediffresult ndr, study.protocolappnode pan, study.nodenodeset sl
WHERE pan.protocol_app_node_id = sl.protocol_app_node_id
AND ndr.protocol_app_node_id = pan.protocol_app_node_id
- AND sl.study_id = '$$profileset_generic$$'
+ AND sl.node_set_id = '$$profileset_generic$$'
diff --git a/Model/lib/wdk/model/questions/params/popsetParams.xml b/Model/lib/wdk/model/questions/params/popsetParams.xml
index b568e439e..3245b56ef 100644
--- a/Model/lib/wdk/model/questions/params/popsetParams.xml
+++ b/Model/lib/wdk/model/questions/params/popsetParams.xml
@@ -450,11 +450,11 @@
r.title as internal
FROM SRES.BIBLIOGRAPHICREFERENCE r
, study.studybibref sbr
- , study.studylink sl
+ , study.nodenodeset sl
, apidbtuning.popsetattributes pa
WHERE r.title is not null
AND r.bibliographic_reference_id = sbr.bibliographic_reference_id
- AND sbr.study_id = sl.study_id
+ AND sbr.node_set_id = sl.node_set_id
AND sl.protocol_app_node_id = pa.protocol_app_node_id
ORDER BY r.title
]]>
diff --git a/Model/lib/wdk/model/questions/params/sharedParams.xml b/Model/lib/wdk/model/questions/params/sharedParams.xml
index 3b63f0d43..9978ebb0a 100644
--- a/Model/lib/wdk/model/questions/params/sharedParams.xml
+++ b/Model/lib/wdk/model/questions/params/sharedParams.xml
@@ -2886,21 +2886,19 @@ This parameter allows you to apply the minimum number of peptides to each select
diff --git a/Model/lib/wdk/model/questions/queries/popsetQueries.xml b/Model/lib/wdk/model/questions/queries/popsetQueries.xml
index 1d7c5e437..0ac93b5a1 100644
--- a/Model/lib/wdk/model/questions/queries/popsetQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/popsetQueries.xml
@@ -144,11 +144,11 @@ from apidbtuning.PopsetAttributes s
select pa.source_id, pa.project_id
from SRES.BIBLIOGRAPHICREFERENCE br
, study.studybibref sbr
- , study.studylink sl
+ , study.nodenodeset sl
, apidbtuning.popsetattributes pa
where br.title = $$study$$
and br.BIBLIOGRAPHIC_REFERENCE_ID = sbr.BIBLIOGRAPHIC_REFERENCE_ID
- and sbr.study_id = sl.study_id
+ and sbr.node_set_id = sl.node_set_id
and sl.PROTOCOL_APP_NODE_ID = pa.PROTOCOL_APP_NODE_ID
]]>
diff --git a/Model/lib/wdk/model/records/popsetTableQueries.xml b/Model/lib/wdk/model/records/popsetTableQueries.xml
index 5f6ccc084..02bddd1e9 100644
--- a/Model/lib/wdk/model/records/popsetTableQueries.xml
+++ b/Model/lib/wdk/model/records/popsetTableQueries.xml
@@ -341,10 +341,10 @@ and bc.ontology_entry_id = oe.ontology_entry_id
CASE WHEN title IS NULL then 'N/A'
WHEN title = 'Direct Submission' then 'N/A'
ELSE CONCAT('view') end AS studyLink
- FROM ApidbTuning.PopsetAttributes ia, Study.StudyLink sl,
- Study.StudyBibRef bib, sres.BibliographicReference ref
+ FROM ApidbTuning.PopsetAttributes ia, Study.nodenodeset sl,
+ Study.StudyBibRef bib, sres.BibliographicReference ref
WHERE ia.protocol_app_node_id = sl.protocol_app_node_id
- AND sl.study_id = bib.study_id
+ AND sl.node_set_id = bib.node_set_id
AND bib.bibliographic_reference_id = ref.bibliographic_reference_id
]]>
diff --git a/Model/lib/wdk/model/records/sampleTableQueries.xml b/Model/lib/wdk/model/records/sampleTableQueries.xml
index f19b732e4..df9747986 100644
--- a/Model/lib/wdk/model/records/sampleTableQueries.xml
+++ b/Model/lib/wdk/model/records/sampleTableQueries.xml
@@ -80,12 +80,12 @@
, edp.dataset_presenter_id
FROM apidbtuning.SampleProcess sd
, apidbTuning.PanResults panr
- , study.Study s
- , study.StudyLink sl
+ , study.nodeset s
+ , study.nodenodeset sl
, apidbTuning.ExternalDbDatasetPresenter edp
WHERE sd.output_pan_id = panr.pan_id
AND panr.pan_id = sl.protocol_app_node_id
- AND sl.study_id = s.study_id
+ AND sl.node_set_id = s.node_set_id
AND s.external_database_release_id = edp.external_database_release_id) q
WHERE q.dataset_presenter_id = dsp.dataset_presenter_id
]]>
From fce42ed31c3d1153b6bff7121642f87617225bdc Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Wed, 10 Dec 2025 20:04:37 -0500
Subject: [PATCH 13/66] changed the remaining study.study and studylink to
nodeset and nodenodeset
---
.../model/questions/params/compoundParams.xml | 14 +++++------
.../wdk/model/questions/params/geneParams.xml | 24 ++++++++++---------
.../model/questions/params/organismParams.xml | 3 +--
.../wdk/model/records/geneTableQueries.xml | 6 ++---
4 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/compoundParams.xml b/Model/lib/wdk/model/questions/params/compoundParams.xml
index f53765000..7f16df89e 100644
--- a/Model/lib/wdk/model/questions/params/compoundParams.xml
+++ b/Model/lib/wdk/model/questions/params/compoundParams.xml
@@ -309,9 +309,9 @@ lower expression in the comparator as compared to the reference.
- SELECT name as term, study_id as internal,
- 'Effect of pH on metabolite levels (Lewis, Baska and Llinas)' as display
- FROM study.study
+ SELECT name as term, node_set_id as internal,
+ 'Effect of pH on metabolite levels (Lewis, Baska and Llinas)' as display
+ FROM study.nodeset
WHERE name = 'Profiles of Metabolites from Llinas'
@@ -323,12 +323,10 @@ lower expression in the comparator as compared to the reference.
select s.name as term
- , s.study_id as internal
+ , s.node_set_id as internal
, replace(s.name, '[metaboliteProfiles]', '') as display --use display name in injector
- from study.study i
- , study.study s
- where i.name = 'compoundMassSpec_Barrett_PurineStarvation_RSRC'
- and s.investigation_id = i.study_id
+ from study.nodeset s
+ where s.name = 'compoundMassSpec_Barrett_PurineStarvation_RSRC'
diff --git a/Model/lib/wdk/model/questions/params/geneParams.xml b/Model/lib/wdk/model/questions/params/geneParams.xml
index 32b322762..a6334b6c8 100644
--- a/Model/lib/wdk/model/questions/params/geneParams.xml
+++ b/Model/lib/wdk/model/questions/params/geneParams.xml
@@ -6514,7 +6514,7 @@ products of your selected type (or types).
SELECT name AS internal, name AS term
- FROM study.study
+ FROM study.nodeset
@@ -6529,9 +6529,10 @@ products of your selected type (or types).
WHEN s.name ='MSN MetaCycle FirstStrand' THEN 'ΔMSN - Sense'
WHEN s.name ='WT MetaCycle SecondStrand' THEN 'WT - Antisense'
ELSE 'ΔMSN Antisense' END "term"
- FROM STUDY.STUDY s, STUDY.STUDY i
- Where i.name = 'ncraOR74A_Bharath_Circadian_Time_Course_ebi_rnaSeq_RSRC'
- And i.study_id = s.INVESTIGATION_ID and s.name like '%MetaCycle%'
+ FROM STUDY.nodeset s
+ -- TODO: may need to join to sres.externaldatabase to filter by dataset
+ -- OLD: FROM STUDY.STUDY s, STUDY.STUDY i WHERE i.name = 'ncraOR74A_Bharath_Circadian_Time_Course_ebi_rnaSeq_RSRC' AND i.study_id = s.INVESTIGATION_ID and s.name like '%MetaCycle%'
+ Where s.name = 'ncraOR74A_Bharath_Circadian_Time_Course_ebi_rnaSeq_RSRC'
@@ -6541,10 +6542,10 @@ products of your selected type (or types).
SELECT s.name as internal, REPLACE (s.name, ' MetaCycle', '') as term
- FROM STUDY.STUDY s, STUDY.STUDY i
- WHERE i.name = 'ncraOR74A_Hurley_2014_NC_3_ebi_rnaSeq_RSRC'
- AND i.study_id = s.INVESTIGATION_ID
- AND s.name like 'time course %'
+ FROM STUDY.nodeset s
+ -- TODO: may need to join to sres.externaldatabase to filter by dataset
+ -- OLD: FROM STUDY.STUDY s, STUDY.STUDY i WHERE i.name = 'ncraOR74A_Hurley_2014_NC_3_ebi_rnaSeq_RSRC' AND i.study_id = s.INVESTIGATION_ID AND s.name like 'time course %'
+ WHERE s.name = 'ncraOR74A_Hurley_2014_NC_3_ebi_rnaSeq_RSRC'
@@ -6569,9 +6570,10 @@ products of your selected type (or types).
SELECT s.name as internal,s.name as term
- FROM STUDY.STUDY s, STUDY.STUDY i
- WHERE i.name = 'agamPEST_microarrayExpression_GSE22585_circadian_rhythm_RSRC'
- AND i.study_id = s.investigation_id and s.name like '%circadian%'
+ FROM STUDY.nodeset s
+ -- TODO: may need to join to sres.externaldatabase to filter by dataset
+ -- OLD: FROM STUDY.STUDY s, STUDY.STUDY i WHERE i.name = 'agamPEST_microarrayExpression_GSE22585_circadian_rhythm_RSRC' AND i.study_id = s.investigation_id and s.name like '%circadian%'
+ WHERE s.name = 'agamPEST_microarrayExpression_GSE22585_circadian_rhythm_RSRC'
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 7de643449..594606324 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -438,7 +438,7 @@
, SRES.TAXONNAME tn
, SRES.EXTERNALDATABASE ed
, SRES.EXTERNALDATABASERELEASE edr
- , STUDY.STUDY s1
+ , STUDY.nodeset s1
, apidb.organism o
WHERE lower(d.NAME) like '%copynumbervariations_%'
AND tn.TAXON_ID = d.TAXON_ID
@@ -448,7 +448,6 @@
AND edr.VERSION = d.VERSION
AND edr.EXTERNAL_DATABASE_ID = ed.EXTERNAL_DATABASE_ID
AND s1.EXTERNAL_DATABASE_RELEASE_ID = edr.EXTERNAL_DATABASE_RELEASE_ID
- AND s1.INVESTIGATION_ID is null
GROUP BY tn.name
ORDER BY tn.NAME
diff --git a/Model/lib/wdk/model/records/geneTableQueries.xml b/Model/lib/wdk/model/records/geneTableQueries.xml
index abaaee24d..7073746e1 100644
--- a/Model/lib/wdk/model/records/geneTableQueries.xml
+++ b/Model/lib/wdk/model/records/geneTableQueries.xml
@@ -1562,7 +1562,7 @@ from (
WHERE ga.na_feature_id = r.na_feature_id
AND r.ROW_ALG_INVOCATION_ID IN (
SELECT DISTINCT s.ROW_ALG_INVOCATION_ID
- FROM study.study s, sres.externaldatabase ed, sres.externaldatabaserelease edr
+ FROM study.nodeset s, sres.externaldatabase ed, sres.externaldatabaserelease edr
WHERE ed.EXTERNAL_DATABASE_ID = edr.EXTERNAL_DATABASE_ID
AND s.EXTERNAL_DATABASE_RELEASE_ID = edr.EXTERNAL_DATABASE_RELEASE_ID
AND ed.name = 'pfal3D7_phenotype_pB_mutagenesis_MIS_MFS_RSRC'
@@ -1584,7 +1584,7 @@ from (
where ga.na_feature_id = r.na_feature_id
and r.row_alg_invocation_id in
(select distinct s.row_alg_invocation_id
- from study.study s, sres.externaldatabase ed, sres.externaldatabaserelease edr
+ from study.nodeset s, sres.externaldatabase ed, sres.externaldatabaserelease edr
where ed.external_database_id = edr.external_database_id
and s.external_database_release_id=edr.external_database_release_id
and ed.name='pknoH_phenotype_piggyBac_mutagenesis_HME_MIS_OIS_RSRC')
@@ -1609,7 +1609,7 @@ from (
where ga.na_feature_id = r.na_feature_id
and r.row_alg_invocation_id in
(select distinct s.row_alg_invocation_id
- from study.study s, sres.externaldatabase ed, sres.externaldatabaserelease edr
+ from study.nodeset s, sres.externaldatabase ed, sres.externaldatabaserelease edr
where ed.external_database_id = edr.external_database_id
and s.external_database_release_id=edr.external_database_release_id
and ed.name='pknoA1H1_phenotype_piggyBac_mutagenesis_MIS_MFS_RSRC')
From a04c6072885b5fb67fc42769df67529636a27083 Mon Sep 17 00:00:00 2001
From: Cristina Aurrecoechea
Date: Thu, 11 Dec 2025 09:24:08 -0500
Subject: [PATCH 14/66] we dont want to show Genetic variation section in gene
pages
---
Model/lib/wdk/model/records/geneRecord.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/lib/wdk/model/records/geneRecord.xml b/Model/lib/wdk/model/records/geneRecord.xml
index af6a9b98c..ebe1d9f9a 100644
--- a/Model/lib/wdk/model/records/geneRecord.xml
+++ b/Model/lib/wdk/model/records/geneRecord.xml
@@ -3433,11 +3433,11 @@ name" internal="true"/>
excludeProjects="EuPathDB,HostDB">
-
+
From 250811ea622c87ca3375f03cfb3cb900f0542f40 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Thu, 11 Dec 2025 12:14:24 -0500
Subject: [PATCH 15/66] add index to apidbtuning.transcriptattributes
---
Model/lib/xml/tuningManager/apiTuningManager.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index b7c2e2767..68bfe3f6b 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -41,6 +41,11 @@
CREATE UNIQUE INDEX transcriptattr_sourceId&1 ON TranscriptAttributes&1 (source_id);
]]>
+
+
+
Date: Thu, 11 Dec 2025 12:58:35 -0500
Subject: [PATCH 16/66] add ProteinAttributes tuning table
---
.../lib/xml/tuningManager/apiTuningManager.xml | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index 68bfe3f6b..11e4bc8da 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -43,7 +43,7 @@
@@ -53,6 +53,21 @@
+
+
+
+
+
+
+
+
+
+
+
From 21fb3b3cf83c4671ba5c304fa8874023099cf177 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Thu, 11 Dec 2025 12:59:48 -0500
Subject: [PATCH 17/66] fix post cache queries
---
.../model/questions/queries/geneQueries.xml | 24 +++++++------------
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index d762b635c..80ceb8d62 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -1320,18 +1320,15 @@
-- map any protein IDs to their transcript ID
UPDATE ##WDK_CACHE_TABLE## qr
SET source_id = (SELECT transcript_source_id
- FROM webready.ProteinAttributes_p
+ FROM apidbtuning.ProteinAttributes
WHERE source_id = qr.source_id
- AND org_abbrev IN (%%PARTITION_KEYS%%)
)
WHERE wdk_instance_id = ##WDK_CACHE_INSTANCE_ID##
AND source_id in (SELECT source_id
- FROM webready.ProteinAttributes_p
- WHERE org_abbrev IN (%%PARTITION_KEYS%%)
+ FROM apidbtuning.ProteinAttributes
)
AND source_id not in (SELECT source_id
- FROM webready.TranscriptAttributes_p
- WHERE org_abbrev IN (%%PARTITION_KEYS%%)
+ FROM apidbtuning.TranscriptAttributes
)
]]>
@@ -1591,9 +1588,8 @@
Date: Thu, 11 Dec 2025 13:05:38 -0500
Subject: [PATCH 18/66] fix proteinattributes index
---
Model/lib/xml/tuningManager/apiTuningManager.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index 11e4bc8da..c0aa25873 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -63,7 +63,7 @@
From 8122ae971a1e2af978e10250d3db8726b7bb0c95 Mon Sep 17 00:00:00 2001
From: bindu
Date: Fri, 12 Dec 2025 10:11:19 -0500
Subject: [PATCH 19/66] replace study and studylink, and deal with
investigation_id
---
.../wdk/model/questions/params/geneParams.xml | 47 ++++++++++++-------
1 file changed, 29 insertions(+), 18 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/geneParams.xml b/Model/lib/wdk/model/questions/params/geneParams.xml
index a6334b6c8..5d4c1dacb 100644
--- a/Model/lib/wdk/model/questions/params/geneParams.xml
+++ b/Model/lib/wdk/model/questions/params/geneParams.xml
@@ -6524,16 +6524,17 @@ products of your selected type (or types).
- SELECT s.name as internal,
+ SELECT s.name as internal,
CASE WHEN s.name ='WT MetaCycle FirstStrand' THEN 'WT - Sense'
WHEN s.name ='MSN MetaCycle FirstStrand' THEN 'ΔMSN - Sense'
WHEN s.name ='WT MetaCycle SecondStrand' THEN 'WT - Antisense'
ELSE 'ΔMSN Antisense' END "term"
- FROM STUDY.nodeset s
- -- TODO: may need to join to sres.externaldatabase to filter by dataset
- -- OLD: FROM STUDY.STUDY s, STUDY.STUDY i WHERE i.name = 'ncraOR74A_Bharath_Circadian_Time_Course_ebi_rnaSeq_RSRC' AND i.study_id = s.INVESTIGATION_ID and s.name like '%MetaCycle%'
- Where s.name = 'ncraOR74A_Bharath_Circadian_Time_Course_ebi_rnaSeq_RSRC'
-
+ FROM STUDY.nodeset s, sres.externaldatabase ed, sres.externaldatabaserelease edr
+ WHERE ed.name = 'ncraOR74A_Bharath_Circadian_Time_Course_ebi_rnaSeq_RSRC'
+ AND ed.external_database_id = edr.external_database_id
+ AND edr.external_database_release_id = s.external_database_release_id
+ AND node_type IN ('RNASeq')
+
@@ -6541,12 +6542,17 @@ products of your selected type (or types).
- SELECT s.name as internal, REPLACE (s.name, ' MetaCycle', '') as term
- FROM STUDY.nodeset s
- -- TODO: may need to join to sres.externaldatabase to filter by dataset
- -- OLD: FROM STUDY.STUDY s, STUDY.STUDY i WHERE i.name = 'ncraOR74A_Hurley_2014_NC_3_ebi_rnaSeq_RSRC' AND i.study_id = s.INVESTIGATION_ID AND s.name like 'time course %'
- WHERE s.name = 'ncraOR74A_Hurley_2014_NC_3_ebi_rnaSeq_RSRC'
-
+ SELECT s.name as internal,
+ CASE WHEN s.name ='WT MetaCycle FirstStrand' THEN 'WT - Sense'
+ WHEN s.name ='MSN MetaCycle FirstStrand' THEN 'ΔMSN - Sense'
+ WHEN s.name ='WT MetaCycle SecondStrand' THEN 'WT - Antisense'
+ ELSE 'ΔMSN Antisense' END "term"
+ FROM STUDY.nodeset s, sres.externaldatabase ed, sres.externaldatabaserelease edr
+ WHERE ed.name = 'ncraOR74A_Hurley_2014_NC_3_ebi_rnaSeq_RSRC'
+ AND ed.external_database_id = edr.external_database_id
+ AND edr.external_database_release_id = s.external_database_release_id
+ AND node_type IN ('RNASeq')
+
@@ -6569,12 +6575,17 @@ products of your selected type (or types).
- SELECT s.name as internal,s.name as term
- FROM STUDY.nodeset s
- -- TODO: may need to join to sres.externaldatabase to filter by dataset
- -- OLD: FROM STUDY.STUDY s, STUDY.STUDY i WHERE i.name = 'agamPEST_microarrayExpression_GSE22585_circadian_rhythm_RSRC' AND i.study_id = s.investigation_id and s.name like '%circadian%'
- WHERE s.name = 'agamPEST_microarrayExpression_GSE22585_circadian_rhythm_RSRC'
-
+ SELECT s.name as internal,
+ CASE WHEN s.name ='WT MetaCycle FirstStrand' THEN 'WT - Sense'
+ WHEN s.name ='MSN MetaCycle FirstStrand' THEN 'ΔMSN - Sense'
+ WHEN s.name ='WT MetaCycle SecondStrand' THEN 'WT - Antisense'
+ ELSE 'ΔMSN Antisense' END "term"
+ FROM STUDY.nodeset s, sres.externaldatabase ed, sres.externaldatabaserelease edr
+ WHERE ed.name = 'agamPEST_microarrayExpression_GSE22585_circadian_rhythm_RSRC'
+ AND ed.external_database_id = edr.external_database_id
+ AND edr.external_database_release_id = s.external_database_release_id
+ AND node_type IN ('microarray')
+
From ece6cbeff46f5d3efea3e86e82ae0ed7b6feb8c2 Mon Sep 17 00:00:00 2001
From: bindu
Date: Fri, 12 Dec 2025 10:12:15 -0500
Subject: [PATCH 20/66] replace study and studylink, and deal with
investigation_id in DST files
---
Model/lib/dst/metaCycle.dst | 9 +++++----
Model/lib/dst/rnaSeqTemplates.dst | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/Model/lib/dst/metaCycle.dst b/Model/lib/dst/metaCycle.dst
index aa386bff2..b83d54f08 100644
--- a/Model/lib/dst/metaCycle.dst
+++ b/Model/lib/dst/metaCycle.dst
@@ -68,11 +68,12 @@ prop=includeProjectsExcludeEuPathDB
diff --git a/Model/lib/dst/rnaSeqTemplates.dst b/Model/lib/dst/rnaSeqTemplates.dst
index bce0955be..2421c69fe 100644
--- a/Model/lib/dst/rnaSeqTemplates.dst
+++ b/Model/lib/dst/rnaSeqTemplates.dst
@@ -1154,11 +1154,12 @@ prop=includeProjectsExcludeEuPathDB
From 434482ef2c40ed94846fb54a9bfd24a2e33e3809 Mon Sep 17 00:00:00 2001
From: bindu
Date: Fri, 12 Dec 2025 11:17:33 -0500
Subject: [PATCH 21/66] replace study with nodeset
---
Model/lib/dst/rnaSeqTemplates.dst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/lib/dst/rnaSeqTemplates.dst b/Model/lib/dst/rnaSeqTemplates.dst
index 2421c69fe..f67119bff 100644
--- a/Model/lib/dst/rnaSeqTemplates.dst
+++ b/Model/lib/dst/rnaSeqTemplates.dst
@@ -734,14 +734,14 @@ SELECT study_id AS internal,
ELSE ps_name || sense END AS display
FROM (
- SELECT DISTINCT s.study_id as study_id
+ SELECT DISTINCT s.node_set_id as study_id
, s.name as name
, REGEXP_REPLACE (s.name, '\[(.)+\]', '') AS ps_name
,REPLACE (REPLACE ( REPLACE ( REPLACE ( REGEXP_SUBSTR (s.name, ' \[\S+ ') , 'DESeq2Analysis', '') , 'unique' , '' ), '[', '') , '-', ' ' ) AS anal
,CASE WHEN REGEXP_LIKE (s.name, '${sense}') THEN '- Sense'
WHEN REGEXP_LIKE (s.name, ' ${antisense}') THEN '- Antisense'
ELSE 'unstranded' END AS sense
-from study.study s
+from study.nodeset s
, SRES.EXTERNALDATABASERELEASE r
, sres.externaldatabase d
where lower(s.name) like '%deseq%'
From d91a89c8964c2312ff5cc4a698d94971c1edab77 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Fri, 12 Dec 2025 12:57:03 -0500
Subject: [PATCH 22/66] fix expression confidence queries
---
Model/lib/dst/expression.dst | 9 ---------
Model/lib/wdk/model/questions/queries/geneQueries.xml | 6 +++---
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/Model/lib/dst/expression.dst b/Model/lib/dst/expression.dst
index df08174b2..eb389c226 100644
--- a/Model/lib/dst/expression.dst
+++ b/Model/lib/dst/expression.dst
@@ -12,13 +12,6 @@ prop=projectName
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index 721b43e31..3530e5af7 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -4902,8 +4902,8 @@
= $$fold_change$$
@@ -4934,7 +4934,7 @@
Date: Sat, 13 Dec 2025 10:09:41 -0500
Subject: [PATCH 23/66] fix bug in apidbtuning.Profile
---
Model/lib/xml/tuningManager/apiTuningManager.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index c0aa25873..69f17c2df 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -1649,9 +1649,9 @@ create index Organism_projectId_idx&1 ON OrganismAttributes&1 (project_id, sourc
na_feature_id numeric(10,0),
node_type character varying(200),
profile_as_string_value text,
+ profile_as_string_stderr text,
profile_as_string_percentile1 text,
- profile_as_string_percentile2 text,
- profile_as_string_stderr text
+ profile_as_string_percentile2 text
)
]]>
From dec6a7c8e44a83c086b4f1beaf5d07a19194c973 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Sun, 14 Dec 2025 09:15:43 -0500
Subject: [PATCH 24/66] use transattr tuning tbl as needed
---
.../model/questions/queries/geneQueries.xml | 64 +++++++++----------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index 3530e5af7..a42ec9e48 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -3269,7 +3269,7 @@
SELECT ta.gene_source_id, ta.source_id, 'Y' AS matched_result, ta.project_id
, max(round(profile_min_max.max_value::numeric, 1)) AS max_percentile_chosen
, min(round(profile_min_max.min_value::numeric, 1)) AS min_percentile_chosen
- FROM webready.TranscriptAttributes_p ta
+ FROM apidbtuning.TranscriptAttributes ta
, (
SELECT res.na_feature_id, res.protocol_app_node_id
FROM results.NaFeatureExpression res
@@ -3328,13 +3328,13 @@
, CASE WHEN (gls.LOD_SCORE_EXP = 0) THEN gls.LOD_SCORE_MANT::varchar
ELSE to_char(gls.LOD_SCORE_MANT * power(10::double precision, gls.LOD_SCORE_EXP),'99.99EEEE')
END AS lod_score
- FROM webready.TranscriptAttributes_p ga, apidb.nafeaturehaploblock gls
+ FROM apidbtuning.TranscriptAttributes ga, apidb.nafeaturehaploblock gls
WHERE gls.na_feature_id = ga.gene_na_feature_id
AND gls.LOD_SCORE_MANT * power(10::double precision, gls.LOD_SCORE_EXP) >= $$lod_score$$
AND lower(ga.gene_source_id) != lower($$pf_gene_id$$)
AND gls.HAPLOTYPE_BLOCK_NAME IN (
SELECT DISTINCT HAPLOTYPE_BLOCK_NAME
- FROM webready.TranscriptAttributes_p ga, apidb.nafeaturehaploblock gls
+ FROM apidbtuning.TranscriptAttributes ga, apidb.nafeaturehaploblock gls
WHERE gls.na_feature_id = ga.gene_na_feature_id
AND lower(ga.gene_source_id) = lower($$pf_gene_id$$)
AND LOD_SCORE_MANT * power(10::double precision, LOD_SCORE_EXP) >= $$lod_score$$
@@ -3343,7 +3343,7 @@
GROUP BY gene_source_id
HAVING ((count(*) * 100) / (
SELECT count(*)
- FROM webready.TranscriptAttributes_p ga, apidb.nafeaturehaploblock gls
+ FROM apidbtuning.TranscriptAttributes ga, apidb.nafeaturehaploblock gls
WHERE gls.na_feature_id = ga.gene_na_feature_id AND lower(ga.gene_source_id) = lower($$pf_gene_id$$) AND
LOD_SCORE_MANT * power(10::double precision, LOD_SCORE_EXP) >= $$lod_score$$
)) >= $$percentage_sim_haploblck$$
@@ -3356,7 +3356,7 @@
ELSE to_char(gls.LOD_SCORE_MANT * power(10::double precision, gls.LOD_SCORE_EXP), '99.99EEEE')
END AS cut_off
, ga.gene_source_id
- FROM webready.TranscriptAttributes_p ga, apidb.nafeaturehaploblock gls
+ FROM apidbtuning.TranscriptAttributes ga, apidb.nafeaturehaploblock gls
WHERE gls.na_feature_id = ga.gene_na_feature_id
AND lower(ga.gene_source_id) = lower($$pf_gene_id$$)
AND LOD_SCORE_MANT * power(10::double precision, LOD_SCORE_EXP) >= $$lod_score$$
@@ -3365,7 +3365,7 @@
) b
WHERE a.gene_source_id != b.gene_source_id
) q
- , webready.TranscriptAttributes_p ta
+ , apidbtuning.TranscriptAttributes ta
WHERE ta.gene_source_id = q.gene_source_id
]]>
@@ -3395,7 +3395,7 @@
END AS lod_score
FROM dots.chromosomeelementfeature cef
, apidb.nafeaturehaploblock gls
- , webready.TranscriptAttributes_p ga
+ , apidbtuning.TranscriptAttributes ga
, dots.externalnasequence ens
, dots.nalocation nl
WHERE ens.source_id = $$pf_seqid$$
@@ -3472,7 +3472,7 @@
HAVING count(*) = 2
) pan,
results.NAFeatureDiffResult r,
- webready.TranscriptAttributes_p t
+ apidbtuning.TranscriptAttributes t
WHERE pan.protocol_app_node_id = r.protocol_app_node_id
AND r.NA_FEATURE_ID = t.gene_na_feature_id
AND r.adj_p_value <= $$adj_p_value$$
@@ -3582,7 +3582,7 @@
ELSE round(two.chosen::numeric, 2)
END AS chose_group_two
FROM
- webready.TranscriptAttributes_p ga
+ apidbtuning.TranscriptAttributes ga
, (
SELECT res.na_feature_id
, CASE WHEN &&isLogged&& = 1 AND $$min_max_avg_comp$$ = 'minimum'
@@ -3777,7 +3777,7 @@
END)
END AS chose_group_two
FROM
- webready.TranscriptAttributes_p ga
+ apidbtuning.TranscriptAttributes ga
, (
SELECT res.na_feature_id
, CASE WHEN &&isLogged&& = 1 AND 'average' = 'minimum'
@@ -3926,7 +3926,7 @@
, round($$antisense_direction$$ * log(2, REPLACE($$antisense_fold_change$$,0,0.0001)), 1) AS antisense_fold_change
, round($$sense_direction$$ * log(2, REPLACE($$sense_fold_change$$,0,0.0001)), 1) AS sense_fold_change
FROM
- webready.TranscriptAttributes_p ga
+ apidbtuning.TranscriptAttributes ga
, (
SELECT NA_FEATURE_ID
, string_agg(sample_pair, ', ' ORDER BY NA_FEATURE_ID) AS sample_pairs
@@ -4128,7 +4128,7 @@
AND pan.protocol_app_node_id = res.protocol_app_node_id
GROUP BY res.na_feature_id
) two
- , webready.TranscriptAttributes_p ga
+ , apidbtuning.TranscriptAttributes ga
WHERE one.na_feature_id = two.na_feature_id
AND ga.gene_na_feature_id = one.na_feature_id
AND ga.gene_na_feature_id = two.na_feature_id
@@ -4199,7 +4199,7 @@
, round($$antisense_direction$$ * log(2, $$antisense_fold_change$$), 1) AS antisense_fold_change
, round($$sense_direction$$ * log(2, $$sense_fold_change$$), 1) AS sense_fold_change
FROM
- webready.TranscriptAttributes_p ga
+ apidbtuning.TranscriptAttributes ga
, (
SELECT ref_sense_result.na_feature_id
, string_agg(CONCAT(ref_sense_pan.sample, '->', comp_sense_pan.sample), ', '
@@ -4310,7 +4310,7 @@
, to_char(p_value, '9.99EEEE') AS p_value
, p_value sorting_p_value
FROM
- webready.TranscriptAttributes_p ta
+ apidbtuning.TranscriptAttributes ta
, (
SELECT na_feature_id
, round(avg(CASE source_set WHEN 'ref' THEN linear_value END), 3) linear_avg_ref
@@ -4399,7 +4399,7 @@
else linear_avg_ref end, 6) as avg_group_two,
to_char( p_value, '9.99EEEE') as p_value,
p_value sorting_p_value
- from webready.TranscriptAttributes_p ta,
+ from apidbtuning.TranscriptAttributes ta,
(select na_feature_id,
round(avg(decode(source_set, 'ref', linear_value, null)), 3) linear_avg_ref,
round(avg(decode(source_set, 'comp', linear_value, null)), 3) linear_avg_comp,
@@ -4478,7 +4478,7 @@
else linear_avg_ref end, 6) as avg_group_two,
to_char( p_value, '9.99EEEE') as p_value,
p_value sorting_p_value
- from webready.TranscriptAttributes_p ta,
+ from apidbtuning.TranscriptAttributes ta,
(select na_feature_id,
round(avg(decode(source_set, 'ref', linear_value, null)), 3) linear_avg_ref,
round(avg(decode(source_set, 'comp', linear_value, null)), 3) linear_avg_comp,
@@ -4553,7 +4553,7 @@
else linear_avg_ref end, 6) as avg_group_two,
to_char( p_value, '9.99EEEE') as p_value,
p_value sorting_p_value
- from webready.TranscriptAttributes_p ta,
+ from apidbtuning.TranscriptAttributes ta,
(select na_feature_id,
round(avg(decode(source_set, 'ref', linear_value, null)), 3) linear_avg_ref,
round(avg(decode(source_set, 'comp', linear_value, null)), 3) linear_avg_comp,
@@ -4623,7 +4623,7 @@
else linear_avg_ref end, 6) as avg_group_two,
to_char( p_value, '9.99EEEE') as p_value,
p_value sorting_p_value
- from webready.TranscriptAttributes_p ta,
+ from apidbtuning.TranscriptAttributes ta,
(select na_feature_id,
round(avg(decode(source_set, 'ref', linear_value, null)), 3) linear_avg_ref,
round(avg(decode(source_set, 'comp', linear_value, null)), 3) linear_avg_comp,
@@ -4872,7 +4872,7 @@
WHERE sl.protocol_app_node_id = pan.protocol_app_node_id
AND pan.protocol_app_node_id in ($$samples_fc_ref_generic$$)
AND pan.protocol_app_node_id = res.protocol_app_node_id
- ) expr, webready.TranscriptAttributes_p ta
+ ) expr, apidbtuning.TranscriptAttributes ta
WHERE ( $$protein_coding_only$$ = 'no' OR ta.gene_type = $$protein_coding_only$$ )
AND $$regulated_dir$$ (expr.fold_difference) >= $$fold_difference$$
AND ta.gene_na_feature_id = expr.gene_feature_id
@@ -4904,7 +4904,7 @@
SELECT ta.source_id, ta.gene_source_id, ta.project_id, 'Y' as matched_result,
round(r.fold_change::numeric, 2) as fold_change,
round(r.confidence::numeric, 2) as confidence
- FROM webready.TranscriptAttributes_p ta
+ FROM apidbtuning.TranscriptAttributes ta
, results.nafeaturediffresult r
WHERE $$regulated_dir$$ (r.fold_change) >= $$fold_change$$
AND r.confidence >= $$confidence$$
@@ -4936,7 +4936,7 @@
SELECT ta.source_id, ta.gene_source_id, ta.project_id, 'Y' as matched_result,
round(r.fold_change::numeric, 2) as fold_change,
TO_CHAR( coalesce(r.adj_p_value, r.p_value), '99.99EEEE') as pvalue
- FROM webready.TranscriptAttributes_p ta
+ FROM apidbtuning.TranscriptAttributes ta
, results.nafeaturediffresult r
WHERE $$regulated_dir$$ (r.fold_change) >= $$fold_change$$
AND coalesce(r.adj_p_value, r.p_value) <= to_char($$dcc_p_value$$,'99.99999999999999')
@@ -4964,7 +4964,7 @@
From dee4bf5635faab13076a69ce1a81167b3b52ec2f Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Mon, 15 Dec 2025 11:23:03 -0500
Subject: [PATCH 25/66] fix sense/antisense query
---
.../wdk/model/questions/params/geneParams.xml | 2 +-
.../model/questions/queries/geneQueries.xml | 20 +++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/geneParams.xml b/Model/lib/wdk/model/questions/params/geneParams.xml
index 5d4c1dacb..dadce47cd 100644
--- a/Model/lib/wdk/model/questions/params/geneParams.xml
+++ b/Model/lib/wdk/model/questions/params/geneParams.xml
@@ -7898,7 +7898,7 @@ products of your selected type (or types).
WITH tpm AS (
- SELECT coalesce(round(power(10,10) / (num_reads * tx_length),2), 1) as value
+ SELECT coalesce(round((power(10,10)/(num_reads * tx_length))::numeric, 2), 1) as value
FROM (
SELECT min(rs.avg_unique_reads) as num_reads, min(oa.avg_transcript_length) as tx_length
FROM apidbTuning.ProfileSamples ps
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index a42ec9e48..50cdb37db 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -3876,13 +3876,13 @@
' , comp1.sample ) as sample_pair
- , round(CASE WHEN comp1.sense_value / greatest($$antisense_floor$$, ref1.sense_value) > 1
+ , round((CASE WHEN comp1.sense_value / greatest($$antisense_floor$$, ref1.sense_value) > 1
THEN comp1.sense_value / greatest($$antisense_floor$$, ref1.sense_value)
ELSE ref1.sense_value / greatest($$antisense_floor$$, comp1.sense_value)
END
@@ -3942,7 +3942,7 @@
THEN comp1.antisense_value / greatest($$antisense_floor$$, ref1.antisense_value)
ELSE ref1.antisense_value / greatest($$antisense_floor$$, comp1.antisense_value)
END
- , 1) AS FC_product
+ )::numeric, 1) AS FC_product
FROM comp1, ref1
WHERE ref1.NA_FEATURE_ID = comp1.NA_FEATURE_ID
AND ref1.sample != comp1.sample
From 9835cba4fee3c29b549131f1099c5f207ebd6f64 Mon Sep 17 00:00:00 2001
From: Ryan Doherty
Date: Mon, 15 Dec 2025 13:49:55 -0500
Subject: [PATCH 26/66] Fix attributes list for EuPath
---
Model/lib/wdk/model/questions/geneQuestions.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Model/lib/wdk/model/questions/geneQuestions.xml b/Model/lib/wdk/model/questions/geneQuestions.xml
index 336d9c32a..792903c44 100644
--- a/Model/lib/wdk/model/questions/geneQuestions.xml
+++ b/Model/lib/wdk/model/questions/geneQuestions.xml
@@ -1617,7 +1617,7 @@ IMPORTANT:
searchCategory="Protein Expression"
queryRef="GeneId.GenesByMassSpec"
recordClassRef="TranscriptRecordClasses.TranscriptRecordClass">
-
From 259eb33bef345a60eea8dd77a74164541c1760f3 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Mon, 15 Dec 2025 14:33:55 -0500
Subject: [PATCH 27/66] fix rnaseq Similarity query
---
Model/lib/dst/rnaSeqTemplates.dst | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/Model/lib/dst/rnaSeqTemplates.dst b/Model/lib/dst/rnaSeqTemplates.dst
index f67119bff..490cc8ef5 100644
--- a/Model/lib/dst/rnaSeqTemplates.dst
+++ b/Model/lib/dst/rnaSeqTemplates.dst
@@ -807,13 +807,8 @@ prop=includeProjectsExcludeEuPathDB
From e31b3f5673bd8098dad45ed05eb7d14705fb20ca Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Mon, 15 Dec 2025 17:22:28 -0500
Subject: [PATCH 28/66] fix cellXgene query
---
Model/lib/wdk/model/questions/params/geneParams.xml | 4 +---
Model/lib/wdk/model/questions/queries/geneQueries.xml | 5 +++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/geneParams.xml b/Model/lib/wdk/model/questions/params/geneParams.xml
index dadce47cd..b84cc750e 100644
--- a/Model/lib/wdk/model/questions/params/geneParams.xml
+++ b/Model/lib/wdk/model/questions/params/geneParams.xml
@@ -6606,10 +6606,8 @@ products of your selected type (or types).
, apidbtuning.datasetdatasource dd
, apidb.organism o
WHERE o.abbrev = $$organismsWithSingleCell$$
- WHERE dd.taxon_id = o.taxon_id
+ AND dd.taxon_id = o.taxon_id
AND dsp.name like '%cellxgene%'
- AND dsp.name = dnt.name
- AND ed.name = dnt.name
AND dsp.name = ed.name
AND ed.external_database_id = edr.external_database_id
]]>
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index 50cdb37db..4ac674e8e 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -5998,7 +5998,7 @@ select distinct ta.gene_source_id
feature_sub.feature,
ed.name AS dataset_name,
'Y' AS matched_result
- FROM apidbtuning.TranscriptAttributes ta
+ FROM webready.TranscriptAttributes_p ta
LEFT JOIN LATERAL (
SELECT cxg.source_id AS feature
FROM apidb.cellxgene cxg
@@ -6009,7 +6009,8 @@ select distinct ta.gene_source_id
JOIN sres.externaldatabaserelease edr
ON edr.external_database_release_id = $$singleCellDataset$$
JOIN sres.externaldatabase ed
- ON ed.external_database_id = edr.external_database_id;
+ ON ed.external_database_id = edr.external_database_id
+ WHERE ta.org_abbrev in ($$organismsWithSingleCell$$)
]]>
From ad953baac0eaf634085a265d425d02e79dd4b25a Mon Sep 17 00:00:00 2001
From: bindu
Date: Tue, 16 Dec 2025 12:12:43 -0500
Subject: [PATCH 29/66] add in the internalDependency for Profile table
---
Model/lib/xml/tuningManager/apiTuningManager.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index 69f17c2df..a19b08629 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -1640,6 +1640,7 @@ create index Organism_projectId_idx&1 ON OrganismAttributes&1 (project_id, sourc
+
From 0623c42573f68ec94ad53059db1cabb0777d4997 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Tue, 16 Dec 2025 13:18:08 -0500
Subject: [PATCH 30/66] add index to transattr
---
Model/lib/xml/tuningManager/apiTuningManager.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index a19b08629..8183a1cf7 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -51,6 +51,11 @@
CREATE INDEX transcriptattr_t_p&1 ON TranscriptAttributes&1 (taxon_id, project_id, source_id);
]]>
+
+
+
From 20048ccda8b088ee983cd841ba9b8608d9e06bac Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Tue, 16 Dec 2025 13:19:17 -0500
Subject: [PATCH 31/66] speed up user comments query
---
Model/lib/wdk/model/questions/queries/geneQueries.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index 4ac674e8e..7417c24d2 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -5449,7 +5449,7 @@ select distinct ta.gene_source_id
) t
GROUP BY stable_id
) comm,
- webready.TranscriptAttributes_p ta
+ apidbtuning.TranscriptAttributes ta
WHERE comm.stable_id = ta.gene_source_id
AND ta.org_abbrev in ($$organism_select_all$$)
]]>
From e742f998fc4000126170294f506514e1132d3a6f Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Wed, 17 Dec 2025 10:06:19 -0500
Subject: [PATCH 32/66] add categoryIri for wgcna (this is a temporary fix)
---
.../org/apidb/apicommon/model/datasetInjector/RNASeqWGCNA.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeqWGCNA.java b/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeqWGCNA.java
index 694af19b0..509cc784b 100644
--- a/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeqWGCNA.java
+++ b/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeqWGCNA.java
@@ -5,10 +5,13 @@ public class RNASeqWGCNA extends RNASeqEbi {
@Override
public void injectTemplates() {
+ setPropValue("datasetClassCategoryIri", "http://purl.obolibrary.org/obo/OBI_0001271");
super.injectTemplates();
+
+
injectTemplate("rnaSeqWGCNAModulesQuestion");
setPropValue("searchCategory", "searchCategory-transcriptomics-iterativeWGCNA");
setPropValue("questionName", "GeneQuestions.GenesByRNASeq" + getDatasetName() + "WGCNAModules");
From 8a829370c1af375d58e198e30f15da2e4f3c1c69 Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Wed, 17 Dec 2025 12:09:59 -0500
Subject: [PATCH 33/66] make sure to set the profilegraph help as it is used in
a template
---
.../java/org/apidb/apicommon/model/datasetInjector/RNASeq.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeq.java b/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeq.java
index da6c925a7..d4b892c2f 100644
--- a/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeq.java
+++ b/Model/src/main/java/org/apidb/apicommon/model/datasetInjector/RNASeq.java
@@ -50,6 +50,7 @@ protected void setGraphYAxisDescription() {
@Override
public void injectTemplates() {
setShortAttribution();
+ setProfileSamplesHelp();
String projectName = getPropValue("projectName");
//String presenterId = getPropValue("presenterId");
From f4aa3e793ffcff61de3b27f476e4ec5b91635ff4 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Wed, 17 Dec 2025 13:33:05 -0500
Subject: [PATCH 34/66] fix eQTL query
---
.../model/records/dynSpanAttributeQueries.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Model/lib/wdk/model/records/dynSpanAttributeQueries.xml b/Model/lib/wdk/model/records/dynSpanAttributeQueries.xml
index 51e2996a5..e47bbe145 100644
--- a/Model/lib/wdk/model/records/dynSpanAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/dynSpanAttributeQueries.xml
@@ -56,22 +56,22 @@
SELECT ids.source_id, ids.project_id, lower(ids.project_id) as project_id_lc,ids.seq_source_id,
ids.start_min, ids.end_max, ids.strand,
(ids.end_max - ids.start_min + 1) AS length,
- trim(to_char(ids.end_max,'999,999,999')) as end_text,
- trim(to_char(ids.start_min,'999,999,999')) as start_text,
- trim(to_char((ids.end_max - ids.start_min + 1),'999,999,999')) as length_text,
+ ids.end_max::text as end_text,
+ ids.start_min::text as start_text,
+ (ids.end_max - ids.start_min + 1)::text as length_text,
sa.organism, o.public_abbrev as organismAbbrev,
ids.start_min - 1000 AS context_start, ids.end_max + 1000 AS context_end
FROM (
SELECT source_id, project_id,
regexp_substr(source_id, '[^:]+', 1, 1) as seq_source_id,
- regexp_substr(regexp_substr(source_id, '[^:]+', 1, 2), '[^\-]+', 1,1) as start_min,
- regexp_substr(regexp_substr(source_id, '[^:]+', 1, 2), '[^\-]+', 1,2) as end_max,
+ regexp_substr(regexp_substr(source_id, '[^:]+', 1, 2), '[^\-]+', 1,1)::integer as start_min,
+ regexp_substr(regexp_substr(source_id, '[^:]+', 1, 2), '[^\-]+', 1,2)::integer as end_max,
case when regexp_substr(source_id, '[^:]+', 1, 3) = 'f' then '+'
when regexp_substr(source_id, '[^:]+', 1, 3) = 'r' then '-'
else 'Unknown' end as strand
FROM (##WDK_ID_SQL##) t
) ids
- LEFT JOIN webready.GenomicSeqAttributes_p sa ON ids.seq_source_id = sa.source_id
+ LEFT JOIN apidbtuning.GenomicSeqAttributes sa ON ids.seq_source_id = sa.source_id
INNER JOIN apidbtuning.organismattributes o ON o.organism_name = sa.organism
]]>
@@ -113,7 +113,7 @@
else 'Unknown' end as strand
FROM (##WDK_ID_SQL##) t
) ids
- LEFT JOIN webready.GenomicSeqAttributes_p sa ON ids.seq_source_id = sa.source_id
+ LEFT JOIN apidbtuning.GenomicSeqAttributes sa ON ids.seq_source_id = sa.source_id
INNER JOIN apidbtuning.organismattributes o ON o.organism_name = sa.organism
]]>
@@ -253,4 +253,4 @@
-->
-
\ No newline at end of file
+
From 8ef2f6acbeadee6fd94a149cc26331b3e2ef9bee Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Wed, 17 Dec 2025 14:30:53 -0500
Subject: [PATCH 35/66] use unpartitioned table for bfmv
---
Model/lib/wdk/model/records/transcriptAttributeQueries.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
index 4c70ff4ef..438b58469 100644
--- a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
@@ -459,8 +459,8 @@
replace(bfmv.predicted_go_id_component, 'GO_', 'GO:') as predicted_go_id_component,
replace(bfmv.predicted_go_id_function, 'GO_', 'GO:') as predicted_go_id_function,
replace(bfmv.predicted_go_id_process, 'GO_', 'GO:') as predicted_go_id_process
- FROM webready.TranscriptAttributes_p bfmv
- WHERE bfmv.org_abbrev in (%%PARTITION_KEYS%%)
+ FROM apidbtuning.TranscriptAttributes bfmv
+ --WHERE bfmv.org_abbrev in (%%PARTITION_KEYS%%)
]]>
From d9425f2e0a7cd1df899b1096dc302775cbd31591 Mon Sep 17 00:00:00 2001
From: Mustafa Nural
Date: Wed, 17 Dec 2025 14:42:12 -0500
Subject: [PATCH 36/66] move org_abbrev filter out of join condition to fix
partition explosion.
when the filter is on the join then it's not applied to the other joins against the transcript_attributes table.
---
Model/lib/psql/webready/orgSpecific/GeneAttributes_p.psql | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Model/lib/psql/webready/orgSpecific/GeneAttributes_p.psql b/Model/lib/psql/webready/orgSpecific/GeneAttributes_p.psql
index bfc5e2503..3c5fd1289 100644
--- a/Model/lib/psql/webready/orgSpecific/GeneAttributes_p.psql
+++ b/Model/lib/psql/webready/orgSpecific/GeneAttributes_p.psql
@@ -82,8 +82,9 @@
OR d.name like '%_dbxref_uniprot_from_annotation_RSRC')
) t
GROUP BY na_feature_id
- ) uniprot ON ta.gene_na_feature_id = uniprot.na_feature_id and ta.org_abbrev = ':ORG_ABBREV'
+ ) uniprot ON ta.gene_na_feature_id = uniprot.na_feature_id
LEFT JOIN :SCHEMA.GeneProduct_p gp ON ta.gene_source_id = gp.source_id and gp.org_abbrev = ':ORG_ABBREV'
+ WHERE ta.org_abbrev = ':ORG_ABBREV'
ORDER BY ta.gene_source_id;
:DECLARE_PARTITION;
From 56abee815c1c3481f4bd3496d438ad2614169343 Mon Sep 17 00:00:00 2001
From: Mustafa Nural
Date: Wed, 17 Dec 2025 14:45:28 -0500
Subject: [PATCH 37/66] add missing org_abbrev filter to IntronSupportLevel_p
---
Model/lib/psql/webready/orgSpecific/IntronSupportLevel_p.psql | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Model/lib/psql/webready/orgSpecific/IntronSupportLevel_p.psql b/Model/lib/psql/webready/orgSpecific/IntronSupportLevel_p.psql
index cee0e1ba3..7fb5296e6 100644
--- a/Model/lib/psql/webready/orgSpecific/IntronSupportLevel_p.psql
+++ b/Model/lib/psql/webready/orgSpecific/IntronSupportLevel_p.psql
@@ -10,7 +10,7 @@ with annotatedJunctions AS (
, il.is_reversed
from apidb.intronlocation il
inner join :SCHEMA.TranscriptAttributes_p ta
- ON il.parent_id = ta.na_feature_id
+ ON il.parent_id = ta.na_feature_id and ta.org_abbrev = ':ORG_ABBREV'
) group by gene_source_id
), exptJunctions as (
select gij.gene_source_id
From aee928a496dfe7118826e34e83f7d2b14a17ebb5 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Wed, 17 Dec 2025 14:52:34 -0500
Subject: [PATCH 38/66] speed eQTL query
---
Model/lib/wdk/model/questions/queries/spanQueries.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Model/lib/wdk/model/questions/queries/spanQueries.xml b/Model/lib/wdk/model/questions/queries/spanQueries.xml
index fd18021d1..86d993dff 100644
--- a/Model/lib/wdk/model/questions/queries/spanQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/spanQueries.xml
@@ -409,6 +409,7 @@ and annotated_intron in ($$Intron_junction_novelty$$)
AND cef.name = gls.HAPLOTYPE_BLOCK_NAME
AND nl.na_feature_id = cef.na_feature_id
AND cef.na_sequence_id = ens.na_sequence_id
+ AND ga.org_abbrev = 'pfal3D7'
AND gls.LOD_SCORE_MANT * power(10::double precision, gls.LOD_SCORE_EXP) >= $$lod_score$$
) t
GROUP BY sequence_id, start_loc, end_loc
From 5aa5bd981c26854ba4d3f21c76a15a2cd1502191 Mon Sep 17 00:00:00 2001
From: Bob
Date: Wed, 17 Dec 2025 21:28:56 +0000
Subject: [PATCH 39/66] add Steve-ish modified HTML-structured
maxRecommendedMsg
---
.../wdk/model/questions/params/organismParams.xml | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 53db556aa..806ee3427 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -1,7 +1,20 @@
5
- You have selected more than five organisms. This will lead to slow responses. If you can, please select fewer. Also, be sure to set your Organism Preferences for an enhanced site experience
+
+ You are selecting more than five organisms.
+
+
+ Selecting a large number of organisms may impact performance and make
+ results harder to interpret.
+
+
+ Please select five or fewer organisms where possible. For the best experience,
+ use My Organism Preferences in the page header to focus on the organisms
+ you care about most.
+
+]]>
From 5ee43b5eb1f99b1d90affa1aa46fee46eaa75669 Mon Sep 17 00:00:00 2001
From: Bob
Date: Wed, 17 Dec 2025 22:04:36 +0000
Subject: [PATCH 40/66] Remove quotes from value interpolations
---
.../model/questions/params/organismParams.xml | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 806ee3427..d4c5351ef 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -76,7 +76,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -103,7 +103,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -132,7 +132,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -159,7 +159,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -185,7 +185,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -210,7 +210,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -267,7 +267,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -280,7 +280,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -305,7 +305,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -327,7 +327,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -341,7 +341,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
@@ -378,7 +378,7 @@
"%%maxRecommendedOrganisms%%"
- "%%maxRecommendedMessage%%"
+ %%maxRecommendedMessage%%
From eec2e9b2e692447ff0d8c5fd33b122e9ea6ed412 Mon Sep 17 00:00:00 2001
From: Bob
Date: Wed, 17 Dec 2025 22:11:24 +0000
Subject: [PATCH 41/66] try another CDATA wrapper
---
.../model/questions/params/organismParams.xml | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index d4c5351ef..5553b93a9 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -76,7 +76,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -103,7 +103,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -132,7 +132,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -159,7 +159,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -185,7 +185,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -210,7 +210,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -267,7 +267,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -280,7 +280,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -305,7 +305,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -327,7 +327,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -341,7 +341,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
@@ -378,7 +378,7 @@
"%%maxRecommendedOrganisms%%"
- %%maxRecommendedMessage%%
+
From 55bec7f6a8faf86aa7de5c8cd5bf12b01511c752 Mon Sep 17 00:00:00 2001
From: Bob
Date: Wed, 17 Dec 2025 22:15:58 +0000
Subject: [PATCH 42/66] remove quotes around maxRecommended too
---
.../model/questions/params/organismParams.xml | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 5553b93a9..dba0a41d4 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -73,7 +73,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -100,7 +100,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -129,7 +129,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -156,7 +156,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -182,7 +182,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -207,7 +207,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -264,7 +264,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -277,7 +277,7 @@
multiPick="true"
quote="true">
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -302,7 +302,7 @@
highlightReferenceOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -324,7 +324,7 @@
Select the organism(s) you wish to query.
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -338,7 +338,7 @@
Select the organism(s) you wish to query.
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
@@ -375,7 +375,7 @@
showOnlyPreferredOrganisms
- "%%maxRecommendedOrganisms%%"
+ %%maxRecommendedOrganisms%%
From 314af4ad6d5008aeeaa9d4533281bc6eeb0cb045 Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Wed, 17 Dec 2025 22:22:06 -0500
Subject: [PATCH 43/66] update y2h Category for internal question
---
Model/lib/wdk/model/questions/geneQuestions.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Model/lib/wdk/model/questions/geneQuestions.xml b/Model/lib/wdk/model/questions/geneQuestions.xml
index 792903c44..3578c0074 100644
--- a/Model/lib/wdk/model/questions/geneQuestions.xml
+++ b/Model/lib/wdk/model/questions/geneQuestions.xml
@@ -6155,7 +6155,7 @@ Each point shows the sense fold-change and the antisense fold-change between a p
- Protein interactions
+ Y2H interactions
From 0d4fe95e8be65153198af71e5ad3adaf6d94e4d6 Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Wed, 17 Dec 2025 22:28:34 -0500
Subject: [PATCH 44/66] fix other datasetCategories (quant proteomics and
longreadrnaseq)
---
Model/lib/wdk/model/questions/geneQuestions.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/lib/wdk/model/questions/geneQuestions.xml b/Model/lib/wdk/model/questions/geneQuestions.xml
index 3578c0074..3805975ae 100644
--- a/Model/lib/wdk/model/questions/geneQuestions.xml
+++ b/Model/lib/wdk/model/questions/geneQuestions.xml
@@ -6315,7 +6315,7 @@ Each point shows the sense fold-change and the antisense fold-change between a p
- LongReadRNASeq
+ longReadrnaseq
@@ -6393,7 +6393,7 @@ Each point shows the sense fold-change and the antisense fold-change between a p
- Protein expression
+ Protein expression (quantitative)
From f29ea095d1d995cb86354b0dd703001d19891df4 Mon Sep 17 00:00:00 2001
From: Bob
Date: Thu, 18 Dec 2025 08:47:17 +0000
Subject: [PATCH 45/66] Tweak organism gate message
---
.../lib/wdk/model/questions/params/organismParams.xml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index dba0a41d4..2144fa1c2 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -1,18 +1,19 @@
5
+
You are selecting more than five organisms.
- Selecting a large number of organisms may impact performance and make
- results harder to interpret.
+ Selecting a large number of organisms may impact performance and make results harder to interpret.
- Please select five or fewer organisms where possible. For the best experience,
- use My Organism Preferences in the page header to focus on the organisms
- you care about most.
+ Please select five or fewer organisms where possible.
+
+
+ For the best experience, use My Organism Preferences in the page header to focus on the organisms you care about most.
]]>
From 917fa40652e97ae7d1703d702bf86b8026917f6a Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Thu, 18 Dec 2025 16:42:10 -0500
Subject: [PATCH 46/66] fix interpro attr query
---
Model/lib/wdk/model/records/transcriptAttributeQueries.xml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
index 438b58469..862fb9b9a 100644
--- a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
@@ -459,8 +459,8 @@
replace(bfmv.predicted_go_id_component, 'GO_', 'GO:') as predicted_go_id_component,
replace(bfmv.predicted_go_id_function, 'GO_', 'GO:') as predicted_go_id_function,
replace(bfmv.predicted_go_id_process, 'GO_', 'GO:') as predicted_go_id_process
- FROM apidbtuning.TranscriptAttributes bfmv
- --WHERE bfmv.org_abbrev in (%%PARTITION_KEYS%%)
+ FROM webready.TranscriptAttributes_p bfmv
+ WHERE bfmv.org_abbrev in (%%PARTITION_KEYS%%)
]]>
@@ -1695,9 +1695,8 @@ AND ta.org_abbrev in (%%PARTITION_KEYS%%)
string_agg(DISTINCT interpro_primary_id, ', ') FILTER (WHERE interpro_db_name = 'SUPERFAMILY') AS superfamily_id,
max(interpro_desc) FILTER (WHERE interpro_db_name = 'SUPERFAMILY') AS superfamily_description
FROM webready.InterproResults_p i
- RIGHT JOIN webready.TranscriptAttributes_p ta ON ta.source_id = i.transcript_source_id
+ RIGHT JOIN webready.TranscriptAttributes_p ta ON ta.source_id = i.transcript_source_id AND i.org_abbrev in (%%PARTITION_KEYS%%)
WHERE ta.org_abbrev in (%%PARTITION_KEYS%%)
- AND i.org_abbrev in (%%PARTITION_KEYS%%)
GROUP BY ta.source_id, ta.gene_source_id
]]>
From cb31e436915f3702201a498953e8446220c2ea3a Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Thu, 18 Dec 2025 17:09:51 -0500
Subject: [PATCH 47/66] rna url query to use datasetdatasource
---
Model/lib/dst/rnaSeqTemplates.dst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Model/lib/dst/rnaSeqTemplates.dst b/Model/lib/dst/rnaSeqTemplates.dst
index 490cc8ef5..9dbeba248 100644
--- a/Model/lib/dst/rnaSeqTemplates.dst
+++ b/Model/lib/dst/rnaSeqTemplates.dst
@@ -652,7 +652,7 @@ prop=includeProjectsExcludeEuPathDB
From 32192e5645a9d4d6bbedf6ed3cfe4bfa43b7d410 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Thu, 18 Dec 2025 20:04:26 -0500
Subject: [PATCH 48/66] fix pathways queries and add tuning table
---
.../model/questions/queries/pathwayQueries.xml | 2 +-
.../lib/wdk/model/records/pathwayTableQueries.xml | 6 +++++-
Model/lib/xml/tuningManager/apiTuningManager.xml | 15 +++++++++++++++
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/Model/lib/wdk/model/questions/queries/pathwayQueries.xml b/Model/lib/wdk/model/questions/queries/pathwayQueries.xml
index 0f4de27c3..c85354552 100644
--- a/Model/lib/wdk/model/questions/queries/pathwayQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/pathwayQueries.xml
@@ -35,7 +35,7 @@
, sres.externaldatabase ed
, sres.externaldatabaserelease edr
WHERE (
- p.pathway_id LIKE REPLACE(REPLACE(REPLACE(REPLACE($$metabolic_pathway_id$$,' ',''),'-', '%'),'*','%'),'any','%')
+ p.pathway_id::text LIKE REPLACE(REPLACE(REPLACE(REPLACE($$metabolic_pathway_id$$,' ',''),'-', '%'),'*','%'),'any','%')
OR lower(p.source_id) LIKE CONCAT('%', REPLACE(REPLACE(REPLACE(REPLACE(lower($$pathway_wildcard$$),' ',''),'-', '%'),'*','%'),'any','%'), '%')
OR lower(p.name) LIKE CONCAT('%', REPLACE(REPLACE(REPLACE(REPLACE(lower($$pathway_wildcard$$),' ',''),'-', '%'),'*','%'),'any','%'), '%')
)
diff --git a/Model/lib/wdk/model/records/pathwayTableQueries.xml b/Model/lib/wdk/model/records/pathwayTableQueries.xml
index 6cfbd1e9d..2f2bee73f 100644
--- a/Model/lib/wdk/model/records/pathwayTableQueries.xml
+++ b/Model/lib/wdk/model/records/pathwayTableQueries.xml
@@ -37,18 +37,22 @@
, pr.PRODUCTS_TEXT
, CASE WHEN pr.ENZYME = '-.-.-.-'
THEN 'N/A'
- ELSE CONCAT('', pn.GENE_COUNT, '')
+ ELSE CONCAT('', gc.GENE_COUNT, '')
END AS GENE_COUNT
FROM
webready.PathwayAttributes pa
, webready.PathwayCompounds pc
, webready.PathwayReactions pr
, webready.PathwayNodes pn
+ , (select pathway_source_id, count(gene_source_id) as gene_count
+ from apidbtuning.PathwayGenesThin
+ group by pathway_source_id) as gc
WHERE pc.pathway_id = pa.PATHWAY_ID
AND pn.SOURCE_ID = pa.SOURCE_ID
AND pr.REACTION_ID = pc.REACTION_ID
AND pr.EXT_DB_NAME = pc.EXT_DB_NAME
AND pr.ENZYME = pn.DISPLAY_LABEL
+ AND gc.pathway_source_id = pa.source_id
ORDER BY pr.ENZYME
]]>
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index 8183a1cf7..f7759861b 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -103,6 +103,21 @@
+
+
+
+
+
+
+
+
+
+
+
From 115fd3a9358f5000f83a4fba52a63724f91a66b0 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Thu, 18 Dec 2025 20:18:27 -0500
Subject: [PATCH 49/66] filter on project_id
---
Model/lib/wdk/model/records/transcriptAttributeQueries.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
index 862fb9b9a..84f343b0a 100644
--- a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
@@ -96,8 +96,9 @@
ta.project_id AS project_id, ta.gene_source_id,
a.ID as old_gene_source_id,
ta.source_id as old_source_id, ta.project_id AS old_project_id
- FROM webready.GeneId_p a, webready.TranscriptAttributes_p ta
+ FROM webready.GeneId_p a, apidbtuning.TranscriptAttributes ta
WHERE ta.gene_source_id = a.gene
+ AND (ta.project_id = '@PROJECT_ID@' or 'UniDB' = '@PROJECT_ID@')
-- AND a.unique_mapping = 1
]]>
@@ -112,7 +113,8 @@
SELECT ta.source_id,
ta.gene_source_id,
ta.project_id AS project_id
- FROM webready.TranscriptAttributes_p ta
+ FROM apidbtuning.TranscriptAttributes ta
+ AND (ta.project_id = '@PROJECT_ID@' or 'UniDB' = '@PROJECT_ID@')
]]>
From ab276ff95a67a0c1124c7a01588f5ab1a7b30be8 Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Thu, 18 Dec 2025 20:30:05 -0500
Subject: [PATCH 50/66] fix PathwayGenes TT
---
Model/lib/xml/tuningManager/apiTuningManager.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml
index f7759861b..b850e6dcd 100644
--- a/Model/lib/xml/tuningManager/apiTuningManager.xml
+++ b/Model/lib/xml/tuningManager/apiTuningManager.xml
@@ -108,12 +108,12 @@
From 9edf93d6ea587968247495875ba22ccabcd5beec Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Thu, 18 Dec 2025 21:03:47 -0500
Subject: [PATCH 51/66] speed gene seq table query
---
Model/lib/wdk/model/records/geneTableQueries.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Model/lib/wdk/model/records/geneTableQueries.xml b/Model/lib/wdk/model/records/geneTableQueries.xml
index 7073746e1..842fb67c8 100644
--- a/Model/lib/wdk/model/records/geneTableQueries.xml
+++ b/Model/lib/wdk/model/records/geneTableQueries.xml
@@ -4430,11 +4430,14 @@ where org_abbrev in (%%PARTITION_KEYS%%)
FROM
webready.TranscriptAttributes_p ta
INNER JOIN webready.TranscriptSequence_p tx_seq ON ta.source_id = tx_seq.source_id
+ AND tx_seq.org_abbrev IN (%%PARTITION_KEYS%%)
INNER JOIN webready.TranscriptGenomicSequence_p gseq ON ta.source_id = gseq.source_id
+ AND gseq.org_abbrev IN (%%PARTITION_KEYS%%)
LEFT JOIN webready.ProteinSequence_p ps ON ta.protein_source_id = ps.source_id
+ AND ps.org_abbrev IN (%%PARTITION_KEYS%%)
LEFT JOIN webready.IntronUtrCoords_p iuc ON ta.na_feature_id = iuc.na_feature_id
+ AND iuc.org_abbrev IN (%%PARTITION_KEYS%%)
WHERE ta.org_abbrev IN (%%PARTITION_KEYS%%)
- AND gseq.org_abbrev IN (%%PARTITION_KEYS%%)
]]>
From 20d71e5909deb0caedc1cf18594e0771bf38771a Mon Sep 17 00:00:00 2001
From: John Brestelli
Date: Fri, 19 Dec 2025 09:17:50 -0500
Subject: [PATCH 52/66] gene source_id and project not being returned
correctly. fixes nc rna gene pages
---
Model/lib/wdk/model/records/geneAttributeQueries.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/lib/wdk/model/records/geneAttributeQueries.xml b/Model/lib/wdk/model/records/geneAttributeQueries.xml
index 3fa90a214..c47019d61 100644
--- a/Model/lib/wdk/model/records/geneAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/geneAttributeQueries.xml
@@ -178,8 +178,8 @@ WHERE ga.org_abbrev IN (%%PARTITION_KEYS%%)
Date: Fri, 19 Dec 2025 17:03:46 -0500
Subject: [PATCH 53/66] comment out postCacheUpdateSql
---
Model/lib/wdk/model/questions/queries/geneQueries.xml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index 7417c24d2..a5ae4205a 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -2,11 +2,11 @@
-
+
diff --git a/Model/lib/wdk/model/questions/geneQuestions.xml b/Model/lib/wdk/model/questions/geneQuestions.xml
index 3805975ae..e7df83412 100644
--- a/Model/lib/wdk/model/questions/geneQuestions.xml
+++ b/Model/lib/wdk/model/questions/geneQuestions.xml
@@ -2507,7 +2507,7 @@ Find genes based on the Gene Ontology (GO) Term(s) or ID(s) assigned to them.
-
-
-
-
+
@@ -289,7 +289,7 @@ lower expression in the comparator as compared to the reference.
-
+
diff --git a/Model/lib/wdk/model/questions/params/geneParams.xml b/Model/lib/wdk/model/questions/params/geneParams.xml
index b84cc750e..f2c1c0c74 100644
--- a/Model/lib/wdk/model/questions/params/geneParams.xml
+++ b/Model/lib/wdk/model/questions/params/geneParams.xml
@@ -208,7 +208,7 @@
-->
-
-
+
diff --git a/Model/lib/wdk/model/questions/params/organismParams.xml b/Model/lib/wdk/model/questions/params/organismParams.xml
index 2144fa1c2..ea720c90b 100644
--- a/Model/lib/wdk/model/questions/params/organismParams.xml
+++ b/Model/lib/wdk/model/questions/params/organismParams.xml
@@ -383,7 +383,7 @@
-
-
+
diff --git a/Model/lib/wdk/model/questions/params/pathwayParams.xml b/Model/lib/wdk/model/questions/params/pathwayParams.xml
index cdfb642a9..ff2b4d3c3 100644
--- a/Model/lib/wdk/model/questions/params/pathwayParams.xml
+++ b/Model/lib/wdk/model/questions/params/pathwayParams.xml
@@ -1,6 +1,6 @@
-
+
-
+
diff --git a/Model/lib/wdk/model/questions/pathwayQuestions.xml b/Model/lib/wdk/model/questions/pathwayQuestions.xml
index 602fea139..4f106cd59 100644
--- a/Model/lib/wdk/model/questions/pathwayQuestions.xml
+++ b/Model/lib/wdk/model/questions/pathwayQuestions.xml
@@ -1,7 +1,7 @@
+ displayName="Search for Metabolic Pathways">
diff --git a/Model/lib/wdk/model/questions/queries/compoundQueries.xml b/Model/lib/wdk/model/questions/queries/compoundQueries.xml
index 1c457c017..cbc7f1c86 100644
--- a/Model/lib/wdk/model/questions/queries/compoundQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/compoundQueries.xml
@@ -1,6 +1,5 @@
-
+
diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml
index c268ca35c..6978e2f90 100644
--- a/Model/lib/wdk/model/questions/queries/geneQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml
@@ -4937,7 +4937,7 @@
FROM apidbtuning.TranscriptAttributes ta
, results.nafeaturediffresult r
WHERE $$regulated_dir$$ (r.fold_change) >= $$fold_change$$
- AND coalesce(r.adj_p_value, r.p_value) <= to_char($$dcc_p_value$$,'99.99999999999999')
+ AND coalesce(r.adj_p_value, r.p_value) <= $$dcc_p_value$$
AND r.protocol_app_node_id = $$samples_direct_generic_confidence$$
AND ta.gene_na_feature_id = r.na_feature_id
AND ( $$protein_coding_only$$ = 'no' OR ta.gene_type = $$protein_coding_only$$ )
@@ -5521,7 +5521,7 @@ select distinct ta.gene_source_id
-
+
@@ -5586,7 +5586,7 @@ select distinct ta.gene_source_id
-
+
@@ -5978,7 +5978,7 @@ select distinct ta.gene_source_id
-
+
diff --git a/Model/lib/wdk/model/questions/queries/pathwayQueries.xml b/Model/lib/wdk/model/questions/queries/pathwayQueries.xml
index c85354552..54b84a9a4 100644
--- a/Model/lib/wdk/model/questions/queries/pathwayQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/pathwayQueries.xml
@@ -1,5 +1,5 @@
-
+
@@ -67,7 +67,7 @@
AS (select pathway_source from ($$ds_pathway_id$$))
SELECT source_id, pathway_source,
string_agg(identifier, ',') as identifiers,
- string_agg(type, ',') as type,
+ string_agg(type, ',') as type
FROM (
-- Compounds
SELECT distinct pa.source_id as source_id
diff --git a/Model/lib/wdk/model/questions/queries/spanQueries.xml b/Model/lib/wdk/model/questions/queries/spanQueries.xml
index 86d993dff..4da26f8e7 100644
--- a/Model/lib/wdk/model/questions/queries/spanQueries.xml
+++ b/Model/lib/wdk/model/questions/queries/spanQueries.xml
@@ -125,7 +125,7 @@
, lrt.transcript_novelty
FROM apidb.longreadtranscript lrt
, JSON_TABLE(count_data, '$.*' COLUMNS (reads INTEGER PATH '$')) count_table
- , webready.GenomicSeqAttributes_p gsa
+ , apidbtuning.GenomicSeqAttributes gsa
, sres.externaldatabase ed
, sres.externaldatabaserelease edr
, apidbtuning.organismattributes oa
diff --git a/Model/lib/wdk/model/questions/spanQuestions.xml b/Model/lib/wdk/model/questions/spanQuestions.xml
index d5425d0ee..04b422f98 100644
--- a/Model/lib/wdk/model/questions/spanQuestions.xml
+++ b/Model/lib/wdk/model/questions/spanQuestions.xml
@@ -585,7 +585,7 @@ doi:10.1371/journal.pbio.0060238
@@ -609,7 +609,7 @@ doi:10.1371/journal.pbio.0060238
- LongReadRNASeq
+ longReadrnaseq
diff --git a/Model/lib/wdk/model/records/compoundAttributeQueries.xml b/Model/lib/wdk/model/records/compoundAttributeQueries.xml
index cea95f737..005962491 100644
--- a/Model/lib/wdk/model/records/compoundAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/compoundAttributeQueries.xml
@@ -1,5 +1,5 @@
-
+
CID:93072
diff --git a/Model/lib/wdk/model/records/compoundRecord.xml b/Model/lib/wdk/model/records/compoundRecord.xml
index 3bdb64621..dea506852 100644
--- a/Model/lib/wdk/model/records/compoundRecord.xml
+++ b/Model/lib/wdk/model/records/compoundRecord.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/Model/lib/wdk/model/records/compoundTableQueries.xml b/Model/lib/wdk/model/records/compoundTableQueries.xml
index 6b5ec7920..e7db24f43 100644
--- a/Model/lib/wdk/model/records/compoundTableQueries.xml
+++ b/Model/lib/wdk/model/records/compoundTableQueries.xml
@@ -1,5 +1,5 @@
-
+
CID:93072
diff --git a/Model/lib/wdk/model/records/pathwayAttributeQueries.xml b/Model/lib/wdk/model/records/pathwayAttributeQueries.xml
index 5ef350790..d7452a0a9 100644
--- a/Model/lib/wdk/model/records/pathwayAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/pathwayAttributeQueries.xml
@@ -1,5 +1,5 @@
-
+
ec00626
diff --git a/Model/lib/wdk/model/records/pathwayRecord.xml b/Model/lib/wdk/model/records/pathwayRecord.xml
index df05f3cb3..746c9798c 100644
--- a/Model/lib/wdk/model/records/pathwayRecord.xml
+++ b/Model/lib/wdk/model/records/pathwayRecord.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/Model/lib/wdk/model/records/pathwayTableQueries.xml b/Model/lib/wdk/model/records/pathwayTableQueries.xml
index 2f2bee73f..f076d094f 100644
--- a/Model/lib/wdk/model/records/pathwayTableQueries.xml
+++ b/Model/lib/wdk/model/records/pathwayTableQueries.xml
@@ -1,6 +1,6 @@
-
+
ec00626
From 2b7ce40c87361a2174d7874a027de3fad9d161da Mon Sep 17 00:00:00 2001
From: steve-fischer-200
Date: Mon, 5 Jan 2026 12:47:20 -0500
Subject: [PATCH 58/66] fix oracle-specific sql
---
.../lib/wdk/model/questions/geneQuestions.xml | 2 +-
.../records/transcriptAttributeQueries.xml | 211 +++++++++++++-----
.../wdk/model/records/transcriptRecord.xml | 6 +-
Model/lib/xml/dataPlotter/queries.xml | 10 +-
4 files changed, 157 insertions(+), 72 deletions(-)
diff --git a/Model/lib/wdk/model/questions/geneQuestions.xml b/Model/lib/wdk/model/questions/geneQuestions.xml
index e7df83412..7a62cc045 100644
--- a/Model/lib/wdk/model/questions/geneQuestions.xml
+++ b/Model/lib/wdk/model/questions/geneQuestions.xml
@@ -6291,7 +6291,7 @@ Each point shows the sense fold-change and the antisense fold-change between a p
diff --git a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
index 6f0bfc01f..33f69815c 100644
--- a/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
+++ b/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
@@ -128,7 +128,7 @@
@@ -1706,7 +1705,7 @@ AND ta.org_abbrev in (%%PARTITION_KEYS%%)
-
+
@@ -1721,39 +1720,83 @@ AND ta.org_abbrev in (%%PARTITION_KEYS%%)
= 1 THEN round(greatest(1,bfd3_cds) / greatest(1,no_tet_cds), 1)
- ELSE round(-1 * greatest(1,no_tet_cds) / greatest(1,bfd3_cds), 1) END,
- CASE WHEN (bfd3_cds < 1 or no_tet_cds < 1) then '*' else '' END) AS fc_bfd3_cds
- , CONCAT(CASE WHEN greatest(1,bfd6_cds) / greatest(1,no_tet_cds) >= 1 THEN round(greatest(1,bfd6_cds) / greatest(1,no_tet_cds), 1)
- ELSE round(-1 * greatest(1,no_tet_cds) / greatest(1,bfd6_cds), 1) END,
- CASE WHEN (bfd6_cds < 1 or no_tet_cds < 1) then '*' else '' END) AS fc_bfd6_cds
- , CONCAT(CASE WHEN greatest(1,pf_cds) / greatest(1,no_tet_cds) >= 1 THEN round(greatest(1,pf_cds) / greatest(1,no_tet_cds), 1)
- ELSE round(-1 * greatest(1,no_tet_cds) / greatest(1,pf_cds), 1) END,
- CASE WHEN (pf_cds < 1 or no_tet_cds < 1) then '*' else '' END) AS fc_pf_cds
- , CONCAT(CASE WHEN greatest(1,dif_cds) / greatest(1,no_tet_cds) >= 1 THEN round(greatest(1,dif_cds) / greatest(1,no_tet_cds), 1)
- else round(-1 * greatest(1,no_tet_cds) / greatest(1,dif_cds), 1) end,
- case when (dif_cds < 1 or no_tet_cds < 1) then '*' else '' end) as fc_dif_cds
- FROM webready.TranscriptAttributes_p ta, (
- select ta.gene_source_id as gene_id, ps.protocol_app_node_name, round(nfe.value,2) as value
- from apidbtuning.profilesamples ps, results.nafeatureexpression nfe, webready.TranscriptAttributes_p ta
- where ps.study_name = 'T.brucei paired end RNA Seq data from Horn aligned with cds coordinates [htseq-union - unstranded - tpm - unique]'
- and ps.protocol_app_node_id = nfe.protocol_app_node_id
- and ps.profile_type='values'
- and ps.protocol_app_node_id = nfe.protocol_app_node_id
- and ta.gene_na_feature_id = nfe.na_feature_id(+)
- AND ta.org_abbrev IN (%%PARTITION_KEYS%%)
- ) pivot (
- max(value) as cds
- for protocol_app_node_name in ('No_Tet' no_tet, 'BFD3' bfd3, 'BFD6' bfd6, 'PF' pf, 'DIF' dif)
- ) res
- WHERE ta.gene_source_id = res.gene_id (+)
- AND ta.org_abbrev in (%%PARTITION_KEYS%%)
+SELECT
+ ta.source_id,
+ ta.gene_source_id,
+ ta.project_id,
+ res.*,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, bfd3_cds) / greatest(1, no_tet_cds) >= 1
+ THEN round(greatest(1, bfd3_cds) / greatest(1, no_tet_cds), 1)
+ ELSE
+ round(-1 * greatest(1, no_tet_cds) / greatest(1, bfd3_cds), 1)
+ END,
+ CASE WHEN (bfd3_cds < 1 OR no_tet_cds < 1) THEN '*' ELSE '' END
+ ) AS fc_bfd3_cds,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, bfd6_cds) / greatest(1, no_tet_cds) >= 1
+ THEN round(greatest(1, bfd6_cds) / greatest(1, no_tet_cds), 1)
+ ELSE
+ round(-1 * greatest(1, no_tet_cds) / greatest(1, bfd6_cds), 1)
+ END,
+ CASE WHEN (bfd6_cds < 1 OR no_tet_cds < 1) THEN '*' ELSE '' END
+ ) AS fc_bfd6_cds,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, pf_cds) / greatest(1, no_tet_cds) >= 1
+ THEN round(greatest(1, pf_cds) / greatest(1, no_tet_cds), 1)
+ ELSE
+ round(-1 * greatest(1, no_tet_cds) / greatest(1, pf_cds), 1)
+ END,
+ CASE WHEN (pf_cds < 1 OR no_tet_cds < 1) THEN '*' ELSE '' END
+ ) AS fc_pf_cds,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, dif_cds) / greatest(1, no_tet_cds) >= 1
+ THEN round(greatest(1, dif_cds) / greatest(1, no_tet_cds), 1)
+ ELSE
+ round(-1 * greatest(1, no_tet_cds) / greatest(1, dif_cds), 1)
+ END,
+ CASE WHEN (dif_cds < 1 OR no_tet_cds < 1) THEN '*' ELSE '' END
+ ) AS fc_dif_cds
+
+FROM webready.transcriptattributes_p ta
+
+LEFT JOIN (
+ SELECT
+ ta.gene_source_id AS gene_id,
+
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'No_Tet') AS no_tet_cds,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'BFD3') AS bfd3_cds,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'BFD6') AS bfd6_cds,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'PF') AS pf_cds,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'DIF') AS dif_cds
+
+ FROM apidbtuning.profilesamples ps
+ JOIN results.nafeatureexpression nfe
+ ON ps.protocol_app_node_id = nfe.protocol_app_node_id
+ JOIN webready.transcriptattributes_p ta
+ ON ta.gene_na_feature_id = nfe.na_feature_id
+ WHERE ps.study_name =
+ 'T.brucei paired end RNA Seq data from Horn aligned with cds coordinates [htseq-union - unstranded - tpm - unique]'
+ AND ps.profile_type = 'values'
+ AND ta.org_abbrev IN (%%PARTITION_KEYS%%)
+ GROUP BY ta.gene_source_id
+) res
+ON ta.gene_source_id = res.gene_id
+
+WHERE ta.org_abbrev IN (%%PARTITION_KEYS%%)
]]>
-
+
@@ -1768,34 +1811,78 @@ AND ta.org_abbrev in (%%PARTITION_KEYS%%)
= 1 THEN round(greatest(1,bfd3_model) / greatest(1,no_tet_model), 1)
- ELSE round(-1 * greatest(1,no_tet_model) / greatest(1,bfd3_model), 1) END,
- CASE WHEN (bfd3_model < 1 or no_tet_model < 1) then '*' else '' END) AS fc_bfd3_model
- , CONCAT(CASE WHEN greatest(1,bfd6_model) / greatest(1,no_tet_model) >= 1 THEN round(greatest(1,bfd6_model) / greatest(1,no_tet_model), 1)
- ELSE round(-1 * greatest(1,no_tet_model) / greatest(1,bfd6_model), 1) END,
- CASE WHEN (bfd6_model < 1 or no_tet_model < 1) then '*' else '' END) AS fc_bfd6_model
- , CONCAT(CASE WHEN greatest(1,pf_model) / greatest(1,no_tet_model) >= 1 THEN round(greatest(1,pf_model) / greatest(1,no_tet_model), 1)
- ELSE round(-1 * greatest(1,no_tet_model) / greatest(1,pf_model), 1) END,
- CASE WHEN (pf_model < 1 or no_tet_model < 1) then '*' else '' END) AS fc_pf_model
- , CONCAT(CASE WHEN greatest(1,dif_model) / greatest(1,no_tet_model) >= 1 THEN round(greatest(1,dif_model) / greatest(1,no_tet_model), 1)
- else round(-1 * greatest(1,no_tet_model) / greatest(1,dif_model), 1) end,
- case when (dif_model < 1 or no_tet_model < 1) then '*' else '' end) as fc_dif_model
- FROM webready.TranscriptAttributes_p ta, (
- select ta.gene_source_id as gene_id, ps.protocol_app_node_name, round(nfe.value,2) as value
- from apidbtuning.profilesamples ps, results.nafeatureexpression nfe, webready.TranscriptAttributes_p ta
- where ps.study_name = 'T.brucei paired end RNA Seq data from Horn [htseq-union - unstranded - tpm - unique]'
- and ps.protocol_app_node_id = nfe.protocol_app_node_id
- and ps.profile_type='values'
- and ps.protocol_app_node_id = nfe.protocol_app_node_id
- and ta.gene_na_feature_id = nfe.na_feature_id(+)
- AND ta.org_abbrev IN (%%PARTITION_KEYS%%)
- ) pivot (
- max(value) as model
- for protocol_app_node_name in ('No_Tet' no_tet, 'BFD3' bfd3, 'BFD6' bfd6, 'PF' pf, 'DIF' dif)
- ) res
- WHERE ta.gene_source_id = res.gene_id (+)
- AND ta.org_abbrev in (%%PARTITION_KEYS%%)
+SELECT
+ ta.source_id,
+ ta.gene_source_id,
+ ta.project_id,
+ res.*,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, bfd3_model) / greatest(1, no_tet_model) >= 1
+ THEN round((greatest(1, bfd3_model)::numeric / greatest(1, no_tet_model)::numeric), 1)
+ ELSE
+ round((-1 * greatest(1, no_tet_model)::numeric / greatest(1, bfd3_model)::numeric), 1)
+ END,
+ CASE WHEN (bfd3_model < 1 OR no_tet_model < 1) THEN '*' ELSE '' END
+ ) AS fc_bfd3_model,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, bfd6_model) / greatest(1, no_tet_model) >= 1
+ THEN round((greatest(1, bfd6_model)::numeric / greatest(1, no_tet_model)::numeric), 1)
+ ELSE
+ round((-1 * greatest(1, no_tet_model)::numeric / greatest(1, bfd6_model)::numeric), 1)
+ END,
+ CASE WHEN (bfd6_model < 1 OR no_tet_model < 1) THEN '*' ELSE '' END
+ ) AS fc_bfd6_model,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, pf_model) / greatest(1, no_tet_model) >= 1
+ THEN round((greatest(1, pf_model)::numeric / greatest(1, no_tet_model)::numeric), 1)
+ ELSE
+ round((-1 * greatest(1, no_tet_model)::numeric / greatest(1, pf_model)::numeric), 1)
+ END,
+ CASE WHEN (pf_model < 1 OR no_tet_model < 1) THEN '*' ELSE '' END
+ ) AS fc_pf_model,
+
+ CONCAT(
+ CASE
+ WHEN greatest(1, dif_model) / greatest(1, no_tet_model) >= 1
+ THEN round((greatest(1, dif_model)::numeric / greatest(1, no_tet_model)::numeric), 1)
+ ELSE
+ round((-1 * greatest(1, no_tet_model)::numeric / greatest(1, dif_model)::numeric), 1)
+ END,
+ CASE WHEN (dif_model < 1 OR no_tet_model < 1) THEN '*' ELSE '' END
+ ) AS fc_dif_model
+
+FROM webready.transcriptattributes_p ta
+
+LEFT JOIN (
+ SELECT
+ ta.gene_source_id AS gene_id,
+
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'No_Tet') AS no_tet_model,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'BFD3') AS bfd3_model,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'BFD6') AS bfd6_model,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'PF') AS pf_model,
+ MAX(value::numeric) FILTER (WHERE protocol_app_node_name = 'DIF') AS dif_model
+
+ FROM apidbtuning.profilesamples ps
+ JOIN results.nafeatureexpression nfe
+ ON ps.protocol_app_node_id = nfe.protocol_app_node_id
+ JOIN webready.transcriptattributes_p ta
+ ON ta.gene_na_feature_id = nfe.na_feature_id
+ WHERE ps.study_name =
+ 'T.brucei paired end RNA Seq data from Horn [htseq-union - unstranded - tpm - unique]'
+ AND ps.profile_type = 'values'
+ AND ta.org_abbrev IN (%%PARTITION_KEYS)
+ GROUP BY ta.gene_source_id
+) res
+ON ta.gene_source_id = res.gene_id
+
+WHERE ta.org_abbrev IN (%%PARTITION_KEYS%%);
]]>
diff --git a/Model/lib/wdk/model/records/transcriptRecord.xml b/Model/lib/wdk/model/records/transcriptRecord.xml
index 5ecafdc94..f5c1c4993 100644
--- a/Model/lib/wdk/model/records/transcriptRecord.xml
+++ b/Model/lib/wdk/model/records/transcriptRecord.xml
@@ -1187,8 +1187,7 @@
-
diff --git a/Model/lib/xml/dataPlotter/queries.xml b/Model/lib/xml/dataPlotter/queries.xml
index 40f8688f0..fae593b61 100644
--- a/Model/lib/xml/dataPlotter/queries.xml
+++ b/Model/lib/xml/dataPlotter/queries.xml
@@ -70,16 +70,16 @@
Date: Tue, 6 Jan 2026 21:59:54 -0500
Subject: [PATCH 59/66] Comply with new SQLRunner API
---
.../java/org/apidb/apicommon/model/maintain/BasketFixer2.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Model/src/main/java/org/apidb/apicommon/model/maintain/BasketFixer2.java b/Model/src/main/java/org/apidb/apicommon/model/maintain/BasketFixer2.java
index 0640b52a4..a35badebf 100644
--- a/Model/src/main/java/org/apidb/apicommon/model/maintain/BasketFixer2.java
+++ b/Model/src/main/java/org/apidb/apicommon/model/maintain/BasketFixer2.java
@@ -17,8 +17,8 @@
import org.apache.log4j.Logger;
import org.gusdb.fgputil.BaseCLI;
import org.gusdb.fgputil.db.SqlUtils;
-import org.gusdb.fgputil.db.runner.BasicResultSetHandler;
import org.gusdb.fgputil.db.runner.SQLRunner;
+import org.gusdb.fgputil.db.runner.handler.BasicResultSetHandler;
import org.gusdb.wdk.model.Utilities;
import org.gusdb.wdk.model.WdkModel;
import org.gusdb.wdk.model.WdkModelException;
@@ -306,7 +306,7 @@ private void updateTranscripts(WdkModel wdkModel, String projectId) throws WdkMo
// get a snapshot of largest basket id. any newer ids are added by users during this run. we can ignore them.
String sql = "select max(basket_id) as max_basket_id from " + userSchema + "user_baskets";
BasicResultSetHandler handler = new SQLRunner(userDbDataSource, sql,
- "invalid-step-report-summary").executeQuery(new Object[]{}, new BasicResultSetHandler());
+ "invalid-step-report-summary").executeQuery(new BasicResultSetHandler());
List