-
Notifications
You must be signed in to change notification settings - Fork 1
/
plotCNprofile.Rd
106 lines (78 loc) · 3.07 KB
/
plotCNprofile.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{plotCNprofile}
\alias{plotCNprofile}
\title{Plot a single cell copy number profile}
\usage{
plotCNprofile(
CNbins,
cellid = NULL,
chrfilt = NULL,
pointsize = 1,
alphaval = 0.6,
maxCN = 10,
cellidx = 1,
statecol = "state",
returnlist = FALSE,
raster = FALSE,
genome = "hg19",
y_axis_trans = "identity",
xaxis_order = "genome_position",
legend.position = "bottom",
annotateregions = NULL,
annotateregions_linetype = 2,
SV = NULL,
SVcol = TRUE,
svalpha = 0.5,
svwidth = 1,
adj = 0.03,
genes = NULL,
tickwidth = 50,
chrstart = NULL,
chrend = NULL,
shape = 16,
positionticks = FALSE,
ideogram = FALSE,
overwrite_color = NULL,
...
)
}
\arguments{
\item{CNbins}{Single cell copy number dataframe with the following columns: \code{cell_id}, \code{chr}, \code{start}, \code{end}, \code{state}, \code{copy}}
\item{cellid}{Which cell to plot, if no cell is specific will plot the first cell in the dataframe}
\item{chrfilt}{Vector of chromosomes to plot, if NULL (default) will plot all chromosomes}
\item{pointsize}{The point size in the plot}
\item{alphaval}{Alpha value of points}
\item{maxCN}{The maximum on the y axis, if any points are above this value they will be winsorized rather than removed}
\item{cellidx}{idx of cell to plot if cellid = NULL}
\item{statecol}{The colour mapping, default is to map colours to the \code{state} column}
\item{returnlist}{Return a list rather than the ggplot object}
\item{raster}{use ggrastr or not, default = FALSE}
\item{genome}{genome to use, default = "hg19" (only used for ideogram)}
\item{y_axis_trans}{What transformation to use on the y-axis, default is identity, the other option is "squashy" which uses a tanh transformation}
\item{xaxis_order}{Default is "genome_position"}
\item{legend.position}{Where to place the legend, default is "bottom"}
\item{annotateregions}{Dataframe with chr start and end positions to annotate, will draw a dashed vertical line at this position}
\item{annotateregions_linetype}{linetype for region annotation, default = 2 (dashed)}
\item{SV}{Default is NULL. If a dataframe with structural variant position is passed it will add rearrangement links between bins.}
\item{SVcol}{Default is TRUE. Colour SVs or not}
\item{svalpha}{the alpha scaling of the SV lines, default = 0.5}
\item{svwidth}{Width of SV width curves, default = 1.0}
\item{adj}{adjustment for gene labels}
\item{genes}{vector of genes to annotate, will add a dashed vertical line and label}
\item{tickwidth}{Spacing of ticks (in Mb) when only 1 chromosome is plotted}
\item{chrstart}{Start of region (in Mb) when plotting a single chromosome}
\item{chrend}{End of region (in Mb) when plotting a single chromosome}
\item{shape}{shape for plotting, default = 16}
\item{positionticks}{set to TRUE to use position ticks rather than chromosome ticks}
\item{ideogram}{plot ideogram at the top, default = TRUE}
}
\value{
ggplot2 plot
}
\description{
Plot a single cell copy number profile
}
\examples{
plotCNprofile(CNbins)
}