knitr::opts_chunk$set(
  collapse = TRUE,
  warning=FALSE, 
  message=FALSE,
  comment = "#>"
)
devtools::load_all(".")
library(dplyr)
library(DT)
library(ggplot2)
library(stringr)
library(ggpubr)

Preliminary steps (Downloading and Importing datasets)

Downloading and importing MMRF-RG datasets: wzxhzdk:3

Analyze the topN recurrent variants in the complete samples cohort

Heatmap of the N# of variants occurrence in the complete samples cohort

MMRFVariant_PlotVariantsbyGene
wzxhzdk:4 wzxhzdk:5

Get the list of variants found in the in the complete samples cohort ranked by the occurrence number

MMRFVariant_GetVariantsbyGene
wzxhzdk:6 wzxhzdk:7

Perform the impact table (ordered by ascending SIFT and descending Poliphen-2)

MMRFVariant_GetImpact

For semplification purposes, we visualize a subset of columns and rows.

impact.table.all<-MMRFVariant_GetImpact(variant.ann,ListSNPs.all$dbSNP)

impact.table.all.sub<-dplyr::select(impact.table.all,dbSNP,Gene,REF,ALT,feature,Effect,
                                SIFT_Impact,Polyphen_Impact,Impact)

head(unique(impact.table.all.sub),10)
knitr::include_graphics("imgs/ImpactTableAll.png")

Perform the Impact-Effect plot

MMRFVariant_PlotbyEffectImpact
wzxhzdk:10 wzxhzdk:11

Prioritizing variants in a known Multiple Myeloma (MM) disease-causing gene set

The six gene-signature including the genes KRAS, NRAS, TP53, FAM46C, DIS3, BRAF have a high recurrence rate and may play important roles in the pathogenesis, progression and prognosis of MM. This case study shows how MMRFVariant performs the integrative analysis of variants in that six gene-signature to prioritize pathogenic variants involved in the MM.

The Figure below shows the workflow that describes graphically step by step the procedure carried out to perform this case of study.

knitr::include_graphics("imgs/workflow.png")

Set the list of gene "ListGene" to explore

ListGene<-c("KRAS", "NRAS","TP53","FAM46C","DIS3","BRAF")

Draw the Heatmap of the N# of variants occurring in "ListGene"

variants.plot<-MMRFVariant_PlotVariantsbyGene(variant.ann,ListGene,height=15,
                                              width=20,topN=50,
                                              filenm="PlotVariantsbyGene_heatmap")
knitr::include_graphics("imgs/PlotVariantsbyGene_heatmap.png")

Get the list of Variants found in the gene set

ListSNPs<-MMRFVariant_GetVariantsbyGene(variant.ann, ListGene)

head(ListSNPs,20)
datatable(as.data.frame(ListSNPs), 
              options = list(scrollX = TRUE, keys = TRUE, pageLength = 5), 
              rownames = FALSE)

Plot the Impact-Effect of Variants

plot.impact.effect<-MMRFVariant_PlotbyEffectImpact(variant.ann,ListSNPs,topN=50,height=30, 
                                                   width=15, filenm="PlotbyEffectImpact")
knitr::include_graphics("imgs/PlotbyEffectImpact.png")

Perform the impact table (ordered by ascending SIFT and descending Poliphen-2)

impact.table<-MMRFVariant_GetImpact(variant.ann,ListSNPs)

For semplification purposes, we visualize a subset of columns and rows

impact.table.sub<-dplyr::select(impact.table,dbSNP,Gene,REF,ALT,feature,Effect,
                                SIFT_Impact,Polyphen_Impact,Impact)

head(unique(impact.table.sub),10)
knitr::include_graphics("imgs/ImpactTable.png")

Focusing on NRAS gene

ListSNPs_NRAS<-MMRFVariant_GetVariantsbyGene(variant.ann,"NRAS")
datatable(as.data.frame(ListSNPs_NRAS), 
              options = list(scrollX = TRUE, keys = TRUE, pageLength = 5), 
              rownames = FALSE)

We take into account only the top five SNPs by occurrence (see )

impact.table_NRAS<-MMRFVariant_GetImpact(variant.ann,ListSNPs_NRAS$dbSNP)

For semplification purposes, we visualize a subset of columns and rows

impact.table_NRAS<-dplyr::select(impact.table_NRAS,dbSNP,Gene,REF,ALT,
                                feature,Effect,SIFT_Impact,Polyphen_Impact,Impact)

