This function will plot the coverage at an input region in the style of a browser track. It allows for normalization of the signal which enables direct comparison across samples.

plotBrowserTrack(
  ArchRProj = NULL,
  region = NULL,
  groupBy = "Clusters",
  useGroups = NULL,
  plotSummary = c("bulkTrack", "featureTrack", "loopTrack", "geneTrack"),
  sizes = c(10, 1.5, 3, 4),
  features = getPeakSet(ArchRProj),
  loops = getCoAccessibility(ArchRProj),
  geneSymbol = NULL,
  useMatrix = NULL,
  log2Norm = TRUE,
  upstream = 50000,
  downstream = 50000,
  tileSize = 250,
  minCells = 25,
  normMethod = "ReadsInTSS",
  threads = getArchRThreads(),
  ylim = NULL,
  pal = NULL,
  baseSize = 7,
  scTileSize = 0.5,
  scCellsMax = 100,
  borderWidth = 0.4,
  tickWidth = 0.4,
  facetbaseSize = 7,
  geneAnnotation = getGeneAnnotation(ArchRProj),
  title = "",
  verbose = TRUE,
  logFile = createLogFile("plotBrowserTrack")
)

Arguments

ArchRProj

An ArchRProject object.

region

A GRanges region that indicates the region to be plotted. If more than one region exists in the GRanges object, all will be plotted. If no region is supplied, then the geneSymbol argument can be used to center the plot window at the transcription start site of the supplied gene.

groupBy

A string that indicates how cells should be grouped. This string corresponds to one of the standard or user-supplied cellColData metadata columns (for example, "Clusters"). Cells with the same value annotated in this metadata column will be grouped together and the average signal will be plotted.

useGroups

A character vector that is used to select a subset of groups by name from the designated groupBy column in cellColData. This limits the groups to be plotted.

plotSummary

A character vector containing the features to be potted. Possible values include "bulkTrack" (the ATAC-seq signal), "scTrack" (scATAC-seq signal), "featureTrack" (i.e. the peak regions), "geneTrack" (line diagrams of genes with introns and exons shown. Blue-colored genes are on the minus strand and red-colored genes are on the plus strand), and "loopTrack" (links between a peak and a gene).

sizes

A numeric vector containing up to 3 values that indicate the sizes of the individual components passed to plotSummary. The order must be the same as plotSummary.

features

A GRanges object containing the "features" to be plotted via the "featureTrack". This should be thought of as a bed track. i.e. the set of peaks obtained using getPeakSet(ArchRProj)).

loops

A GRanges object containing the "loops" to be plotted via the "loopTrack". This GRanges object start represents the center position of one loop anchor and the end represents the center position of another loop anchor. A "loopTrack" draws an arc between two genomic regions that show some type of interaction. This type of track can be used to display chromosome conformation capture data or co-accessibility links obtained using getCoAccessibility().

geneSymbol

If region is not supplied, plotting can be centered at the transcription start site corresponding to the gene symbol(s) passed here.

useMatrix

If supplied geneSymbol, one can plot the corresponding GeneScores/GeneExpression within this matrix. I.E. "GeneScoreMatrix"

log2Norm

If supplied geneSymbol, Log2 normalize the corresponding GeneScores/GeneExpression matrix before plotting.

upstream

The number of basepairs upstream of the transcription start site of geneSymbol to extend the plotting window. If region is supplied, this argument is ignored.

downstream

The number of basepairs downstream of the transcription start site of geneSymbol to extend the plotting window. If region is supplied, this argument is ignored.

tileSize

The numeric width of the tile/bin in basepairs for plotting ATAC-seq signal tracks. All insertions in a single bin will be summed.

minCells

The minimum number of cells contained within a cell group to allow for this cell group to be plotted. This argument can be used to exclude pseudo-bulk replicates generated from low numbers of cells.

normMethod

The name of the column in cellColData by which normalization should be performed. The recommended and default value is "ReadsInTSS" which simultaneously normalizes tracks based on sequencing depth and sample data quality.

threads

The number of threads to use for parallel execution.

ylim

The numeric quantile y-axis limit to be used for for "bulkTrack" plotting. If not provided, the y-axis limit will be c(0, 0.999).

pal

A custom palette (see paletteDiscrete or ArchRPalettes) used to override coloring for groups.

baseSize

The numeric font size to be used in the plot. This applies to all plot labels.

scTileSize

The width of the tiles in scTracks. Larger numbers may make cells overlap more. Default is 0.5 for about 100 cells.

scCellsMax

The maximum number of cells for scTracks.

borderWidth

The numeric line width to be used for plot borders.

tickWidth

The numeric line width to be used for axis tick marks.

facetbaseSize

The numeric font size to be used in the facets (gray boxes used to provide track labels) of the plot.

geneAnnotation

The geneAnnotation object to be used for plotting the "geneTrack" object. See createGeneAnnotation() for more info.

title

The title to add at the top of the plot next to the plot's genomic coordinates.

verbose

A boolean value that determines whether standard output should be printed.

logFile

The path to a file to be used for logging ArchR output.