diff --git a/R/enrichment.R b/R/enrichment.R
index 992172b..fea814b 100644
--- a/R/enrichment.R
+++ b/R/enrichment.R
@@ -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")) +
diff --git a/docs/phospho_TMT_tutorial.html b/docs/phospho_TMT_tutorial.html
index 8abefb6..5580487 100644
--- a/docs/phospho_TMT_tutorial.html
+++ b/docs/phospho_TMT_tutorial.html
@@ -405,8 +405,10 @@
Boxplot after normalization
plot_feature(normalized_se, c("P14618_Y148", # PKM_Y146
"P28482_Y187",
"Q13541_S65"))
-
-### Boxplot of parent proteins
+
+
+
+
Boxplot of parent proteins
plot_feature(se, c("P14618",
"P28482",
"Q13541"))
@@ -422,7 +424,7 @@
Differential expression (DE) analysis
## Tested contrasts: Tumor_vs_NAT
de_result_updated <- add_rejections(de_result)
plot_volcano(de_result_updated, "Tumor_vs_NAT")
-
+
As you can see, there are many phosphosites upregulated and
downregulated in this comparison. This gives a lot of research
opportunities. For example, CAK2 (P51636) has been associated with maintaining kidney
@@ -436,15 +438,15 @@ Differential expression (DE) analysis
## Tested contrasts: Tumor_vs_NAT
normalized_de_result_updated <- add_rejections(normalized_de_result)
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.
+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.
prepare_PTMSEA(normalized_de_result_updated, "Tumor_vs_NAT_diff", "/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result.gct")
## Saving file to /Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result.gct
## Dimensions of matrix: [34051x1]
@@ -477,20 +479,34 @@ Enrichment analysis
You may also select particular gene set of interests. For example,
following code snippets demonstrate the result on PKC and AKT protein
kinases, respectively.
-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"))
## parsing as GCT v1.3
-## /Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct 603 rows, 1 cols, 7 row descriptors, 0 col descriptors
-
-visualize_PTMSEA("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_result/ccRCC-combined.gct",
+## /Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/PTMSEA_new/result/ccRCC-combined.gct 603 rows, 1 cols, 7 row descriptors, 0 col descriptors
+
+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"))
## parsing as GCT v1.3
-## /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
+
+Alternatively, FragPipeAnalystR also provides ways to generate input
+and visualization for the Kinase Library. Here
+is the example of generating the input file:
+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:
+visualize_kinome("/Users/hsiaoyi/Documents/workspace/FragPipeR_manuscript/result/kinome_result/enrichment-analysis-result-table.txt")
+
+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)
+
+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)
+
diff --git a/vignettes/phospho_TMT_tutorial.Rmd b/vignettes/phospho_TMT_tutorial.Rmd
index f860679..a8b58a3 100644
--- a/vignettes/phospho_TMT_tutorial.Rmd
+++ b/vignettes/phospho_TMT_tutorial.Rmd
@@ -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",
@@ -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:
@@ -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")
```
@@ -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)
+```
+
+
+
+
diff --git a/vignettes/phospho_TMT_tutorial.md b/vignettes/phospho_TMT_tutorial.md
index 3e41bbb..1d5197b 100644
--- a/vignettes/phospho_TMT_tutorial.md
+++ b/vignettes/phospho_TMT_tutorial.md
@@ -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
@@ -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:
@@ -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")
@@ -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"))
@@ -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"))
@@ -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)
+
+
+
+
diff --git a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-10-1.png b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-10-1.png
index 2d1b726..a67a32d 100644
Binary files a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-10-1.png and b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-10-1.png differ
diff --git a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-14-1.png b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-14-1.png
index aee6cf9..630d456 100644
Binary files a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-14-1.png and b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-14-1.png differ
diff --git a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-15-1.png b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-15-1.png
index 105acdf..7d79198 100644
Binary files a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-15-1.png and b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-15-1.png differ
diff --git a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-17-1.png b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-17-1.png
new file mode 100644
index 0000000..2161846
Binary files /dev/null and b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-17-1.png differ
diff --git a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-18-1.png b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-18-1.png
new file mode 100644
index 0000000..122e577
Binary files /dev/null and b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-18-1.png differ
diff --git a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-19-1.png b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-19-1.png
new file mode 100644
index 0000000..7e88c0f
Binary files /dev/null and b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-19-1.png differ
diff --git a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-9-1.png b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-9-1.png
index 8c283e2..0f4c485 100644
Binary files a/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-9-1.png and b/vignettes/phospho_TMT_tutorial_files/figure-html/unnamed-chunk-9-1.png differ