head(unique(impact.table_NRAS),10)  
knitr::include_graphics("imgs/ImpactTable_NRAS.png")

Plot the Impact-Effect of SNPs in NRAS gene

plot.impact.effect_NRAS<-MMRFVariant_PlotbyEffectImpact(variant.ann,ListSNPs_NRAS,topN=50,height=30, 
                                                         width=15, filenm="PlotbyEffectImpact_NRAS")
knitr::include_graphics("imgs/PlotbyEffectImpact_NRAS.png")

KM Survival curves in NRAS gene

(!) SNPs in are discarded if: a) only a group with respect to FilterBy parameter is found b) pvalue is>=0.05

NRAS_SNPs.treat<-c("rs11554290","rs121913254","rs121913237", "rs121913255")

NRAS_surv.treatment<-MMRFVariant_SurvivalKM(patient,  
                                            trt,
                                            variant.ann,
                                            NRAS_SNPs.treat,
                                            FilterBy="Treatment", 
                                            filename="KM_Plot_NRAS_treatment",
                                            xlim = c(100,3000),
                                            height=22,
                                            width=12,
                                            conf.range = FALSE,
                                            color = c("Dark2"))








NRAS_surv.Effect<-MMRFVariant_SurvivalKM(patient,  #no significant results are found (all pvalue>0.05)
                                         trt,
                                         variant.ann,
                                         ListSNPs_NRAS,
                                         FilterBy="Effect", 
                                         filename="KM_Plot_NRAS_effect",
                                         xlim = c(100,100),
                                         height=22,
                                         width=12,
                                         conf.range = FALSE,
                                         color = c("Dark2"))


# see (*)

NRAS_SNPs.stage<-c("rs121913254")
NRAS_surv.Stage<-MMRFVariant_SurvivalKM(patient,  
                                        trt,
                                        variant.ann,
                                        NRAS_SNPs.stage,
                                        FilterBy="Stage", 
                                        filename="KM_Plot_NRAS_stage",
                                        xlim = c(100,3000),
                                        height=22,
                                        width=12,
                                        conf.range = FALSE,
                                        color = c("Dark2"))






# see (*)
NRAS_SNPs.bestresp<-c("rs11554290","rs121913254","rs121434595", "rs121913237")
NRAS_surv.Bestresp<-MMRFVariant_SurvivalKM(patient,  
                                           trt,
                                           variant.ann,
                                           NRAS_SNPs.bestresp,
                                           FilterBy="Bestresp", 
                                           filename="KM_Plot_NRAS_bestresp",
                                           xlim = c(100,3000),
                                           height=22,
                                           width=12,
                                           conf.range = FALSE,
                                           color = c("Dark2"))







# see (*)

NRAS_surv.Gender<-MMRFVariant_SurvivalKM(patient,  #All SNPs have pvalue<=0.05
                                         trt,
                                         variant.ann,
                                         ListSNPs_NRAS,
                                         FilterBy="Gender", 
                                         filename="KM_Plot_NRAS_gender",
                                         xlim = c(100,3000),
                                         height=22,
                                         width=12,
                                         conf.range = FALSE,
                                         color = c("Dark2"))




# see (*)

NRAS_surv.Biotype<-MMRFVariant_SurvivalKM(patient,  #All SNPs have have only a group with respect to FilterBy parameter 
                                          trt,
                                          variant.ann,
                                          ListSNPs_NRAS,
                                          FilterBy="Biotype", 
                                          filename="KM_Plot_NRAS_biotype",
                                          xlim = c(100,3000),
                                          height=22,
                                          width=12,
                                          conf.range = FALSE,
                                          color = c("Dark2"))



# see (*)
NRAS_SNPs.ethnicity<-c("rs11554290","rs121913254","rs121913237")
NRAS_surv.Ethnicity<-MMRFVariant_SurvivalKM(patient,  
                                            trt,
                                            variant.ann,
                                            NRAS_SNPs.ethnicity,
                                            FilterBy="Ethnicity", 
                                            filename="KM_Plot_NRAS_ethnicity",
                                            xlim = c(100,3000),
                                            height=22,
                                            width=12,
                                            conf.range = FALSE,
                                            color = c("Dark2"))
knitr::include_graphics("imgs/KM_Surv_ethnicity.png")
knitr::include_graphics("imgs/KM_Surv_bestresp.png")
knitr::include_graphics("imgs/KM_Surv_stage.png")
knitr::include_graphics("imgs/KM_Surv_treatment.png")


marziasettino/MMRFVariant documentation built on March 28, 2023, 3:16 p.m.