Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Model/lib/dst/cellularLocalization.dst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,35 @@ WHERE av.attribute_stable_id = ag.stable_id
>templateTextEnd<


[templateStart]
name=cellularLocalizationAllDataGeneTableSql
anchorFile=ApiCommonModel/Model/lib/wdk/model/records/geneTableQueries.xml
prop=datasetName
prop=edaStudyStableId
prop=edaEntityAbbrev
prop=datasetDisplayName
prop=shortAttribution
>templateTextStart<
UNION
SELECT genes.string_value AS gene,
'${datasetName}' AS dataset_presenter_id,
'${datasetDisplayName}' AS dataset_presenter_display_name,
'${shortAttribution}' AS short_attribution,
ag.display_name AS variable,
coalesce(av.string_value, coalesce(round(av.number_value::numeric, 4)::text, av.date_value::text)) AS value
FROM eda.attributevalue_${edaStudyStableId}_${edaEntityAbbrev} av,
eda.attributegraph_${edaStudyStableId}_${edaEntityAbbrev} ag,
(SELECT av.${edaEntityAbbrev}_stable_id, MIN(gi.gene) as string_value
FROM eda.attributevalue_${edaStudyStableId}_${edaEntityAbbrev} av
JOIN apidbtuning.GeneId gi ON gi.id = av.string_value
WHERE av.attribute_stable_id = 'VEUPATHDB_GENE_ID'
GROUP BY av.${edaEntityAbbrev}_stable_id) genes
WHERE av.attribute_stable_id = ag.stable_id
AND av.${edaEntityAbbrev}_stable_id = genes.${edaEntityAbbrev}_stable_id
AND av.attribute_stable_id != 'VEUPATHDB_GENE_ID'
>templateTextEnd<


[templateStart]
name=cellularLocalizationEdaAttributeQueriesNumeric
anchorFile=ApiCommonModel/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
Expand Down
29 changes: 29 additions & 0 deletions Model/lib/dst/phenotype.dst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,35 @@ WHERE av.attribute_stable_id = ag.stable_id
>templateTextEnd<


[templateStart]
name=phenotypeAllDataGeneTableSql
anchorFile=ApiCommonModel/Model/lib/wdk/model/records/geneTableQueries.xml
prop=datasetName
prop=edaStudyStableId
prop=edaEntityAbbrev
prop=datasetDisplayName
prop=shortAttribution
>templateTextStart<
UNION
SELECT genes.string_value AS gene,
'${datasetName}' AS dataset_presenter_id,
'${datasetDisplayName}' AS dataset_presenter_display_name,
'${shortAttribution}' AS short_attribution,
ag.display_name AS variable,
coalesce(av.string_value, coalesce(round(av.number_value::numeric, 4)::text, av.date_value::text)) AS value
FROM eda.attributevalue_${edaStudyStableId}_${edaEntityAbbrev} av,
eda.attributegraph_${edaStudyStableId}_${edaEntityAbbrev} ag,
(SELECT av.${edaEntityAbbrev}_stable_id, MIN(gi.gene) as string_value
FROM eda.attributevalue_${edaStudyStableId}_${edaEntityAbbrev} av
JOIN apidbtuning.GeneId gi ON gi.id = av.string_value
WHERE av.attribute_stable_id = 'VEUPATHDB_GENE_ID'
GROUP BY av.${edaEntityAbbrev}_stable_id) genes
WHERE av.attribute_stable_id = ag.stable_id
AND av.${edaEntityAbbrev}_stable_id = genes.${edaEntityAbbrev}_stable_id
AND av.attribute_stable_id != 'VEUPATHDB_GENE_ID'
>templateTextEnd<


[templateStart]
name=phenotypeEdaAttributeQueriesNumeric
anchorFile=ApiCommonModel/Model/lib/wdk/model/records/transcriptAttributeQueries.xml
Expand Down
42 changes: 42 additions & 0 deletions Model/lib/wdk/model/records/geneRecord.xml
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,48 @@
</table>


