diff --git a/Model/lib/dst/spliceSitesTemplates.dst b/Model/lib/dst/spliceSitesTemplates.dst index 1ed8a33ad..dc34aced2 100644 --- a/Model/lib/dst/spliceSitesTemplates.dst +++ b/Model/lib/dst/spliceSitesTemplates.dst @@ -173,6 +173,7 @@ prop=isEuPathDBSite prop=exprGraphAttr prop=includeProjects prop=organismAbbrevDisplay +prop=organismAbbrev >templateTextStart< + + + @@ -5075,77 +5076,80 @@ $$percent_diff$$ + AND sum_cpm > $$min_norm_count$$ + ) , pairs AS MATERIALIZED ( + SELECT one.source_id + , one.na_sequence_id AS one_na_sequence_id, one.location AS one_location + , two.na_sequence_id AS two_na_sequence_id, two.location AS two_location + FROM gene_loc_stats one + JOIN gene_loc_stats two + ON two.source_id = one.source_id + AND two.location != one.location + AND two.protocol_app_node_id = $$splice_site_sample_two$$ + WHERE one.protocol_app_node_id = $$splice_site_sample_one$$ ) - -- MAIN START -select distinct ta.gene_source_id + SELECT DISTINCT ta.gene_source_id , ta.source_id , ta.project_id , 'Y' AS matched_result - , one.location AS one_loc + , p.one_location AS one_loc , t1.transcript_source_id AS one_transcript_id , t1.dist_to_cds AS one_dist_to_cds , t1.dist_to_first_atg AS one_dist_to_first_atg - , two.location AS two_loc + , p.two_location AS two_loc , t2.transcript_source_id AS two_transcript_id , t2.dist_to_cds AS two_dist_to_cds , t2.dist_to_first_atg AS two_dist_to_first_atg - FROM - gene_loc_stats one - , gene_loc_stats two - , webready.SpliceSiteTranscript_p t1 - , webready.SpliceSiteTranscript_p t2 - , apidbtuning.TranscriptAttributes ta - WHERE one.source_id = two.source_id - AND one.protocol_app_node_id = $$splice_site_sample_one$$ - AND two.protocol_app_node_id = $$splice_site_sample_two$$ - AND one.pct_max > $$percent_diff$$ - AND two.pct_max > $$percent_diff$$ - AND one.sum_cpm > $$min_norm_count$$ - AND two.sum_cpm > $$min_norm_count$$ - AND one.location != two.location - AND one.na_sequence_id = t1.na_sequence_id - AND one.location = t1.location - AND two.na_sequence_id = t2.na_sequence_id - AND two.location = t2.location - AND t1.type = 'Splice Site' - AND t2.type = 'Splice Site' - AND ta.gene_source_id = one.source_id + FROM pairs p + JOIN webready.SpliceSiteTranscript_p t1 + ON t1.na_sequence_id = p.one_na_sequence_id + AND t1.location = p.one_location + AND t1.type = 'Splice Site' + AND t1.org_abbrev = $$organismAbbrev$$ + JOIN webready.SpliceSiteTranscript_p t2 + ON t2.na_sequence_id = p.two_na_sequence_id + AND t2.location = p.two_location + AND t2.type = 'Splice Site' + AND t2.org_abbrev = $$organismAbbrev$$ + JOIN webready.TranscriptAttributes_p ta + ON ta.gene_source_id = p.source_id + AND ta.org_abbrev = $$organismAbbrev$$ ]]>