Last updated: 2020-04-24
Checks: 5 2
Knit directory: Proteomics/analysis/
This reproducible R Markdown analysis was created with workflowr (version 1.6.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish
to commit the R Markdown file and build the HTML.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20200227)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
To ensure reproducibility of the results, delete the cache directory correlateGenomic_cache
and re-run the analysis. To have workflowr automatically delete the cache directory prior to building the file, set delete_cache = TRUE
when running wflow_build()
or wflow_publish()
.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/.DS_Store
Ignored: analysis/.Rhistory
Ignored: analysis/correlateGenomic_cache/
Ignored: analysis/correlateGenomic_noBlock_MCLL_cache/
Ignored: analysis/correlateGenomic_noBlock_UCLL_cache/
Ignored: analysis/correlateGenomic_noBlock_cache/
Ignored: code/.Rhistory
Ignored: data/.DS_Store
Ignored: output/.DS_Store
Untracked files:
Untracked: analysis/analysisSplicing.Rmd
Untracked: analysis/analysisTrisomy19.Rmd
Untracked: analysis/annotateCNV.Rmd
Untracked: analysis/correlateGenomic_PC12adjusted.Rmd
Untracked: analysis/correlateGenomic_noBlock.Rmd
Untracked: analysis/correlateGenomic_noBlock_MCLL.Rmd
Untracked: analysis/correlateGenomic_noBlock_UCLL.Rmd
Untracked: analysis/default.css
Untracked: analysis/patCNV.csv
Untracked: analysis/patCNV.xlsx
Untracked: analysis/patSNV.csv
Untracked: analysis/peptideValidate.Rmd
Untracked: analysis/processPeptides_LUMOS.Rmd
Untracked: analysis/style.css
Untracked: code/utils.R
Untracked: data/190909_CLL_prot_abund_med_norm.tsv
Untracked: data/190909_CLL_prot_abund_no_norm.tsv
Untracked: data/20190423_Proteom_submitted_samples_bereinigt.xlsx
Untracked: data/20191025_Proteom_submitted_samples_final.xlsx
Untracked: data/LUMOS/
Untracked: data/LUMOS_peptides/
Untracked: data/LUMOS_protAnnotation.csv
Untracked: data/LUMOS_protAnnotation_fix.csv
Untracked: data/SampleAnnotation_cleaned.xlsx
Untracked: data/facTab_IC50atLeast3New.RData
Untracked: data/gmts/
Untracked: data/mapEnsemble.txt
Untracked: data/mapSymbol.txt
Untracked: data/pyprophet_export_aligned.csv
Untracked: data/timsTOF_protAnnotation.csv
Untracked: output/LUMOS_processed.RData
Untracked: output/dxdCLL.RData
Untracked: output/pepCLL_lumos.RData
Untracked: output/pepTab_lumos.RData
Untracked: output/proteomic_LUMOS_20200227.RData
Untracked: output/proteomic_LUMOS_20200320.RData
Untracked: output/proteomic_timsTOF_20200227.RData
Untracked: output/splicingResults.RData
Untracked: output/timsTOF_processed.RData
Unstaged changes:
Modified: analysis/_site.yml
Modified: analysis/analysisSF3B1.Rmd
Modified: analysis/compareProteomicsRNAseq.Rmd
Modified: analysis/correlateGenomic.Rmd
Modified: analysis/correlateMIR.Rmd
Modified: analysis/correlateMethylationCluster.Rmd
Modified: analysis/index.Rmd
Modified: analysis/predictOutcome.Rmd
Modified: analysis/processProteomics_LUMOS.Rmd
Modified: analysis/qualityControl_LUMOS.Rmd
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view them.
File | Version | Author | Date | Message |
---|---|---|---|---|
html | b8e0823 | Junyan Lu | 2020-03-10 | Build site. |
Rmd | c8cb45c | Junyan Lu | 2020-03-10 | update analysis |
protMat <- assays(protCLL)[["count"]] #without imputation
protCLL$trisomy12 <- patMeta[match(colnames(protCLL),patMeta$Patient.ID),]$trisomy12
geneMat <- patMeta[match(colnames(protMat), patMeta$Patient.ID),] %>%
select(Patient.ID, IGHV.status, del11p:U1) %>%
mutate_if(is.factor, as.character) %>% mutate(IGHV.status = ifelse(IGHV.status == "M", 1,0)) %>%
mutate_at(vars(-Patient.ID), as.factor) %>% #assign a few unknown mutated cases to wildtype
data.frame() %>% column_to_rownames("Patient.ID")
geneMat <- geneMat[,apply(geneMat,2, function(x) sum(x %in% 1, na.rm = TRUE))>=5]
Mutations that will be tested
colnames(geneMat)
[1] "IGHV.status" "del11q" "del13q" "trisomy12" "trisomy19"
[6] "DDX3X" "EGR2" "NOTCH1" "SF3B1" "TP53"
chiRes <- lapply(seq(1,ncol(geneMat)-1), function(i) {
lapply(seq(i+1, ncol(geneMat)), function(j) {
geneA <- colnames(geneMat)[i]
geneB <- colnames(geneMat)[j]
#res <- chisq.test(geneMat[,i],geneMat[,j])
res <- fisher.test(table(geneMat[,i], geneMat[,j]))
tibble(geneA = geneA, geneB=geneB, p = res$p.value)
}) %>% bind_rows()
}) %>% bind_rows() %>% arrange(p) %>%
filter(p <=0.05)
chiRes
# A tibble: 7 x 3
geneA geneB p
<chr> <chr> <dbl>
1 IGHV.status del11q 0.0106
2 DDX3X EGR2 0.0111
3 trisomy12 trisomy19 0.0119
4 IGHV.status DDX3X 0.0219
5 del13q trisomy12 0.0222
6 IGHV.status TP53 0.0488
7 IGHV.status trisomy19 0.0496
Fit the probailistic dropout model
designMat <- geneMat[,c("IGHV.status","trisomy12")]
fit <- proDA(protMat, design = ~ .,
col_data = designMat)
Test for differentially expressed proteins
resList.ighvTri12 <- lapply(c("IGHV.status","trisomy12"), function(n) {
contra <- paste0(n,"1")
resTab <- test_diff(fit, contra) %>%
dplyr::rename(id = name, logFC = diff, t=t_statistic,
P.Value = pval, adj.P.Val = adj_pval) %>%
mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>%
select(name, id, logFC, t, P.Value, adj.P.Val) %>%
arrange(P.Value) %>% mutate(Gene = n) %>%
as_tibble()
}) %>% bind_rows()
Fit the probailistic dropout model and test for differentially expressed proteins
otherGenes <- colnames(geneMat)[!colnames(geneMat)%in% c("IGHV.status","trisomy12")]
resList <- lapply(otherGenes, function(n) {
designMat <- geneMat[,c("IGHV.status","trisomy12",n)]
designMat <- designMat[!is.na(designMat[[n]]),]
testMat <- protMat[,rownames(designMat)]
fit <- proDA(testMat, design = ~ .,
col_data = designMat)
contra <- paste0(n,"1")
resTab <- test_diff(fit, contra) %>%
dplyr::rename(id = name, logFC = diff, t=t_statistic,
P.Value = pval, adj.P.Val = adj_pval) %>%
mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>%
select(name, id, logFC, t, P.Value, adj.P.Val) %>%
arrange(P.Value) %>% mutate(Gene = n) %>%
as_tibble()
resTab
}) %>% bind_rows()
Combine the results
resList <- bind_rows(resList.ighvTri12, resList)
ggplot(resList, aes(x=P.Value)) + geom_histogram(fill = "green", alpha =0.5, bins=30, col = "grey50") + facet_wrap(~Gene, ncol=3, scales = "free") + xlim(0,1)
Warning: Removed 20 rows containing missing values (geom_bar).
Number of significantly associated proteins at 10% FDR
proNumTab <- resList %>% group_by(Gene) %>%
summarise(number = sum(adj.P.Val < 0.1, na.rm=TRUE)) %>%
arrange(desc(number)) %>% mutate(Gene = factor(Gene, levels = Gene))
proNumTab
# A tibble: 10 x 2
Gene number
<fct> <int>
1 trisomy12 1165
2 IGHV.status 481
3 del11q 27
4 SF3B1 20
5 trisomy19 5
6 EGR2 1
7 TP53 1
8 DDX3X 0
9 del13q 0
10 NOTCH1 0
Based on the P-value histograms and numbers of significant associations, trisomy12 has the most impact on protein expression, followed by IGHV and del11q. Other genomic variations do not seem to have major impact on protein expression.
List of significant proteins (10% FDR)
corRes.sig <- resList %>% filter(Gene == "IGHV.status", adj.P.Val < 0.1) %>%
select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()
Volcano plot
plotVolcano <- function(pTab, fdrCut = 0.05, posCol = "red", negCol = "blue",
x_lab = "dm", plotTitle = "",ifLabel = FALSE,
colLabel = NULL) {
plotTab <- pTab %>% mutate(ifSig = ifelse(adj.P.Val > fdrCut, "n.s.",
ifelse(logFC > 0, "up","down"))) %>%
mutate(ifSig = factor(ifSig, levels = c("up","down","n.s.")))
pCut <- -log10((filter(plotTab, ifSig != "n.s.") %>% arrange(desc(P.Value)))$P.Value[1])
g <- ggplot(plotTab, aes(x=logFC, y=-log10(P.Value), label = name)) +
geom_point(shape = 21, aes(fill = ifSig),size=3) +
geom_hline(yintercept = pCut, linetype = "dashed") +
annotate("text", x = -Inf, y = pCut, label = paste0(fdrCut*100,"% FDR"),
size = 5, vjust = -1.2, hjust=-0.1) +
scale_fill_manual(values = c(n.s. = "grey70",
up = posCol, down = negCol)) +
theme( legend.position = "bottom",
legend.text = element_text(size = 15)) +
ylab(expression(-log[10]*'('*italic(P)~value*')')) +
xlab(x_lab) + ggtitle(plotTitle)
if (ifLabel & is.null(colLabel))
g <- g + ggrepel::geom_text_repel(data = filter(plotTab, ifSig != "n.s."),
size=5, force = 2)
else if (ifLabel & !is.null(colLabel)) {
g <- g+ggrepel::geom_text_repel(data = filter(plotTab, ifSig != "n.s."),
aes_string(col = colLabel),
size=5, force = 2) +
scale_color_manual(values = c(yes = "red",no = "black"))
}
return(g)
}
plotVolcano(filter(resList, Gene == "IGHV.status"), fdrCut =0.01, x_lab="log2FoldChange",
plotTitle = "IGHV.status", ifLabel = TRUE)
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Heatmap of differentially expressed proteins
proList <- corRes.sig$id
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol
colAnno <- colData(protCLL)[,c("trisomy12","IGHV.status")] %>%
data.frame()
plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno, clustering_method = "ward.D2",
color = colorRampPalette(c("navy","white","firebrick"))(100),
breaks = seq(-6,6, length.out = 101))
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Plot top 9 most differentially expressed proteins
protTab <- sumToTiday(protCLL,"patID") %>% mutate(name = hgnc_symbol)
plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC)
ggplot(plotTab, aes(x=IGHV.status, y = expression)) + geom_boxplot(aes(fill = IGHV.status)) + geom_point() +
facet_wrap(~name, scale = "free")
Enrichment analysis
gmts = list(H= "../data/gmts/h.all.v6.2.symbols.gmt",
KEGG= "../data/gmts/c2.cp.kegg.v6.2.symbols.gmt")
inputTab <- resList %>% filter(P.Value <0.05, Gene == "IGHV.status") %>%
mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
dplyr::select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
plot(p)
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
List of significant proteins (10% FDR)
corRes.sig <- resList %>% filter(Gene == "trisomy12", adj.P.Val < 0.1) %>%
mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()
Volcano plot (0.1% FDR)
plotTab <- filter(resList, Gene == "trisomy12") %>%
mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
mutate(onChr12 = ifelse(chromosome == "12","yes","no"))
plotVolcano(plotTab, fdrCut =0.001, x_lab="log2FoldChange",
plotTitle = "trisomy12", ifLabel = TRUE, colLabel = "onChr12")
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Labels colored by red indicates the gene is on chromosome 12
Heatmap of differentially expressed proteins (0.1%)
proList <- filter(corRes.sig, !is.na(name),adj.P.Val < 0.001) %>% distinct(name, .keep_all = TRUE) %>% pull(id)
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol
colAnno <- colData(protCLL)[,c("gender","trisomy12","IGHV.status")] %>%
data.frame()
rowAnno <- rowData(protCLL)[proList,c("chromosome_name","hgnc_symbol"),drop=FALSE] %>%
data.frame(stringsAsFactors = FALSE) %>%
mutate(onChr12 = ifelse(chromosome_name == "12","yes","no")) %>%
select(hgnc_symbol, onChr12) %>% data.frame() %>% column_to_rownames("hgnc_symbol")
plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno, clustering_method = "ward.D2",
annotation_row = rowAnno,
color = colorRampPalette(c("navy","white","firebrick"))(100),
breaks = seq(-6,6, length.out = 101))
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Plot top 9 most differentially expressed proteins
plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
filter(!is.na(trisomy12))
ggplot(plotTab, aes(x=trisomy12, y = expression)) + geom_boxplot(aes(fill = trisomy12)) + geom_point() +
facet_wrap(~name, scale = "free")
Enrichment analysis
gmts = list(H= "../data/gmts/h.all.v6.2.symbols.gmt",
KEGG = "../data/gmts/c2.cp.kegg.v6.2.symbols.gmt")
inputTab <- resList %>% filter(P.Value <0.05, Gene == "trisomy12") %>%
mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
distinct(name, .keep_all = TRUE) %>%
select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
#pdf("tri12Enrich.pdf", height = 15, width = 6)
plot(p)
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
#dev.off()
List of significant proteins (10% FDR)
corRes.sig <- resList %>% filter(Gene == "SF3B1", adj.P.Val < 0.1) %>%
select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()
Volcano plot
plotVolcano(filter(resList, Gene == "SF3B1"), fdrCut =0.1, x_lab="log2FoldChange",
plotTitle = "SF3B1", ifLabel = TRUE)
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Heatmap of differentially expressed proteins
proList <- corRes.sig$id
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol
colAnno <- geneMat[,c("trisomy12","IGHV.status","SF3B1")] %>%
data.frame()
plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno, clustering_method = "ward.D2",
color = colorRampPalette(c("navy","white","firebrick"))(100),
breaks = seq(-6,6, length.out = 101))
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Plot top 9 most differentially expressed proteins
protTab <- sumToTiday(protCLL,"patID") %>% mutate(name = hgnc_symbol)
plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
mutate(SF3B1 = patMeta[match(colID, patMeta$Patient.ID),]$SF3B1)
ggplot(plotTab, aes(x=SF3B1, y = expression)) + geom_boxplot(aes(fill = SF3B1)) + geom_point() +
facet_wrap(~name, scale = "free")
Enrichment analysis
gmts = list(H= "../data/gmts/h.all.v6.2.symbols.gmt",
KEGG= "../data/gmts/c2.cp.kegg.v6.2.symbols.gmt")
inputTab <- resList %>% filter(P.Value <0.05, Gene == "SF3B1") %>%
mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
dplyr::select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
plot(p)
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
List of significant proteins (10% FDR)
corRes.sig <- resList %>% filter(Gene == "del11q", adj.P.Val < 0.1) %>%
mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()
Volcano plot
plotTab <- plotTab <- filter(resList, Gene == "del11q") %>%
mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
mutate(onChr11 = ifelse(chromosome == "11","yes","no"))
plotVolcano(plotTab, fdrCut =0.1, x_lab="log2FoldChange",
plotTitle = "del11q", ifLabel = TRUE, colLabel = "onChr11")
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Labels colored by red indicates the gene is on chromosome 11
Heatmap of differentially expressed proteins
proList <- filter(corRes.sig, !is.na(name)) %>% distinct(name, .keep_all = TRUE) %>% pull(id)
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol
colAnno <- geneMat[,c("del11q","IGHV.status")] %>%
data.frame()
colAnno$gender <- protCLL[,rownames(colAnno)]$gender
rowAnno <- rowData(protCLL)[proList, c("chromosome_name","hgnc_symbol"),drop=FALSE] %>% data.frame(stringsAsFactors = FALSE) %>%
mutate(onChr11 = ifelse(chromosome_name == "11","yes","no")) %>%
select(hgnc_symbol, onChr11) %>% data.frame() %>% column_to_rownames("hgnc_symbol")
plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno, annotation_row = rowAnno,
clustering_method = "ward.D2",
color = colorRampPalette(c("navy","white","firebrick"))(100),
breaks = seq(-6,6, length.out = 101))
Version | Author | Date |
---|---|---|
b8e0823 | Junyan Lu | 2020-03-10 |
Plot top 9 most differentially expressed proteins
plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
mutate(del11q = patMeta[match(colID, patMeta$Patient.ID),]$del11q) %>%
filter(!is.na(del11q))
ggplot(plotTab, aes(x=del11q, y = expression)) + geom_boxplot(aes(fill = del11q)) + geom_point() +
facet_wrap(~name, scale = "free")
Enrichment analysis
inputTab <- resList %>% filter(P.Value <0.05, Gene == "del11q") %>%
mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
distinct(name, .keep_all = TRUE) %>%
select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
#pdf("tri12Enrich.pdf", height = 15, width = 6)
plot(p)
#dev.off()
List of significant proteins (10% FDR)
corRes.sig <- resList %>% filter(Gene == "trisomy19", adj.P.Val < 0.1) %>%
mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()
Volcano plot
plotTab <- plotTab <- filter(resList, Gene == "trisomy19") %>%
mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
mutate(onChr19 = ifelse(chromosome == "19","yes","no"))
plotVolcano(plotTab, fdrCut =0.1, x_lab="log2FoldChange",
plotTitle = "trisomy19", ifLabel = TRUE, colLabel = "onChr19")
Labels colored by red indicates the gene is on chromosome 19
Heatmap of differentially expressed proteins
proList <- filter(corRes.sig, !is.na(name)) %>% distinct(name, .keep_all = TRUE) %>% pull(id)
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol
colAnno <- geneMat[,c("trisomy19","IGHV.status","trisomy12")] %>%
data.frame()
colAnno$gender <- protCLL[,rownames(colAnno)]$gender
rowAnno <- rowData(protCLL)[proList, c("chromosome_name","hgnc_symbol"),drop=FALSE] %>% data.frame(stringsAsFactors = FALSE) %>%
mutate(onChr19 = ifelse(chromosome_name == "19","yes","no")) %>%
select(hgnc_symbol, onChr19) %>% data.frame() %>% column_to_rownames("hgnc_symbol")
plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno, annotation_row = rowAnno,
clustering_method = "ward.D2",
color = colorRampPalette(c("navy","white","firebrick"))(100),
breaks = seq(-6,6, length.out = 101))
Plot top 9 most differentially expressed proteins
plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
mutate(trisomy19 = patMeta[match(colID, patMeta$Patient.ID),]$trisomy19) %>%
filter(!is.na(trisomy19))
ggplot(plotTab, aes(x=trisomy19, y = expression)) + geom_boxplot(aes(fill = trisomy19)) + geom_point() +
facet_wrap(~name, scale = "free")
Enrichment analysis
inputTab <- resList %>% filter(P.Value <0.05, Gene == "trisomy19") %>%
mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
distinct(name, .keep_all = TRUE) %>%
select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
#pdf("tri12Enrich.pdf", height = 15, width = 6)
plot(p)
#dev.off()
sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS 10.15.4
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] forcats_0.4.0 stringr_1.4.0
[3] dplyr_0.8.5 purrr_0.3.3
[5] readr_1.3.1 tidyr_1.0.0
[7] tibble_3.0.0 tidyverse_1.3.0
[9] SummarizedExperiment_1.14.0 DelayedArray_0.10.0
[11] BiocParallel_1.18.0 matrixStats_0.54.0
[13] Biobase_2.44.0 GenomicRanges_1.36.0
[15] GenomeInfoDb_1.20.0 IRanges_2.18.1
[17] S4Vectors_0.22.0 BiocGenerics_0.30.0
[19] jyluMisc_0.1.5 pheatmap_1.0.12
[21] piano_2.0.2 proDA_1.1.2
[23] cowplot_0.9.4 ggplot2_3.3.0
loaded via a namespace (and not attached):
[1] readxl_1.3.1 backports_1.1.4 fastmatch_1.1-0
[4] drc_3.0-1 workflowr_1.6.0 igraph_1.2.4.1
[7] shinydashboard_0.7.1 splines_3.6.0 crosstalk_1.0.0
[10] TH.data_1.0-10 digest_0.6.19 htmltools_0.4.0
[13] fansi_0.4.0 gdata_2.18.0 magrittr_1.5
[16] cluster_2.1.0 openxlsx_4.1.0.1 limma_3.40.2
[19] modelr_0.1.5 sandwich_2.5-1 colorspace_1.4-1
[22] ggrepel_0.8.1 rvest_0.3.5 haven_2.2.0
[25] xfun_0.8 crayon_1.3.4 RCurl_1.95-4.12
[28] jsonlite_1.6 survival_2.44-1.1 zoo_1.8-6
[31] glue_1.3.2 survminer_0.4.4 gtable_0.3.0
[34] zlibbioc_1.30.0 XVector_0.24.0 car_3.0-3
[37] abind_1.4-5 scales_1.1.0 mvtnorm_1.0-11
[40] DBI_1.0.0 relations_0.6-8 Rcpp_1.0.1
[43] plotrix_3.7-6 xtable_1.8-4 cmprsk_2.2-8
[46] foreign_0.8-71 km.ci_0.5-2 DT_0.7
[49] htmlwidgets_1.3 httr_1.4.1 fgsea_1.10.0
[52] gplots_3.0.1.1 RColorBrewer_1.1-2 ellipsis_0.2.0
[55] farver_2.0.3 pkgconfig_2.0.2 dbplyr_1.4.2
[58] utf8_1.1.4 labeling_0.3 tidyselect_1.0.0
[61] rlang_0.4.5 later_0.8.0 munsell_0.5.0
[64] cellranger_1.1.0 tools_3.6.0 visNetwork_2.0.7
[67] cli_1.1.0 generics_0.0.2 broom_0.5.2
[70] evaluate_0.14 yaml_2.2.0 knitr_1.23
[73] fs_1.4.0 zip_2.0.2 survMisc_0.5.5
[76] caTools_1.17.1.2 nlme_3.1-140 whisker_0.3-2
[79] mime_0.7 slam_0.1-45 xml2_1.2.2
[82] rstudioapi_0.10 compiler_3.6.0 curl_3.3
[85] ggsignif_0.5.0 marray_1.62.0 reprex_0.3.0
[88] stringi_1.4.3 lattice_0.20-38 Matrix_1.2-17
[91] shinyjs_1.0 KMsurv_0.1-5 vctrs_0.2.4
[94] pillar_1.4.3 lifecycle_0.2.0 data.table_1.12.2
[97] bitops_1.0-6 httpuv_1.5.1 R6_2.4.0
[100] promises_1.0.1 KernSmooth_2.23-15 gridExtra_2.3
[103] rio_0.5.16 codetools_0.2-16 MASS_7.3-51.4
[106] gtools_3.8.1 exactRankTests_0.8-30 assertthat_0.2.1
[109] rprojroot_1.3-2 withr_2.1.2 multcomp_1.4-10
[112] GenomeInfoDbData_1.2.1 hms_0.5.2 grid_3.6.0
[115] rmarkdown_1.13 carData_3.0-2 git2r_0.26.1
[118] maxstat_0.7-25 ggpubr_0.2.1 sets_1.0-18
[121] shiny_1.3.2 lubridate_1.7.4