<table name="EdaPhenotypeDataTable"
displayName="Phenotype Data"
inReportMaker="false"
includeProjects="ToxoDB,PlasmoDB,TriTrypDB,FungiDB,AmoebaDB,UniDB"
queryRef="GeneTables.EdaPhenotypeDataTable">
<columnAttribute name="dataset_presenter_id" displayName="Dataset ID" internal="true"/>
<columnAttribute name="dataset_presenter_display_name" displayName="Dataset" internal="true"/>
<columnAttribute name="short_attribution" displayName="Attribution"/>
<columnAttribute name="variable" displayName="Variable"/>
<columnAttribute name="value" displayName="Value"/>
<linkAttribute displayName="Dataset" name="presenter_link" internal="false">
<displayText>
<![CDATA[$$dataset_presenter_display_name$$]]>
</displayText>
<url>
<![CDATA[@LEGACY_WEBAPP_BASE_URL@/app/record/dataset/$$dataset_presenter_id$$]]>
</url>
</linkAttribute>
</table>


<table name="EdaCellularLocalizationDataTable"
displayName="Cellular Localization Data"
inReportMaker="false"
includeProjects="ToxoDB,TriTrypDB,UniDB"
queryRef="GeneTables.EdaCellularLocalizationDataTable">
<columnAttribute name="dataset_presenter_id" displayName="Dataset ID" internal="true"/>
<columnAttribute name="dataset_presenter_display_name" displayName="Dataset" internal="true"/>
<columnAttribute name="short_attribution" displayName="Attribution"/>
<columnAttribute name="variable" displayName="Variable"/>
<columnAttribute name="value" displayName="Value"/>
<linkAttribute displayName="Dataset" name="presenter_link" internal="false">
<displayText>
<![CDATA[$$dataset_presenter_display_name$$]]>
</displayText>
<url>
<![CDATA[@LEGACY_WEBAPP_BASE_URL@/app/record/dataset/$$dataset_presenter_id$$]]>
</url>
</linkAttribute>
</table>


