TrackPlot
Description
Plot read/UMI coverage and transcript tracks from BAM(s).
Usage
TrackPlot(
bamfile = NULL,
chr = NULL,
start = NULL,
end = NULL,
gene = NULL,
strand = c("both", "forward", "reverse", "ignore"),
split.bc = FALSE,
bin = 1000,
cell.tag = "CB",
umi.tag = "UB",
gtf = NULL,
max.depth = 0,
group.title.size = rel(2),
cell.group = NULL,
display.genes = NULL,
meta.features = NULL,
log.scaled = FALSE,
upstream = 1000,
downstream = 1000,
fragfile = NULL,
atac.log.scaled = FALSE,
atac.max.depth = 0,
col.by = NULL,
layout.heights = c(1, 10, 2),
highlights = NULL,
junc = FALSE,
junc.min.depth = 5
)
Arguments
bamfile
|
A path to a BAM file or a list to BAM files. BAM file(s) should be indexed. |
chr
|
Chromosome name. |
start
|
Start position. |
end
|
End position. |
strand
|
Plot reads on strand. Default is bot strands. Can be one of c(“both”, “forward”, “reverse”, “ignore”). When set to ignore, read strand information will be discarded. |
split.bc
|
Split coverage by barcode. Default is FALSE, bulk mode. |
bin
|
Divide plot region into bins. Save plot time. Default is 1000. |
cell.tag
|
Tag for cell barcode in the BAM. Default is “CB”. |
umi.tag
|
Tag for UMI in the BAM. Default is “UB”. |
gtf
|
GTF database, load by gtf2db. |
max.depth
|
Max depth capped to plot. Default is 0, no capping. |
group.title.size
|
Font size for track group titles. Default is rel(2). |
cell.group
|
Vector or list of cell group IDs. Name for the ID is the cell name. If bamfile is a list, the cell.group can also be a list with the same length of bamfile list, and binding cell.group to bam file by the name or order in both lists. See manual online for real cases. <https://shiquan.github.io/Yano.html> |
display.genes
|
Vector of genes to plot in the target region. Other genes in this region will not print in transcript track plot. |
meta.features
|
Meta table for features. If set the regions will be also plot on top of track plot. Meta table can be accessed by object[[assay]][[]]. |
log.scaled
|
Log scaled the coverage depth per group. Only used if the depth is super high. Disabled in default. |
upstream
|
Flank the target region with upstream to plot. Default is 1000. |
downstream
|
Flank the target region with downstream to plot. Default is 1000. |
fragfile
|
Fragment file for ATAC data. |
atac.log.scaled
|
Log scaled the coverage depth per group for ATAC tracks. |
atac.max.depth
|
Capped depth to plot for ATAC tracks. |
col.by
|
Color bed regions by value. The specified name should be a colname in meta table. Only support discrete value. |
layout.heights
|
Layout for track plots. Default is c(10,2) or c(1,10,2) if meta.features specified or c(1,10,10,2) if fragment file also specified. |
highlights
|
A region of a list of regions to hightlight. The region is format as c(start,end). |
junc
|
Also plot the junction reads. |
junc.min.depth
|
Filter out junctions if low than this cutoff. This parameter used to remove noise background. Default is 5. |