Learn R Programming

Basic4Cseq (version 1.8.0)

visualizeViewpoint: Draw a near-cis coverage plot for 4C-seq data

Description

This method creates a plot of near-cis 4C-seq fragment data around the experiment's viewpoint. Fragment-based raw data is visualized as grey dots, interpolated data (running median / running mean) as coloured dots. Trend line and quantiles are loess-smoothed; the trend line is shown as colored line whereas the quantiles are depicted as light-grey bands. A corresponding quantile legend is added in an extra plot.

Usage

visualizeViewpoint(expData, poi = data.frame(chr = character(), start = character(), end = character(), name = character(), colour = character()), plotFileName = "", windowLength = 5, interpolationType = "median", picDim = c(9, 5), maxY = -1, minQuantile = 0.2, maxQuantile = 0.8, mainColour = "blue", plotTitle = "4C-seq plot", loessSpan = 0.1, xAxisIntervalLength = 50000, yAxisIntervalLength = 500, useFragEnds = TRUE)

Arguments

expData
Experiment data of class Data4Cseq with information on the 4C-seq experiment, including normalized near-cis fragment data for visualization
poi
Points of interest that will be marked in the plot
plotFileName
Name for the 4C-seq plot file
windowLength
Length of the window for running median / running mean that is used to smooth the trend line
interpolationType
Type of interpolation, either running median or running mean
picDim
Dimensions of the plot
maxY
Maximum y-value to plot. If no maximum is given, the maximum running median / mean value is used
minQuantile
Minimum quantile to draw
maxQuantile
Maximum quantile to draw
mainColour
Main colour of the plot
plotTitle
Title of the 4C-seq plot, depicted above the main plot
loessSpan
Span value for the loess curve; smaller values mean a tighter fit to the data points, but a value that is too small may produce errors
xAxisIntervalLength
Length of the x axis intervals in the plot
yAxisIntervalLength
Length of the y axis intervals in the plot
useFragEnds
Indicates whether fragment end data is used directly or interpolated on fragment level

Value

Examples

Run this code
  data(liverData)
  file <- system.file("extdata", "fetalLiverVP.bed", package="Basic4Cseq")
    visualizeViewpoint(liverData, readPointsOfInterestFile(file), plotFileName = "", mainColour = "red", plotTitle = "Fetal Liver Near-Cis Plot", loessSpan = 0.1, maxY = 6000, xAxisIntervalLength = 50000, yAxisIntervalLength = 1000)

Run the code above in your browser using DataLab