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
22 changes: 16 additions & 6 deletions Model/lib/xml/dataPlotter/queries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
', ' || dsp.short_attribution, '''', '`') as display_name,
dsp.dataset_presenter_id as presenter_id,
ds.order_num
from apidbTuning.Profile p,
from apidbTuning.Profile_p p,
apidbTuning.ProfileSamples ps,
study.ProtocolAppNode pan,
apidbtuning.datasetdatasource dd,
Expand All @@ -23,6 +23,7 @@
and p.dataset_subtype = 'rnaseq'
and p.profile_type = 'values'
and p.source_id = '$id'
and p.org_abbrev = '$orgAbbrev'
and ((dprop.value = 'false'
and pan.name like '%firststrand%')
or (dprop.value = 'true'
Expand Down Expand Up @@ -51,26 +52,28 @@
<query name="profile_set_names">
<![CDATA[
select DISTINCT pt.profile_set_name || ' [' || pt.node_type || ']' as profile_set_name,
profile_type
profile_type, abbrev as org_abbrev
from apidbtuning.profiletype pt
, (select distinct sl.node_set_id
from study.nodeNodeSet sl, apidbtuning.PanResults panr
where sl.protocol_app_node_id = panr.pan_id
and panr.result_table =
'Results::NAFeatureExpression') dr
, apidbtuning.Datasetdatasource dd
, apidb.organism o
where dd.dataset_presenter_id = '$datasetPresenterId'
and pt.dataset_name = dd.name
and pt.profile_study_id = dr.node_set_id
and pt.profile_set_name NOT like '%PaGE%'
and dd.taxon_id = o.taxon_id
]]>
</query>

<query name="profile_set_names_by_source_id">
<![CDATA[
select DISTINCT pt.profile_set_name || ' [' || pt.node_type || ']' as profile_set_name
, pt.profile_type
from apidbtuning.profile p
from apidbtuning.profile_p p
, apidbtuning.Datasetdatasource dd
, apidbtuning.profiletype pt
LEFT JOIN (select distinct sl.node_set_id
Expand All @@ -83,6 +86,7 @@
and p.profile_study_id = pt.profile_study_id
and p.profile_type = pt.profile_type
and p.source_id = '$sourceId'
and p.org_abbrev = '$orgAbbrev'
]]>
</query>

Expand All @@ -95,7 +99,7 @@
(select max(rownum) as m
from($sourceIdValueQuery)) ct
where ('$sourceId' = 'ALL' AND (rn = 1 or rn = ct.m or mod(rn, round(ct.m/$N,0)) = 0))
OR '$sourceId' = source_id
OR ('$sourceId' = source_id and '$orgAbbrev' = org_abbrev)
]]>
</query>

Expand Down Expand Up @@ -131,8 +135,9 @@ from (select row_number() OVER () as rn, points.* from (
( select row_number() OVER () as rn, vs.* from (
SELECT profile_study_id, dataset_name, p.profile_set_name, p.profile_type, p.node_type,
unnest( STRING_TO_ARRAY(p.profile_AS_STRING, chr(9) ,'')) as oneval
FROM apidbtuning.Profile p
FROM apidbtuning.Profile_p p
where p.profile_type = 'values'
AND p.org_abbrev = '$orgAbbrev'
AND p.profile_set_name || ' [' || node_type || ']' = '$profileSetName'
) vs
) vals
Expand Down Expand Up @@ -171,6 +176,7 @@ and pts.profile_study_id = vals.profile_study_id
AND ec.ec_number LIKE REPLACE(REPLACE(REPLACE(REPLACE(lower('$sourceId'),' ',''),'-', '%'),'*','%'),'any','%')) ec
WHERE p.profile_set_name || ' [' || node_type || ']' = '$profileSetName'
AND p.profile_type = '$profileType'
AND p.org_abbrev = '$orgAbbrev'
AND p.source_id = ec.gene_source_id) t
, table(cast(multiset(select level from dual connect by level <= length (regexp_replace(t.profile_as_string, '[^' || CHR(9) || ']+')) + 1) as sys.OdciNumberList)) levels) samplevalues
where samplenames.element_order = samplevalues.element_order
Expand Down Expand Up @@ -246,6 +252,7 @@ and pts.profile_study_id = vals.profile_study_id
and ps.profile_type = 'values'
and ps.protocol_app_node_id = na.protocol_app_node_id
and na.na_feature_id = ga.na_feature_id
and ga.org_abbrev='$orgAbbrev',
and ga.source_id='$sourceId') sense_comp
, (select ps.node_order_num, ps.protocol_app_node_name
, na.value
Expand All @@ -256,6 +263,7 @@ and pts.profile_study_id = vals.profile_study_id
and ps.profile_type = 'values'
and ps.protocol_app_node_id = na.protocol_app_node_id
and na.na_feature_id = ga.na_feature_id
and ga.org_abbrev='$orgAbbrev',
and ga.source_id='$sourceId') sense_ref
where sense_comp.protocol_app_node_name != sense_ref.protocol_app_node_name) sense
, (select antisense_ref.protocol_app_node_name || '->' || antisense_comp.protocol_app_node_name as name
Expand All @@ -268,6 +276,7 @@ and pts.profile_study_id = vals.profile_study_id
and ps.profile_type = 'values'
and ps.protocol_app_node_id = na.protocol_app_node_id
and na.na_feature_id = ga.na_feature_id
and ga.org_abbrev='$orgAbbrev',
and ga.source_id='$sourceId') antisense_comp
, (select ps.node_order_num,ps.protocol_app_node_name,na.value
from apidbtuning.ProfileSamples ps
Expand All @@ -277,7 +286,8 @@ and pts.profile_study_id = vals.profile_study_id
and ps.profile_type = 'values'
and ps.protocol_app_node_id = na.protocol_app_node_id
and na.na_feature_id = ga.na_feature_id
and ga.source_id='$sourceId') antisense_ref
and ga.org_abbrev='$orgAbbrev',
and ga.source_id='$sourceId') antisense_ref
where antisense_comp.protocol_app_node_name != antisense_ref.protocol_app_node_name) antisense
where sense.name = antisense.name
]]>
Expand Down
11 changes: 11 additions & 0 deletions blig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ec_number_gene, pathway_id

gene_source_id

gene_source_id, ec_number_gene, pathway_id

pathway_id

complete_ec, exact_match, ext_db_rls, pathway_source_id, pathway_source, gene_source_id, ec_number_gene, ec_number_pathway

gene_source_id, complete_ec, exact_patch, pathway_source