之前练习的图在这里,今天接着学习,
4. TiTv,转换颠换的图。
数据:MAF文件就可以。
代码:
```
# TCGA结果,399个样本:
TvTi(maf_file, lab_txtAngle = 90, fileType = "MAF")
# 我的结果:
TvTi(my_maf, fileType = "MAF")
```
结果:
TCGA结果:
my_maf的结果:
5. cnSpec
需要这样的数据:
```
cnSpec(LucCNseg, genome = "hg19")
```
“hg38”, “hg19”, “mm10”, “mm9”, “rn5”.
6. cnView
准备数据:
代码:
```
# Create data
chromosome <- "chr14"
coordinate <- sort(sample(0:106455000, size = 2000, replace = FALSE))
cn <- c(rnorm(300, mean = 3, sd = 0.2), rnorm(700, mean = 2, sd = 0.2), rnorm(1000, mean = 3, sd = 0.2))
data <- as.data.frame(cbind(chromosome, coordinate, cn))
data
# Call cnView with basic input
cnView(data, chr = "chr14", genome = "hg19", ideogram_txtSize = 4)
```
图:
画平均线就需要这样的信息:
```
# create segment data
dataSeg <- data.frame(chromosome = c(14, 14, 14), start = coordinate[c(1, 301, 1001)],
end = coordinate[c(300, 1000, 2000)], segmean = c(3, 2, 3))
dataSeg
cnView(data, z = dataSeg, chr = "chr14", genome = "hg19", ideogram_txtSize = 4)
```
网友评论