ImmAPAScore is an integrated algorithm estimating the relationship of APA events and tumor immunity to characterize the regulatory landscape of APA events in tumor. We provided all main codes of constructing the ImmAPAScroe algorithm, filtering and ranking the ImmAPAs. The main process of calculating ImmAPAScores for APA events and find ImmAPAs was described below.
Construction of ImmAPAScore to identify immune-related APA in human cancer
In order to identify APA events that have potential effects on immune-related pathways, and referring to the previous correlation analysis method of immune-related features, we developed an algorithm named ImmAPAScore based on the APA event profile and gene expression of tumor samples to measure whether APA is related to tumor immunity refer to previous association analysis method of immune related features. All genes were ranked based on their correlation with a specific APA event. The ranked gene list for the specific APA event will be performed Gene Set Enrichment Analysis (GSEA) for each immune-related pathway. Each APA event in each cancer type was estimated and obtained ImmAPAScore which assesses the correlation of APA and each immune-related pathway.
For each APA event, we ranked all genes based on the correlation of
their expression with the PDUI of APA event in each cancer type. The
expression of gene
$$Corr(xy)\ = \frac{R_{\text{GA}} - R_{\text{GP\ }}*\text{\ R}{\text{AP}}}{\sqrt{1 - R{\text{GP}}^{2}}\ \ *\sqrt{1 - R_{\text{AP}}^{2}}}$$
where
All genes were ranked based on correlation score (CS) for each APA event
and then performed GSEA on 17 immune-related pathways. We got the
enrichment score ($ES(y,i)$) for APA event y and immune-related pathway
Identification of tumor-immunity-related APA events
Based on the ImmAPAScore of each APA event in all cancer types, we first excluded APA events that related with immune-related pathway in less than 10 cancer types and the total number of APA events-ImmPath pairs less than 15 in all cancer types . And we calculated the Immune Enrichment (IE) score of each APA event across 31 cancer types based on the ImmAPAScore. IE score was calculated as follows:
To get those more significant tumor-immunity-related APA events, we retained APA event with absolutely IE score greater than 5 in more than 5 immune pathways, and finally 541 APA events was defined as ImmAPA.
Identification of top-ranked APAs
To focus on more significant tumor immunity related ImmAPAs, we
added