Plot a scatter of gene expression vs an atac profile
Usage
plot_atac_rna(
atac_mc,
gene,
atac_promoter = gene,
mc_rna = NULL,
peak = NULL,
max_dist_to_promoter_peak = 500,
normalize_atac = TRUE,
eps_rna = 0.00001,
tss_intervals = "intervs.global.tss",
plot_object_id = TRUE
)
Arguments
- atac_mc
a McPeaks object
- gene
name of the gene to plot
- atac_promoter
name of the promoter to plot. By default this would be the rna gene
gene
.- mc_rna
a
metacell1
'mc' object or ametacells
metacell UMI matrix (a matrix where each row is a gene and each column is a metacell). Can be NULL ifatac_mc
already contains the gene expression data (added byadd_mc_rna
).- peak
name of the peak to plot. If NULL - the promoter of
atac_promoter
would be shown. You can get the peak names fromatac@peaks$peak_name
- max_dist_to_promoter_peak
how far from
gene
's TSS to search for promoter-proximal peaks. Default: 500- normalize_atac
whether to use normalized atac profiles (default: TRUE)
- eps_rna
added regularization when calculating log expression (Default: 1e-5). Promoter ATAC signal has been observed empirically to often be linearly correlated with log of gene expression.
- tss_intervals
name of the intervals set containing the TSSs
- plot_object_id
plot the object id of the
atac_mc
object in the bottom left corner of the plot (default: TRUE)
Examples
if (FALSE) {
p1 <- plot_atac_rna(atac_mc = pbmc_atac_mc, mc_rna = pbmc_rna_mc, gene = "CD4")
p2 <- plot_atac_rna(atac_mc = pbmc_atac_mc, mc_rna = pbmc_rna_mc, gene = "CD4", atac_promoter = "CD8")
# Plot gene vs some peak of interest
peak <- atac_mc@peaks[1]$peak_name
p3 <- plot_atac_rna(atac_mc = pbmc_atac_mc, mc_rna = pbmc_rna_mc, gene = "CD4", peak = peak)
}