<table name="PhenotypeScoreGraphsDataTable"
inReportMaker="false"
displayName="Phenotype Score Graphs Data Table"
Expand Down
74 changes: 74 additions & 0 deletions Model/lib/wdk/model/records/geneTableQueries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4599,6 +4599,80 @@ FROM webready.GeneAttributes_p ga, (
</sqlQuery>


<sqlQuery name="EdaPhenotypeDataTable" isCacheable="false"
includeProjects="ToxoDB,PlasmoDB,TriTrypDB,FungiDB,AmoebaDB,UniDB">
<column name="source_id"/>
<column name="project_id"/>
<column name="dataset_presenter_id"/>
<column name="dataset_presenter_display_name"/>
<column name="short_attribution"/>
<column name="variable"/>
<column name="value"/>
<sql>
<![CDATA[
SELECT ga.source_id, ga.project_id, gd.dataset_presenter_id,
gd.dataset_presenter_display_name, gd.short_attribution,
gd.variable, gd.value
FROM webready.GeneAttributes_p ga, (
WITH raw_data AS (
SELECT '' AS gene,
'' AS dataset_presenter_id,
'' AS dataset_presenter_display_name,
'' AS short_attribution,
'' AS variable,
'' AS value
-- TEMPLATE_ANCHOR phenotypeAllDataGeneTableSql
)
SELECT rsog.ref_source_id AS gene, rd.dataset_presenter_id,
rd.dataset_presenter_display_name, rd.short_attribution,
rd.variable, rd.value
FROM webready.RefSynOrthologousGenes_P rsog, raw_data rd
WHERE rsog.source_id = rd.gene
AND rsog.org_abbrev IN ('tgonGT1')
UNION
SELECT rd.gene, rd.dataset_presenter_id, rd.dataset_presenter_display_name,
rd.short_attribution, rd.variable, rd.value
FROM raw_data rd
) gd
WHERE ga.source_id = gd.gene
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
ORDER BY gd.dataset_presenter_display_name, gd.variable, gd.value
]]>
</sql>
</sqlQuery>


<sqlQuery name="EdaCellularLocalizationDataTable" isCacheable="false"
includeProjects="ToxoDB,TriTrypDB,UniDB">
<column name="source_id"/>
<column name="project_id"/>
<column name="dataset_presenter_id"/>
<column name="dataset_presenter_display_name"/>
<column name="short_attribution"/>
<column name="variable"/>
<column name="value"/>
<sql>
<![CDATA[
SELECT ga.source_id, ga.project_id, gd.dataset_presenter_id,
gd.dataset_presenter_display_name, gd.short_attribution,
gd.variable, gd.value
FROM webready.GeneAttributes_p ga, (
SELECT '' AS gene,
'' AS dataset_presenter_id,
'' AS dataset_presenter_display_name,
'' AS short_attribution,
'' AS variable,
'' AS value
-- TEMPLATE_ANCHOR cellularLocalizationAllDataGeneTableSql
) gd
WHERE ga.source_id = gd.gene
AND ga.org_abbrev IN (%%PARTITION_KEYS%%)
ORDER BY gd.dataset_presenter_display_name, gd.variable, gd.value
]]>
</sql>
</sqlQuery>


<sqlQuery name="PhenotypeScoreGraphsDataTable" isCacheable="false" includeProjects="PlasmoDB,UniDB">
<column name="source_id"/>
<column name="project_id"/>
Expand Down
2 changes: 2 additions & 0 deletions Model/lib/wdk/ontology/individuals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ GeneRecordClasses.GeneRecordClass.Antibody http://edamontology.org/topic_0121 Pr
GeneRecordClasses.GeneRecordClass.CommunityExpComments http://edamontology.org/topic_0219 Curation and Annotation GeneRecordClasses.GeneRecordClass table CommunityExpComments gene record download
GeneRecordClasses.GeneRecordClass.EdaCellularLocalizationDatasets http://edamontology.org/topic_0140 Protein targeting and localization GeneRecordClasses.GeneRecordClass table EdaCellularLocalizationDatasets gene record
GeneRecordClasses.GeneRecordClass.EdaCellularLocalizationGraphsDataTable http://edamontology.org/topic_0140 Protein targeting and localization GeneRecordClasses.GeneRecordClass table EdaCellularLocalizationGraphsDataTable gene record-internal download
GeneRecordClasses.GeneRecordClass.EdaCellularLocalizationDataTable http://edamontology.org/topic_0140 Protein targeting and localization GeneRecordClasses.GeneRecordClass table EdaCellularLocalizationDataTable gene record download
GeneRecordClasses.GeneRecordClass.Products http://edamontology.org/topic_0219 Curation and Annotation GeneRecordClasses.GeneRecordClass table Products transcript record download
GeneRecordClasses.GeneRecordClass.SNPsAlignment http://edamontology.org/topic_0199 Genetic Variation GeneRecordClasses.GeneRecordClass table SNPsAlignment gene record
GeneRecordClasses.GeneRecordClass.MercatorTable http://edamontology.org/topic_3299 EvoBiol Comparison GeneRecordClasses.GeneRecordClass table MercatorTable gene record
Expand Down Expand Up @@ -262,6 +263,7 @@ GeneRecordClasses.GeneRecordClass.eQTLPhenotypeGraphs http://edamontology.org/to
GeneRecordClasses.GeneRecordClass.PhenotypeGraphs http://edamontology.org/topic_3298 phenotype GeneRecordClasses.GeneRecordClass table PhenotypeGraphs gene record
GeneRecordClasses.GeneRecordClass.PhenotypeScoreGraphsDataTable http://edamontology.org/topic_3298 phenotype GeneRecordClasses.GeneRecordClass table PhenotypeScoreGraphsDataTable gene record-internal
GeneRecordClasses.GeneRecordClass.EdaPhenotypeGraphsDataTable http://edamontology.org/topic_3298 phenotype GeneRecordClasses.GeneRecordClass table EdaPhenotypeGraphsDataTable gene record-internal download
GeneRecordClasses.GeneRecordClass.EdaPhenotypeDataTable http://edamontology.org/topic_3298 phenotype GeneRecordClasses.GeneRecordClass table EdaPhenotypeDataTable gene record download
GeneRecordClasses.GeneRecordClass.HostResponseGraphsDataTable http://edamontology.org/topic_0804 Immunology GeneRecordClasses.GeneRecordClass table HostResponseGraphsDataTable gene record-internal download
GeneRecordClasses.GeneRecordClass.RodMalPhenotype http://edamontology.org/topic_3298 phenotype GeneRecordClasses.GeneRecordClass table RodMalPhenotype transcript record download
GeneRecordClasses.GeneRecordClass.Plasmo_eQTL_Table http://edamontology.org/topic_3298 phenotype GeneRecordClasses.GeneRecordClass table Plasmo_eQTL_Table transcript record download
Expand Down
Loading