-
Notifications
You must be signed in to change notification settings - Fork 2
Plotting Relative Gene Expression
If your RNA-seq analysis is exploratory in nature and results need to be validated, the usual route for validation is selecting candidate genes for RT-qPCR. By running the RT-qPCR, gene expression is compared by normalizing the candidate genes relative to select housekeeping genes within each condition, and then by normalizing the resulting expression values relative to the control conditions. These results are then plotted in a bar chart for visualization. The functions listed on this page allow for creating similar figures using RNA-seq data.
The first step is to normalize gene expression relative to specific genes. BinfTools' normToGene() function allows you do do this for a given gene expression matrix and a single gene, or list of genes to use for normalization. The arguments for normToGene() are:
- counts A count matrix (normalized or raw) with genes as rows and samples as columns
- norm A character vector of length >=1 of gene names (matching rownames(counts)) to use as reference genes for normalization. If more than one gene is provided, normToGene() will use the geometric mean of the expression of all reference genes for normalization.
This function will return a count matrix of the same dimensions with gene expression in each column normalized to the expression of the reference genes in the respective columns. It can sometimes be useful to use the raw gene expression data if comparing RNA-seq data to RT-qPCR data.
When you're ready to plot the relative gene expression barGene() will create the bar chart. The arguments for barGene() are:
- genes A character vector of the genes on interest for investigation. Must match rownames(counts).
- counts A count matrix of gene expression, where rows are genes and columns are samples. Can be normalized counts from DEG analysis, or counts normalized to gene expression using normToGene()
- conditions A character vector of length ncol(counts) describing the condition of each sample in counts
- title A character describing the title of the plot
- norm A character indicating the condition to use as the reference for relative gene exprssion. Each gene's expression will be set relative to this condition. Leave 'NULL' if plotting raw values.
- eb A character or zero (0) describing the style of error bar. 'sd'= standard deviation, 'se'= standard error of the mean. Use zero (0) if no error bars are to be plotted. Default is "sd".
- returnDat A Boolean indicating if a list containing the raw and summarized data for plotting should be returned for further analysis. Default is FALSE.
- col A character indicating the RColorBrewer palette name to be used. Default is "Dark2".
#Normalize reads to eIF2B and B-COP expression
gen_norm<-normToGene(getSym(norm_counts, "counts", species="dmelanogaster", target="FLYBASENAME_GENE"), norm=c("eIF2beta","betaCOP"))
#Plot gene expression relative to "Control" condition
genes<-c("Ldh","MFS3","dysf","Obp56d","prt")
barGene(genes=genes, counts=gen_norm, conditions=as.character(cond), title="Relative Gene Expression", norm="WT", eb="se", returnDat=F)
