Skip to content

Commit

Permalink
add the kinase library portion into phospho TMT tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
hsiaoyi0504 committed May 21, 2024
1 parent 72d9b9c commit bc61f5e
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 26 deletions.
3 changes: 2 additions & 1 deletion R/enrichment.R
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,9 @@ prepare_kinome <- function(se, col, outfile, format="asterisk", p_col=NULL) {
visualize_kinome <- function(tsv_file, labels=NULL) {
data <- read.csv(tsv_file, sep = "\t", stringsAsFactors = F)
if (is.null(labels)){
p <- ggplot(data, aes(x=dominant_enrichment_value_log2, y=dominant_adjusted_p_value_log10_abs)) +
p <- ggplot(data, aes(x=dominant_enrichment_value_log2, y=dominant_adjusted_p_value_log10_abs, label=kinase)) +
geom_point() +
geom_text_repel(data=subset(data, abs(dominant_enrichment_value_log2) > 1 & (dominant_adjusted_p_value_log10_abs) > 1.3)) +
theme_bw() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_blank(), axis.line = element_line(colour = "black")) +
Expand Down
42 changes: 29 additions & 13 deletions docs/phospho_TMT_tutorial.html

Large diffs are not rendered by default.

35 changes: 30 additions & 5 deletions vignettes/phospho_TMT_tutorial.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ plot_feature(normalized_se, c("P14618_Y148", # PKM_Y146
"P28482_Y187",
"Q13541_S65"))
```

### Boxplot of parent proteins
``` {r, include=T, warning=F}
plot_feature(se, c("P14618",
Expand All @@ -65,7 +66,6 @@ plot_feature(se, c("P14618",
```



## Differential expression (DE) analysis

One of the frequent analysis we do is differential expression analysis to understand the difference between tumor and NAT. It can be performed through following commands:
Expand All @@ -85,7 +85,7 @@ plot_volcano(de_result_updated, "Tumor_vs_NAT")
```

## Enrichment analysis
One of the key difference between peptide-level analysis of PTMs we demonstrated here and protein level analysis is that PTMs usually act in a site-specific manner. Here, we also provide the way to help users perform enrichment analysis site-specifically through creating the input file you needed for [PTM-SEA](https://doi.org/10.1074/mcp.tir118.000943).
One of the key difference between peptide-level analysis of PTMs we demonstrated here and protein level analysis is that PTMs usually act in a site-specific manner. Here, we provide the way to help users perform enrichment analysis site-specifically through creating the input file you needed for [PTM-SEA](https://doi.org/10.1074/mcp.tir118.000943).
``` {r, include=T, warning=F}
prepare_PTMSEA(normalized_de_result_updated, "Tumor_vs_NAT_diff", "/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result.gct")
```
Expand Down Expand Up @@ -120,17 +120,42 @@ visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result
You may also select particular gene set of interests. For example, following code snippets demonstrate the result on PKC and AKT protein kinases, respectively.

``` {r, include=T}
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct",
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result/ccRCC-combined.gct",
"Tumor_vs_NAT_diff",
selected_concepts=c("KINASE-PSP_PKCA/PRKCA", "KINASE-PSP_PKCB/PRKCB", "KINASE-PSP_PKCG/PRKCG", "KINASE-PSP_PKCB_iso2/PRKCB", "KINASE-PSP_PKCD/PRKCD", "KINASE-PSP_PKCI/PRKCI", "KINASE-PSP_PKCT/PRKCQ",
"KINASE-PSP_PKCH/PRKCH", "KINASE-PSP_PKCE/PRKCE", "KINASE-PSP_PKCZ/PRKCZ"))
```

``` {r, include=T}
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct",
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result/ccRCC-combined.gct",
"Tumor_vs_NAT_diff",
selected_concepts=c(# "KINASE-PSP_Akt1/AKT1", "KINASE-PSP_Akt3/AKT3", "KINASE-PSP_Akt2/AKT2",
"KINASE-iKiP_AKT3", "KINASE-iKiP_AKT2", "PATH-WP_PI3K-Akt_signaling_pathway", "KINASE-iKiP_AKT1"))
```
Alternatively, FragPipeAnalystR also provides ways to generate input and visualization for the [Kinase Library](https://kinase-library.phosphosite.org/). Here is the example of generating the input file:

``` {r, include=T}
prepare_kinome(de_result_updated, "Tumor_vs_NAT_diff", "/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_new/kinome_input_asterisk.tsv")
```


And here is the result visualization:
``` {r, include=T}
visualize_kinome("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_result/enrichment-analysis-result-table.txt")
```

``` {r, include=T}
AKT_labels <- c("AKT1", "AKT2", "ATK3")
visualize_kinome("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_result/enrichment-analysis-result-table.txt",
labels=AKT_labels)
```

``` {r, include=T}
PKC_labels <- c("PKCI", "PKCH", "PKCT", "PKCZ", "PKCE", "PKCD", "PKCG", "PKCA", "PKCB")
visualize_kinome("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_result/enrichment-analysis-result-table.txt", labels=PKC_labels)
```




49 changes: 42 additions & 7 deletions vignettes/phospho_TMT_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ plot_feature(normalized_se, c("P14618_Y148", # PKM_Y146
```

![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-7-1.png)<!-- -->

### Boxplot of parent proteins

``` r
Expand All @@ -94,7 +95,6 @@ plot_feature(se, c("P14618",
![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-8-1.png)<!-- -->



## Differential expression (DE) analysis

One of the frequent analysis we do is differential expression analysis to understand the difference between tumor and NAT. It can be performed through following commands:
Expand Down Expand Up @@ -134,7 +134,7 @@ plot_volcano(de_result_updated, "Tumor_vs_NAT")
![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-10-1.png)<!-- -->

## Enrichment analysis
One of the key difference between peptide-level analysis of PTMs we demonstrated here and protein level analysis is that PTMs usually act in a site-specific manner. Here, we also provide the way to help users perform enrichment analysis site-specifically through creating the input file you needed for [PTM-SEA](https://doi.org/10.1074/mcp.tir118.000943).
One of the key difference between peptide-level analysis of PTMs we demonstrated here and protein level analysis is that PTMs usually act in a site-specific manner. Here, we provide the way to help users perform enrichment analysis site-specifically through creating the input file you needed for [PTM-SEA](https://doi.org/10.1074/mcp.tir118.000943).

``` r
prepare_PTMSEA(normalized_de_result_updated, "Tumor_vs_NAT_diff", "/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result.gct")
Expand Down Expand Up @@ -190,7 +190,7 @@ You may also select particular gene set of interests. For example, following cod


``` r
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct",
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result/ccRCC-combined.gct",
"Tumor_vs_NAT_diff",
selected_concepts=c("KINASE-PSP_PKCA/PRKCA", "KINASE-PSP_PKCB/PRKCB", "KINASE-PSP_PKCG/PRKCG", "KINASE-PSP_PKCB_iso2/PRKCB", "KINASE-PSP_PKCD/PRKCD", "KINASE-PSP_PKCI/PRKCI", "KINASE-PSP_PKCT/PRKCQ",
"KINASE-PSP_PKCH/PRKCH", "KINASE-PSP_PKCE/PRKCE", "KINASE-PSP_PKCZ/PRKCZ"))
Expand All @@ -201,14 +201,14 @@ visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result
```

```
## /Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct 603 rows, 1 cols, 7 row descriptors, 0 col descriptors
## /Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result/ccRCC-combined.gct 603 rows, 1 cols, 7 row descriptors, 0 col descriptors
```

![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-14-1.png)<!-- -->


``` r
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct",
visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result/ccRCC-combined.gct",
"Tumor_vs_NAT_diff",
selected_concepts=c(# "KINASE-PSP_Akt1/AKT1", "KINASE-PSP_Akt3/AKT3", "KINASE-PSP_Akt2/AKT2",
"KINASE-iKiP_AKT3", "KINASE-iKiP_AKT2", "PATH-WP_PI3K-Akt_signaling_pathway", "KINASE-iKiP_AKT1"))
Expand All @@ -219,9 +219,44 @@ visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result
```

```
## /Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct 603 rows, 1 cols, 7 row descriptors, 0 col descriptors
## /Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result/ccRCC-combined.gct 603 rows, 1 cols, 7 row descriptors, 0 col descriptors
```

![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-15-1.png)<!-- -->


Alternatively, FragPipeAnalystR also provides ways to generate input and visualization for the [Kinase Library](https://kinase-library.phosphosite.org/). Here is the example of generating the input file:


``` r
prepare_kinome(de_result_updated, "Tumor_vs_NAT_diff", "/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_new/kinome_input_asterisk.tsv")
```


And here is the result visualization:

``` r
visualize_kinome("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_result/enrichment-analysis-result-table.txt")
```

![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-17-1.png)<!-- -->


``` r
AKT_labels <- c("AKT1", "AKT2", "ATK3")
visualize_kinome("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_result/enrichment-analysis-result-table.txt",
labels=AKT_labels)
```

![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-18-1.png)<!-- -->


``` r
PKC_labels <- c("PKCI", "PKCH", "PKCT", "PKCZ", "PKCE", "PKCD", "PKCG", "PKCA", "PKCB")
visualize_kinome("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_result/enrichment-analysis-result-table.txt", labels=PKC_labels)
```

![](phospho_TMT_tutorial_files/figure-html/unnamed-chunk-19-1.png)<!-- -->




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bc61f5e

Please sign in to comment.