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",
  ...
)

Arguments

y

a SummarizedExperiment (see swish)

gene

the name of the gene of interest, requires a column gene_id in the metadata columns of the rowRanges of y

db

either a TxDb or EnsDb object to use for the gene model

region

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

symbol

alternative to gene, to specify the gene of interest according to a column symbol in the metadata columns of the rowRanges of y

genome

UCSC genome code (e.g. "hg38", if not specified it will use the GenomeInfoDb::genome() of the rowRanges of y

tpmFilter

minimum TPM value (mean over samples) to keep a feature

isoPropFilter

minimum percent of isoform proportion to keep a feature

countFilter

minimum count value (mean over samples) to keep a feature

pc

pseudocount to avoid dividing by zero in allelic proportion calculation

transcriptAnnotation

argument passed to Gviz::GeneRegionTrack ("symbol", "gene", "transcript", etc.)

labels

list, labels for a2 (non-effect) and a1 (effect) alleles

qvalue

logical, whether to inclue qvalue track

log2FC

logical, whether to include log2FC track

ideogram

logical, whether to include ideogram track

cov

character specifying a factor or integer variable to use to facet the allelic proportion plots, should be a column in colData(y)

covFacetIsoform

logical, if cov is provided, should it also be used to facet the isoform proportion track, in addition to the allelic proportion track

allelicCol

the colors of the points and lines for allelic proportion

isoformCol

the colors of the points and lines for isoform proportion

statCol

the color of the lollipops for q-value and log2FC

gridCol

the color of the grid in the data tracks

baselineCol

the color of the horizontal baseline for q-value and lo2gFC

titleCol

font color of the side titles (track labels)

titleAxisCol

axis color of the side titles (track labels)

titleBgCol

background color of the side titles (track labels)

geneBorderCol

the color of the borders and font in gene region track

geneFillCol

the color of the fill in the gene region track

genomeAxisCol

line color of the genome axis track

innerFontCol

font color of genome axis track, ideogram, and allelic proportion legend

...

additional arguments passed to Gviz::plotTracks()

Value

nothing, a plot is displayed

References

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