This region is likely a foreign chloroplast or nuclear gene that has been inserted into the mitochondrial genome but not actually highly expressed in the mitochondria themselves. But that is not the case for one region (green points around position 10 kb). Now, we clearly see that most of the highly expressed regions are also greatly enriched in mitochondrial RNA samples. But maybe we can make the visualization a little clearer by manually defining the heat-map color scheme as follows: singlePlot2 + scale_colour_gradient(limits=c(-1, 1), low = "green", high = "red") Now the shading of the points reflects the extent to which the transcripts are enriched in the mitochondria relative to the total cellular fraction (lighter blue indicates more enrichment). singlePlot2 = ggplot (data=RNAseq_chrom21, aes(x=Pos, y=RCM, color=Enrichment)) + geom_point() Let’s try that by defining a new plot entirely. For example, instead of putting them into two categories (genic and intergenic) we could have used a “heat map” to color them based on a continuous variable such as “Enrichment” (see above). Note that we could have used an alternative color scheme for our points. But there are also highly expressed regions in uncharacterized intergenic sequence. Now we see that the region of highest expression is an annotated gene. singlePlot + scale_colour_manual(values=c("red", "black")) If you are not fond of the color scheme, you can modify it by adding an additional statement to the existing plot. singlePlot = ggplot (data=RNAseq_chrom21, aes(x=Pos, y=RCM, color=Region)) + geom_point() singlePlot = ggplot (data=RNAseq_chrom21, aes(x=Pos, y=RCM)) + geom_point()īut what if we want to distinguish between “genic” and “intergenic” regions as defined in the input file? We can re-define our plot by adding a color statement. In this case, we must at least specify that we want to generate a scatter plot by adding the geom_point() statement. For example: plot (RNAseq_chrom21$Pos, RNAseq_chrom21$RCM)īut this is not sufficient for ggplot. In the native plot function in R, simply defining the x- and y-variables is sufficient to generate a plot. This is a common mistake (and source of frustration) with ggplot. Now, try viewing that plot by entering its name on the command line. singlePlot = ggplot (data=RNAseq_chrom21, aes(x=Pos, y=RCM)) We will work from the data subset for chromosome 21 only, and we will make nucleotide position our x-variable and read depth our y-variable. Let’s begin by defining a new plot with the ggplot function. Generate plots of read depth along the length of chromosome 21 with ggplot
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |