Description Usage Arguments Value Examples
View source: R/PlotCoverageByGroup.R
reads in the fragments.tsv.gz or bam file for only the given region (gene), and plot using karyoploteR package
1 2 3 4 5 6 7 8 9 | PlotCoverageByGroup(chrom = NULL, start = NULL, end = NULL,
gene_name = NULL, upstream = 2000, downstream = 2000,
fragment = NULL, bam = NULL, cellbarcode_tag = "CB",
mapqFilter = 30, grouping, clusters_to_plot = NULL,
genome = "hg19", txdb = TxDb.Hsapiens.UCSC.hg19.knownGene,
eg.db = org.Hs.eg.db, ymax = NULL, label_cex = 1,
label_side = "left", label.margin = 0.05, yaxis_cex = 1,
track_cols = "cadetblue2", tick.dist = 10000,
minor.tick.dist = 2000, tick_label_cex = 1)
|
chrom |
chromosome |
start |
chromosome start |
end |
chromosome end |
gene_name |
gene symbol for the gene one want's to plot. e.g. VEGFA. Use either chrom, start, end or gene_name |
upstream |
If use gene_name, specify the upstream bp for extending the GRanges |
downstream |
If use gene_name, specify the downstream bp for extending the GRanges |
fragment |
path to the fragment.tsv.gz file from 10x cellranger-atac output. indexed by tabix. |
bam |
path to the bam file |
cellbarcode_tag |
The cell barcode tag in the bam file, default is "CB" as in the 10x output |
mapqFilter |
the mapq quality score filter for reads from bam file, default is 30, |
grouping |
path to a tsv file with three columns: "cell", "cluster", "depth". "cell" is the cell barcode, "cluster" is the cluster id for each cell, and "depth" is the number of reads in that cell. |
clusters_to_plot |
A character vector containing clusters to plot in the tracks from bottom to top. default is all clusters |
genome |
hg19, hg38 or mm9, mm10 |
txdb |
A TxDb object, e.g. TxDb.Hsapiens.UCSC.hg19.knownGene |
eg.db |
Either org.Hs.eg.db or org.Mm.eg.db |
ymax |
ymax for each track, if not specified, max of all the tracks will be calculated. Every track will use the same ymax, so it is comparable across clusters. |
label_cex |
size of the cluster label |
label_side |
side of the cluster label. "left" or "right". |
label.margin |
the position of the cluster label, sepcify negative e.g., -0.6 to move to the center of the track body if label_side is left. |
yaxis_cex |
size of the y-axis |
track_cols |
a vector of colors for the tracks, should be the same length as clusters_to_plot or the total number of clusters. If clusters_to_plot is NULL, and track_cols has only one element, all tracks will be plotted with the same color. |
tick.dist |
chromosome tick distance to mark, default 10kb |
minor.tick.dist |
minor chromosome tick distance to mark, default 2000 bp |
tick_label_cex |
size of the tick label |
A karyoploteR object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
library(org.Hs.eg.db)
library(org.Mm.eg.db)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(TxDb.Mmusculus.UCSC.mm10.knownGene)
chrom<- "chr12"
start<- 69730394
end<- 69760971
plotCoverageByGroup(chrom = chrom, start = start, end = end, fragment = "data/atac_viz/10k_pbmc/atac_v1_pbmc_10k_fragments.tsv.gz",
grouping = "data/atac_viz/grouping.txt", track_cols = "red")
plotCoverageByGroup(gene_name = "NKG7", fragment = "data/atac_viz/10k_pbmc/atac_v1_pbmc_10k_fragments.tsv.gz",
grouping = "data/atac_viz/grouping.txt", tick_label_cex = 1, tick.dist = 5000,
minor.tick.dist = 1000)
plotCoverageByGroup(gene_name = "NKG7", fragment = "data/atac_viz/10k_pbmc/atac_v1_pbmc_10k_fragments.tsv.gz",
grouping = "data/atac_viz/grouping.txt", tick_label_cex = 1, tick.dist = 5000,
minor.tick.dist = 1000, track_cols = c("red", "blue", ""cadetblue2"),
clusters_to_plot = c("1", "3, "4"))
plotCoverageByGroup(gene_name = "NKG7", bam = "data/atac_viz/10k_pbmc/atac_v1_pbmc_10k.bam",
cellbarcode_tag= "CB", mapqFilter = 30,
grouping = "data/atac_viz/grouping.txt", tick_label_cex = 1, tick.dist = 5000,
minor.tick.dist = 1000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.