diff --git a/src/indra_cogex/apps/templates/source_target/source_target_results.html b/src/indra_cogex/apps/templates/source_target/source_target_results.html index 1015cb132..c46d0bbc0 100644 --- a/src/indra_cogex/apps/templates/source_target/source_target_results.html +++ b/src/indra_cogex/apps/templates/source_target/source_target_results.html @@ -4,10 +4,18 @@ {% block styles %} {{ super() }} - + + {% endblock %} {% block scripts %} @@ -44,24 +52,26 @@ {% endblock %} {% macro render_table(df, table_id) -%} - - - - {% for column in df.columns %} - - {% endfor %} - - - - {% for row in df.values %} +
+
{{ column }}
+ - {% for value in row %} - + {% for column in df.columns %} + {% endfor %} - {% endfor %} - -
{{ value }}{{ column }}
+ + + {% for row in df.values %} + + {% for value in row %} + {{ value }} + {% endfor %} + + {% endfor %} + + + {% endmacro %} {% block container %} @@ -95,12 +105,13 @@

Target Genes

{% endfor %}

- {% if results.statements %} + {% if results.statements and results.statements.items() %}

INDRA Statements

-

Direct relationships between source and target genes from the INDRA database:

-
- {{ results.statements | safe }} -
+

Direct relationships between source and target genes:

+ {% for gene, statement in results.statements.items() %} +

{{ gene }}

+ {{ statement | safe }} + {% endfor %} {% endif %} {% if results.interaction_plot %} @@ -113,44 +124,52 @@

Interaction Types

{% endif %} - {% if results.pathways %} -

Shared Pathways

-

Biological pathways shared between source and target genes:

- {{ render_table(results.pathways, "table-pathways") }} + {% if results.discrete_analysis and results.discrete_analysis.get('go') is not none + and results.discrete_analysis.get('go').shape[0] > 0 %} +

GO Analysis

+

Gene Ontology enrichment analysis:

+ {{ render_table(results.discrete_analysis.get('go'), "table-go") }} + + {% if results.discrete_analysis.get('wikipathways') is not none + and results.discrete_analysis.get('wikipathways').shape[0] > 0 %} +

WikiPathways Analysis

+ {{ render_table(results.discrete_analysis.get('wikipathways'), "table-wiki") }} + {% endif %} {% endif %} - {% if results.protein_families %} + {% if results.protein_families is not none and results.protein_families.shape[0] > 0 %}

Protein Families

-

Protein family relationships:

+

Shared protein family relationships:

{{ render_table(results.protein_families, "table-families") }} {% endif %} - {% if results.go_terms %} -

GO Term Analysis

-

Shared Gene Ontology terms between source and target genes:

- {{ render_table(results.go_terms.shared_terms, "table-go") }} + {% if results.combined_pathways is not none and results.combined_pathways.shape[0] > 0 %} +

Combined Pathway Analysis

+

Combined REACTOME and WikiPathways analysis:

+ {{ render_table(results.combined_pathways, "table-combined-pathways") }} + {% endif %} + + {% if results.go_terms and results.go_terms.get('shared_terms') is not none + and results.go_terms.get('shared_terms').shape[0] > 0 %} +

GO Terms Analysis

+

Shared Gene Ontology terms:

+ {{ render_table(results.go_terms.get('shared_terms'), "table-shared-go") }} {% endif %} - {% if results.upstream %} + {% if results.upstream and results.upstream.get('shared_proteins') %}

Upstream Analysis

Shared upstream regulatory mechanisms:

- {% if results.upstream.shared_proteins %} -

Shared Proteins

- - {% endif %} - {% if results.upstream.shared_entities %} -

Detailed Analysis

- {{ render_table(results.upstream.shared_entities, "table-upstream") }} - {% endif %} +

Shared Proteins

+

+ {% for protein in results.upstream.get('shared_proteins') %} + {{ protein }} + {% endfor %} +

{% endif %} {% if results.analysis_plot %}

Statistical Analysis

-

Distribution of p-values and q-values for various analyses:

+

Distribution of p-values and q-values: