Description Usage Arguments Value Examples
View source: R/getSigGeneVolcPlot.R
This function displays volcano plots for the data and drug supplied with the top 5 and bottom 5 genes that drove the connectivity score labelled. Top 5 and bottom 5 here refer to genes that had positive and negative gene estimates in the data, respectively, and drove the connectivity score the most. Note that which genes drive the connectivity score can vary with the method used to calculate the score. However, in general these genes are the top positive and negative genes that the drug lowered and raised the expression of, respectively.
1 2 3 | getSigGeneVolcPlot(genesEst, genesSymb, genesP, genesId, drugPert,
drugName, drugScoreMeth, gwcMethod, droveNegScore, drugEst,
makePlot = TRUE, drugVolcPlot = FALSE, supressPlot = TRUE)
|
genesEst |
a numeric vector with the estimates (typically LogFC) for the genes |
genesSymb |
a character vector with the gene symbols for the gene estimates provided |
genesP |
a numeric vector with the p values for the gene estimates provided |
genesId |
a character vector with gene Ids for the gene estimates provided. Must be the same type of ID as those used for the row names of the drugPert variable |
drugPert |
the drug perturbation signature used in the analysis |
drugName |
the name of the drug in the drug perturbation signature that one would like to inspect |
drugScoreMeth |
a string specifying which drug repurposing technique was used to score the drugs during each trial. The options for this parameter are currently "gwc" and "fgsea" |
gwcMethod |
a character string specifying which method was used when computing correlations in the gwc function. The options are spearman or pearson. |
droveNegScore |
a boolean specifying whether the plots should label the genes that drove the negative connectivity score (reversed the phenotype) between the drug and the data. If FALSE, the genes that drove the positive connectivity score will be labelled. |
drugEst |
a boolean specifying whether the estimates for each gene of the drug perturbation signature were used in the gwc calculation (TRUE) or if the t-stats for each gene in the drug perturbation signature were used in the gwc calculation (FALSE). |
makePlot |
a boolean specifying whether or not to display the plots showing the genes that the drug interacts with to drive the score. Default is TRUE |
drugVolcPlot |
a boolean (default is FALSE) specifying whether to generate a volcano plot for the top and bottom 5 genes (by estimate) in the drug that were present in the data supplied. Note that if TRUE the other plots are not generated. |
supressPlot |
a boolean specifying whether to generate volcano plots that illustrate the genes driving the connectivity score. TRUE by default |
The information used to generate the plots. Specifically, 2 lists. One that contains the experiment/user supplied data, a subset of this data for the top positive (according to genesEst) genes that drove the score by being altered by the drug, and the same for the most negative genes from the data. The second list is the same but for the drugs data as given by drugPert. The genes will be the same but the info now pertains to how well the drug reduces the expression of these genes.
1 2 3 4 5 | data("geneDataGwc")
data("drugPertEx")
geneDataClean = mapGenes(geneIds = geneDataGwc$symbol, geneEsts = geneDataGwc$logFC, pvals = geneDataGwc$P.Value, forRankAndPlot = TRUE)
drugGeneInfo = getSigGeneVolcPlot(genesEst = geneDataClean$geneEsts, genesSymb = geneDataClean$symbol, genesP = geneDataClean$pvals, genesId = geneDataClean$ensemble, drugPert = drugPertEx, drugName = "BRD-K78431006", drugScoreMeth = "gwcCmapBox", gwcMethod = "pearson", droveNegScore = TRUE, drugEst = TRUE, drugVolcPlot = FALSE, supressPlot = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.