plotAllelicGene.Rd
Plot allelic data (allelic proportions, isoform propostions)
in a gene context leveraging the Gviz package. See the allelic
vignette for example usage. TPM and count filters are used by
default to clean up the plot of features with minimal signal;
note that the isoform proportion displayed at the bottom of the
plot is among the features that pass the filtering steps.
If the function is not responding, it is likely due to issues
connecting to UCSC servers to draw the ideogram, in this case
set ideogram=FALSE
.
plotAllelicGene(
y,
gene,
db,
region = NULL,
symbol = NULL,
genome = NULL,
tpmFilter = 1,
isoPropFilter = 0.05,
countFilter = 10,
pc = 1,
transcriptAnnotation = "symbol",
labels = list(a2 = "a2", a1 = "a1"),
qvalue = TRUE,
log2FC = TRUE,
ideogram = FALSE,
cov = NULL,
covFacetIsoform = FALSE,
allelicCol = c("dodgerblue", "goldenrod1"),
isoformCol = "firebrick",
statCol = "black",
gridCol = "grey80",
baselineCol = "black",
titleCol = "black",
titleAxisCol = "black",
titleBgCol = "white",
geneBorderCol = "darkblue",
geneFillCol = "darkblue",
genomeAxisCol = "black",
innerFontCol = "black",
...
)
a SummarizedExperiment (see swish
)
the name of the gene of interest, requires
a column gene_id
in the metadata columns of the
rowRanges of y
either a TxDb or EnsDb object to use for the gene model
GRanges, the region to be displayed in the Gviz plot. if not specified, will be set according to the gene plus 20 of the total gene extent on either side
alternative to gene
, to specify
the gene of interest according to a column symbol
in the metadata columns of the rowRanges of y
UCSC genome code (e.g. "hg38"
,
if not specified it will use the GenomeInfoDb::genome()
of the rowRanges of y
minimum TPM value (mean over samples) to keep a feature
minimum percent of isoform proportion to keep a feature
minimum count value (mean over samples) to keep a feature
pseudocount to avoid dividing by zero in allelic proportion calculation
argument passed to Gviz::GeneRegionTrack
("symbol"
, "gene"
, "transcript"
, etc.)
list, labels for a2 (non-effect) and a1 (effect) alleles
logical, whether to inclue qvalue track
logical, whether to include log2FC track
logical, whether to include ideogram track
character specifying a factor or integer variable to use
to facet the allelic proportion plots, should be a column in
colData(y)
logical, if cov
is provided,
should it also be used to facet the isoform proportion track,
in addition to the allelic proportion track
the colors of the points and lines for allelic proportion
the colors of the points and lines for isoform proportion
the color of the lollipops for q-value and log2FC
the color of the grid in the data tracks
the color of the horizontal baseline for q-value and lo2gFC
font color of the side titles (track labels)
axis color of the side titles (track labels)
background color of the side titles (track labels)
the color of the borders and font in gene region track
the color of the fill in the gene region track
line color of the genome axis track
font color of genome axis track, ideogram, and allelic proportion legend
additional arguments passed to Gviz::plotTracks()
nothing, a plot is displayed
The methods for allelic expression analysis are described in:
Euphy Wu, Noor P. Singh, Kwangbom Choi, Mohsen Zakeri, Matthew Vincent, Gary A. Churchill, Cheryl L. Ackert-Bicknell, Rob Patro, Michael I. Love. "Detecting isoform-level allelic imbalance accounting for inferential uncertainty" bioRxiv (2022) https://doi.org/10.1101/2022.08.12.503785
This function makes use of the Gviz package that is described in:
Hahne, F., Ivanek, R. (2016). Visualizing Genomic Data Using Gviz and Bioconductor. In: Mathé, E., Davis, S. (eds) Statistical Genomics. Methods in Molecular Biology, vol 1418. Humana Press, New York, NY. https://doi.org/10.1007/978-1-4939-3578-9_16