Description Usage Arguments Value Author(s) Examples
Plot segmentation.
1 |
segment |
A GRanges object, segmentation result. |
input |
A GRanges object, input for SomatiCA. |
k |
When there are multiple chromosomes, only kth will be plot each time. |
col1 |
Color for data points. |
col2 |
Color for segments. |
smooth |
Whether smoothed data is plotted. Default is T. |
dev.new |
Whether a new device will be opened. |
cex.point |
Size of data points. |
... |
Parameters in plot(). |
A plot.
Mengjie Chen
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 | #data#
rawLAF <- c(rnorm(300, 0.2, 0.05), rnorm(300, 0.4, 0.05), rnorm(200, 0.3, 0.05), rnorm(200, 0.2, 0.05), rnorm(200, 0.3, 0.05), rnorm(250, 0.4, 0.05))
reads <- rep(50, 800+650)
chr <- c(rep("chr1", 800), rep("chr2", 650))
position <- c(c(1:800), c(1:650))
zygo <- rep("het", 800+650)
input <- GRanges(seqnames=chr,
ranges=IRanges(start=position, width=1),
zygosity=zygo,
tCount=reads,
LAF=rawLAF,
tCountN=reads,
gLAF=rawLAF)
#segment#
chr <- c("chr1", "chr1", "chr1", "chr2", "chr2", "chr2")
start <- c(1, 300, 600, 1, 200, 400)
end <- c(300, 600, 800, 200, 400, 650)
medLAF <- c(0.2, 0.4, 0.3, 0.2, 0.3, 0.4)
medgermlineLAF <- rep(0.4, 6)
segment <- GRanges(seqnames=chr,
ranges=IRanges(start=start, end=end),
medLAF=medLAF,
medgLAF=medgermlineLAF)
## First chromosome
plotSegment(segment, input, k=1)
## Second chromosome
plotSegment(segment, input, k=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.