plotCNprofileBAF.Rd
Plot a single cell allele specific copy number profile
plotCNprofileBAF(
cn,
cellid = NULL,
chrfilt = NULL,
pointsize = 1,
alphaval = 0.6,
maxCN = 10,
cellidx = 1,
BAFcol = "state_phase",
statecol = "state",
returnlist = FALSE,
raster = FALSE,
y_axis_trans = "identity",
xaxis_order = "genome_position",
legend.position = "bottom",
genes = NULL,
annotateregions = NULL,
annotateregions_linetype = 2,
homolog = FALSE,
SV = NULL,
adj = 0.03,
svalpha = 0.5,
svwidth = 1,
plotdata = TRUE,
offset = NULL,
my_title = NULL,
tickwidth = 50,
chrstart = NULL,
chrend = NULL,
shape = 16,
ideogram = FALSE,
positionticks = FALSE,
genome = "hg19",
...
)
Single cell allele specific copy number dataframe with the following columns: `cell_id`, `chr`, `start`, `end`, `state`, `copy` or a hscn object.
Which cell to plot, if no cell is specific will plot the first cell in the dataframe
Vector of chromosomes to plot, if NULL (default) will plot all chromosomes
The point size in the plot
Alpha value of points
The maximum on the y axis, if any points are above this value they will be winsorized rather than removed
idx of cell to plot if cellid = NULL
state to use to colour BAF track, default = `state_phase`
The colour mapping, default is to map colours to the `state` column
Return a list rather than the ggplot object
use ggrastr or not, default = FALSE
What transformation to use on the y-axis, default is identity, the other option is "squashy" which uses a tanh transformation
Default is "genome_position"
Where to place the legend, default is "bottom"
vector of genes to annotate, will add a dashed vertical line and label
Dataframe with chr start and end positions to annotate, will draw a dashed vertical line at this position
Linetype for region annotation, default = 2 (dashed)
Rather than plot the BAF and CN seperately this will plot the 2 homologs on the same track
Default is NULL. If a dataframe with structural variant position is passed it will add a track on the top showin rearrangement links
the alpha scaling of the SV lines, default = 0.5
width of rearrangement connections
Binary value whether to plot raw data or inferred states in homolog plot
string to use for title, if NULL cell_id is shown
Start of region (in Mb) when plotting a single chromosome
End of region (in Mb) when plotting a single chromosome
shape for plotting, default = 16
plot ideogram at the top, default = TRUE
set to TRUE to use position ticks rather than chromosome ticks
genome to use, default = "hg19" (only used for ideogram)
to use when plotting inferred states in homolog plot
ggplot2 plot
if (FALSE) { # \dontrun{
data("haplotypes")
data("CNbins")
haplotypes <- format_haplotypes_dlp(haplotypes, CNbins)
hscn <- callHaplotypeSpecificCN(CNbins, haplotypes, likelihood = "binomial")
plotCNprofileBAF(hscn, genes = "MYC")
plotCNprofileBAF(hscn, homolog = TRUE, chrfilt = c("1", "8"))
} # }