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 Enrichment – Proportional enrichment of coverage in a mitochondrial fraction relative to total cellular RNA (log scale)Ĥ.RCM – Average read depth in the corresponding window expressed as read count per million.Region – Identification of the corresponding window as either “genic” or “intergenic”.Pos – Nucleotide position for a 250-bp window used to calculated average read depth.Note that there are five data columns, containing the following. Print the first five rows of data with the following command: RNAseq # Chrom Pos Region RCM Enrichment Read in the data with the following command (you may need to provide the path to where you stored this data file): RNAseq = lim ("SlidingWindow.txt") It is called SlidingWindow.txt and can be downloaded here. We are going to work from a data set that summarizes read depth from RNA-seq reads that were mapped onto a genome that consists of multiple chromosomes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |