plotBrowserTrack | R Documentation |
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. Note that the genes displayed in these plots are derived from your geneAnnotation
(i.e. the BSgenome
object you used) so they may not match other online genome browsers that use different gene annotations.
plotBrowserTrack(
ArchRProj = NULL,
region = NULL,
groupBy = "Clusters",
useGroups = NULL,
sampleLabels = "Sample",
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,
maxCells = 500,
minCells = 25,
normMethod = "ReadsInTSS",
highlight = NULL,
highlightFill = "firebrick3",
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")
)
ArchRProj |
An |
region |
A |
groupBy |
A string that indicates how cells should be grouped. This string corresponds to one of the standard or
user-supplied |
useGroups |
A character vector that is used to select a subset of groups by name from the designated |
sampleLabels |
The name of a column in |
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 |
features |
A |
loops |
A |
geneSymbol |
If |
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 |
downstream |
The number of basepairs downstream of the transcription start site of |
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. |
maxCells |
The maximum number of cells to use for obtaining data to plot as a bulk track. Using more cells can increase the resolution of your plots at the expense of increased processing time. |
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 |
highlight |
A |
highlightFill |
The color to be used for the highlighted region designated by |
threads |
The number of threads to use for parallel execution. |
ylim |
The numeric quantile y-axis limit to be used for for "bulkTrack" plotting. This should be expressed as |
pal |
A custom palette (see |
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 |
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. |
#Get Test ArchR Project
proj <- getTestProject()
#Highlight
genes <- getGenes()
genes <- genes[which(genes$symbol %in% c("CD3D", "MS4A1"))]
#Plot Track
p <- plotBrowserTrack(proj, geneSymbol = c("CD3D", "MS4A1"), groupBy = "CellType", highlight = genes, highlightFill = "dodgerblue3")
#Plot PDF
plotPDF(p, name = "Track-CD3D-MS4A1", ArchRProj = proj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.