Description Usage Arguments Value Author(s)

View source: R/plotGenomicDistributions.R

Given an alignmentData or alignmentMeth object and a set of coordinates, plots the average distribution of coverage/methylation over those coordinates. The plotted distributions can be split up into different sample groups by the user.

1 2 3 4 5 |

`mD` |
The |

`samples` |
A factor or list defining the different groups of samples for which to plot different distributions. If a list, each member should consist of integer values defining the column numbers of the 'mD' object. If missing, will use the [email protected] value. |

`coordinates` |
A |

`cuts` |
Optionally, the number of subdivisions to cut the coordinates in when calculating the average coverage/methylation density. |

`maxcuts` |
The maximum number of subdivisions permitted when calculating the average coverage/methylation density. |

`bw` |
If 'cuts' is missing, this factor divides the product of the length of the 'coordinates' object and the median width of the coordinates to defines the number of cuts (minimum twenty cuts). |

`surrounding` |
If non-zero, the size of the region up- and down-stream of the given coordinates for which average coverage/methylation should also be calculated. |

`add` |
If TRUE, the plotted distribution will be added to the current plot. |

`col` |
If given, a vector of colours for each of the groups defined in 'samples'. Defaults to 'rainbow(length(samples))'. |

`ylim` |
See ‘ylim’ option for plot. If missing, will be calculated from data. |

`meanOnly` |
If TRUE, the mean methylation profile for each member of the 'samples' parameter is plotted on a single graph. If FALSE, every 5th percentile is plotted for each member of the sample parameters, each on a separate graph. |

`plot` |
Should the profile be plotted? Defaults to TRUE. |

`position` |
A vector describing the position of each point to be plotted. Take from the ‘$position’ element in the list object returned by ‘averageProfiles’. |

`profiles` |
A matrix describing the profiles to be plotted. Take from the '$profiles element in the list object returned by ‘averageProfiles’. |

`legend` |
If TRUE, a legend describing the samples is included on the plot. |

`titles` |
If given, and ‘meanOnly = FALSE’, a vector of titles for the quantile plots. |

`...` |
Additional arguments to be passed to the 'plotAverageProfile' function, and hence to the 'plot' or 'lines' methods. |

Invisibly, a list containing the coordinates of the lines plotted.

Thomas J. Hardcastle

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.