plotRecurrence: panConusig::plotRecurrence

View source: R/getRecurrence.R

plotRecurrenceR Documentation

panConusig::plotRecurrence

Description

Plot recurrence of copy number signature across the genome, labelling genes of interest or chromosome arms that show highly recurrent signature attribution.

Usage

plotRecurrence(props,counts,tumTypes,windows,
arms,doGenes=FALSE,doArms=TRUE,plotGenes=TRUE,outDir="~/",
filename=NULL,whichSigs="CN19",
colours = c("red","blue","green","black","gray","orange","cyan","purple"),
whichGenes="CN19",genesToTest="MDM2",propThreshold=0.2,countThreshold=5,
ensembl=NULL,splits=NA,mids=NA,saveRes=FALSE,geneGR=NULL,windowGR=NULL,
doCombine=TRUE,doSex=FALSE,doLegend=TRUE,
doMain=TRUE,LTY=1:5,YLIM=NULL,LABY=NULL,
offsetBase=0.01,offsetTweak=0.02,xoverlap=100,
yoverlap=0.02,myMAR=NULL,XLIMadj=0,
geneCex=2,legloc="topright",doGenesAbove=TRUE,
mylayout=NULL,ylineoffset=NULL,
pdfWidth=21,pdfHeight=7,CEX=4,doSplit=FALSE,legnames=NULL,propArm=0.75,
geneYtweak=0,extraMain=NULL)

Arguments

props

Matrix of proportions of signature recurrence across genomic bins. See getRecurrence().

counts

Matrix of counts of signature recurrence across genomic bins. See getRecurrence().

tumTypes

Vector of tumour types for each sample.

windows

Genomic windows that were used to generate props and counts. See setupWindows().

arms

Chromosome arm information for plotting labels of recurrent signatures at an arm/chromosome level. See loadCytoband().

doGenes

Whether to calculate gene names of genes overlapping regions of recurrence.

doArms

Whether to plot chromosome arm names of arms overlapping regions of recurrence.

plotGenes

Whether to plot gene names of genes overlapping regions of recurrence.

outDir

Directory for saving plot as pdf.

filename

Filename for saving plot as pdf. If NULL no pdf will be produced.

whichSigs

Vector of signature names to plot.

colours

Vector of colours for each signature.

whichGenes

Vector of signature names for which to plot gene names.

genesToTest

Vector of gene names to consider plotting.

propThreshold

Proportion threshold above which to plot gene/arm labels.

countThreshold

Count threshold above which to plot gene/arm labels.

ensembl

Biomart ensembl object to look up gene coordinates. If NULL, geneGR and whichGenes will be used instead.

splits

Index of windows that split separate chromosomes. See setupWindows().

mids

index of windows that mark the midpoints of chromosomes. See setupWindows().

saveRes

Boolean. Whether to save the window and recurrence information as a csv.

geneGR

GenomicRanges object denoting genomic positions of genes listed in genesToTest.

windowGR

GenomicRanges object denoting genomic windows in which recurrence has been evaluated. See setupWindows().

doCombine

Output of getRecurrence is sometimes a list. If so, doCombine=TRUE will convert to a matrix internally.

doSex

Boolean. Whether to plot sex chromosomes.

doLegend

Boolean. Whether to plot a legend.

doMain

Boolean. Whether to plot title.

LTY

Vector of line types for each signature to be plotted.

YLIM

Custom values for plotting y-axis limits.

LABY

Custom label for the y-axis.

offsetBase

Y offset for plotting gene labels.

offsetTweak

X offset for plotting gene labels.

xoverlap

Overlap required for automated moving of overlapping gene labels (x-axis).

yoverlap

Overlap required for automated moving of overlapping gene labels (y-axis).

myMAR

Custom margins for plotting.

XLIMadj

Extension to the right hand xlim value.

geneCex

cex value for plotting gene labels.

legloc

Location for legend.

doGenesAbove

Boolean. Whether to plot gene names on plot (FALSE), or ina separate panel above the plot (TRUE).

mylayout

Custom layout for multi-panel figure (When doGenesAbove==TRUE).

ylineoffset

Offset for lines connecting gene names to plot.

pdfWidth

Width for output pdf.

pdfHeight

Height for output pdf.

CEX

cex value for plot text.

doSplit

Boolean. Whether to split plot into two panels (Only use when plotting two signatures).

legnames

Names for legens.

propArm

Proportion of chromosome arm that must be above propThreshold to plot arm label.

geneYtweak

Offset for plotting gene labels (y-axis).

extraMain

Subtitle.

Value

Pdf if filename is not NULL, csv if saveRes is not FALSE.


UCL-Research-Department-of-Pathology/panConusig documentation built on March 25, 2022, 12:18 a.m.