Plot fragment coverage (frequence of Tn5 insertion) within given regions for groups of cells.
SingleCoveragePlot(
object,
region,
annotation = NULL,
ucsc = TRUE,
peaks = NULL,
assay = NULL,
fragment.path = NULL,
group.by = NULL,
window = 100,
downsample = 0.1,
height.tracks = 10,
extend.upstream = 0,
extend.downstream = 0,
ymax = NULL,
scale.factor = NULL,
cells = NULL,
idents = NULL,
sep = c("-", "-")
)CoveragePlot(
object,
region,
annotation = NULL,
ucsc = TRUE,
peaks = NULL,
assay = NULL,
fragment.path = NULL,
group.by = NULL,
window = 100,
downsample = 0.1,
height.tracks = 10,
extend.upstream = 0,
extend.downstream = 0,
scale.factor = NULL,
ymax = NULL,
cells = NULL,
idents = NULL,
sep = c("-", "-"),
...
)
A Seurat object
A set of genomic coordinates to show. Can be a GRanges object, a string, or a vector of strings describing the genomic coordinates to plot.
An Ensembl based annotation package
Set annotation seqlevels style to UCSC
A GRanges object containing peak coordinates
Name of the assay to plot
Path to an index fragment file. If NULL, will look for a path stored for the
requested assay using the SetFragments
function
Name of one or more metadata columns to group (color) the cells by. Default is the current cell identities
Smoothing window size
Fraction of positions to retain in the plot. Default is 0.1 (retain 10 percent, ie every 10th position)
Height of the accessibility tracks relative to the height of the gene annotation track. Default is 2 (twice as high as annotation track).
Number of bases to extend the region upstream (Default 0)
Number of bases to extend the region downstream (Default 0)
Maximum value for Y axis. If NULL (default) set to the highest value among all the tracks.
Scaling factor for track height. If NULL (default), use the median group scaling factor determined by total number of fragments sequences in each group.
Which cells to plot. Default all cells
Which identities to include in the plot. Default is all identities.
Separators to use for strings encoding genomic coordinates. First element is used to separate the chromosome from the coordinates, second element is used to separate the start from end coordinate.
Additional arguments passed to wrap_plots
Returns a ggplot
object
Thanks to Andrew Hill for providing an early version of this function http://andrewjohnhill.com/blog/2019/04/12/streamlining-scatac-seq-visualization-and-analysis/
# NOT RUN {
fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac")
atac_small <- SetFragments(atac_small, file = fpath)
CoveragePlot(object = atac_small, region = c("chr1-713500-714500"))
# }
Run the code above in your browser using DataCamp Workspace