Skip to content

5. Explore differential coverage plots

kbseah edited this page Jun 15, 2015 · 7 revisions

Differential coverage plots are generated from two separate coverage files (in this example: HPminus.coverage and HPplus.coverage). You've already seen how to import them into a gbt object earlier in step 3.

5a. Plotting

To make differential coverage plots instead of GC-coverage plots, simply specify a pair of samples to the slice= parameter. For example, to have sample 1 coverage on the x-axis and sample 2 coverage on the y-axis, use the parameter slice=c(1,2). Differential coverage plots are automatically generated with log scales for both axes, but you can override this by specifying your own option to the log= parameter.

Like with GC-coverage plots, you can overlay taxonomic marker genes, SSU rRNA markers, and tRNA markers, as well as add legend for the color scheme. In addition, you can choose to color the points by contig GC% instead of marker taxonomy (but you can't do both).

 > plot(d,slice=c(1,2)) # Basic plot. Defaults to coloring by marker genes, if data imported
 > plot(d,slice=c(1,2),marker=FALSE,gc=FALSE) # Uncolored plot
 > plot(d,slice=c(1,2),marker=TRUE,legend=TRUE) # Add legend
 > plot(d,slice=c(1,2),gc=TRUE,marker=FALSE) # Color by GC
 > plot(d,slice=c(1,2),gc=TRUE,marker=FALSE,legend=TRUE) # Add color scale for GC values
 > plot(d,slice=c(1,2),ssu=TRUE) # Mark scaffolds containing SSU rRNA genes with crosshairs
 > plot(d,slice=c(1,2),trna=TRUE) # Mark scaffolds containing tRNA genes with crosses

5b. Interactively choosing genomic bins

The same choosebin function is used to choose a bin from a differential coverage plot, except that the slice= parameter must be the same as the one used to draw the plot. Adding and subtracting bins works in the same way, as is fishing with Fastg information.