Related figures: Fig. 5, Fig. S8
Rscript file path:
- analysis/scripts/ecotype/ecotype_0_create_feature_corr.R (link).
- analysis/scripts/ecotype/ecotype_1_define.R (link).
- analysis/scripts/ecotype/ecotype_2_igraph_viz.R (link).
- analysis/scripts/ecotype/ecotype_helper_functions.R (link): Helper functions related to ecotype analysis.
Synopsis
- Run ecotype_0_create_feature_corr.R to create the correlation matrix of the cancer metaprogram and TME cell states.
- Run ecotype_1_define.R to define ecotypes. It also justifies the choices of clustering resolutions for community detection and number of ecotypes.
- Run ecotype_2_igraph_viz.R to create the graph laytout to visualize ecotypes.
Output
| Justify the clustering resolution to define ecotypes | Alleviate randomness of community detection |
|---|---|
![]() |
![]() |
| Co-occurrence (correlation matrix) | Graph of ecotypes |
|---|---|
![]() |
![]() |
Related figures: Fig. 5, Fig. S8
Rscript file path:
- analysis/scripts/ecotype/ecotype_3_contexts.archetype.R (link).
- analysis/scripts/ecotype/ecotype_3_contexts.response.R (link).
- analysis/scripts/ecotype/ecotype_4_compare_contexts.R (link).
- analysis/scripts/ecotype/ecotype_helper_functions.R (link).
Synopsis
- Run ecotype_3_contexts.archetype.R to create and visualize graphs of ecotypes of the four archetypes.
- Run ecotype_3_contexts.response.R to create and visualize graphs of ecotypes of the two response groups (pCR vs RD).
- Run ecotype_4_compare_contexts.R to compare the graphs of ecotypes 1) between archetypes and 2) between archetypes and response groups.
Output
| Graph of ecotypes in ARC1 | Graph of ecotypes in ARC2 | Graph of ecotypes in ARC3 | Graph of ecotypes in ARC4 |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Graph of ecotypes in pCR | Graph of ecotypes in RD |
|---|---|
![]() |
![]() |
| Graph similarity between archetypes | Graph similarity between archetypes and response groups |
|---|---|
![]() |
![]() |











