包:nucleoSim
作者:Rawane Samb (aut),阿斯特丽德Deschenes (cre, aut],帕斯卡Belleau (aut) Arnaud所有权(aut)
版本:1.14.0
编制日期:2019-10-29
许可证:艺术- 2.0
这个包和底层nucleoSim2.0代码在艺术许可证下发布的。你可以自由使用和重新分配这个软件。
如果你使用这个包发布,我们会问你引用如下:
Samb R, Khadraoui K, Belleau P, et al。(2015)。“用信息化Multinomial-Dirichlet之前与可逆跳转t-mixture估计全基因组分析的核小体的位置。“统计应用遗传学和分子生物学。问题6卷14日,页517 - 532,ISSN(在线)1544 - 6115年,ISSN(打印)2194 - 6302年,2015年12月。doi: 10.1515 / sagmb - 2014 - 0098
弗洛雷斯O等奥罗斯科M (2011)。诊断:非参数核小体定位的方案。“生物信息学,27岁,2149 - 2150页。doi: 10.1093 /生物信息学/ btr345
nucleoSim可以为核小体实验模拟数据集。
的nucleoSim包生成合成与序列覆盖核小体地区地图以及合成与正向和反向读取地图(paired-end读取)模拟下一代测序。此外,合成杂交数据也可以生成“瓷砖数组”。
的nucleoSim包允许用户在序列中引入各种污染物的数据集,如模糊核小体和失踪的核小体,为了更加现实,使常见的“噪声”的影响的评估检测的核小体。
的nucleoSim包很大程度上的启发生成合成地图部分Bioconductor诊断包(弗洛雷斯et奥罗斯科,2011)。
与任何R包,nucleoSim包应该首先加载使用下面的命令:
库(nucleoSim)
包可以生成两种类型的合成数据集:
合成核小体地图:地图完成序列覆盖核小体区域
合成核小体样品:与正向和反向读取地图(paired-end读取)模拟结果使用新一代测序技术在核小体的地图
合成核小体映射的部分基因组由固定数量的核小体。每一个核小体被关联到一个特定数量的序列。参数传递到syntheticNucMapFromDist ()
函数会影响核小体的分布,以及与每一个核小体相关的序列。
从技术上讲,合成核小体地图分为3步:
1。增加定位准确的核小体
合成核小体地图分为固定数量的部分(wp.num
相等长度的)((nuc。len + lin.len)
基地)。核小体定位的中心在一个固定数量的基地从一开始的每个部分(轮(nuc.len / 2)
基地)。序列分配,每一个核小体,使用均匀分布。序列的数量,分配给每一个核小体,可以从1到不同max.cover
。分布(分配
),以及方差(wp.var
)是用于添加一些波动的起始位置序列,这是意味着位置对应于一个区域的起始位置。的一些波动序列的长度也增加了与固定方差正态分布后(len.var
)。平均长度的序列对应的核小体的长度(nuc.len
)。
2。删除一些具备良好的核小体
固定数量的核小体(wp.del
)被删除。每个核小体有一个平等的概率被删除。核小体被认为是所有序列时删除与之关联的消除。
3所示。添加模糊核小体
固定数量的模糊核小体fuz.num
)补充道。模糊核小体的位置选择后一个均匀分布。如定位准确的核小体的序列被分配到每个模糊核小体,使用均匀分布。序列的数量分配可以从1到不同max.cover
。分布(分配
),以及方差(wp.var
)是用于添加一些波动的起始位置序列,这是意味着位置对应于一个区域的起始位置。的一些波动序列的长度也增加了与固定方差正态分布后(len.var
)。平均长度的序列对应的核小体的长度(nuc.len
)。
这是一个例子展示了一种合成可以生成核小体的地图。
wp.num<- 20 ### Number of well-positioned nucleosomes wp.del <- 5 ### Number of well-positioned nucleosomes to delete wp.var <- 30 ### variance associated with the starting ### position of the sequences of the ### well-positioned nucleosomes fuz.num <- 5 ### Number of fuzzy nucleosomes fuz.var <- 50 ### Variance associated with the starting ### positions of the sequences for the ### fuzzy nucleosomes max.cover <- 70 ### Maximum sequences associated with one ### nucleosome (default: 100) nuc.len <- 147 ### Length of the nucleosome (default: 147) len.var <- 12 ### variance associated with the length of ### the sequences (default: 10) lin.len <- 20 ### Length of the DNA linker (default: 20) distr <- "Normal" ### Type of distribution to use rnd.seed <- 210001 ### Set seed when result needs to be reproducible #### Create a synthetic nucleosome map nucleosomeMap <- syntheticNucMapFromDist(wp.num=wp.num, wp.del=wp.del, wp.var=wp.var, fuz.num=fuz.num, fuz.var=fuz.var, max.cover=max.cover, nuc.len=nuc.len, len.var=len.var, lin.len=lin.len, rnd.seed=rnd.seed, distr=distr) #### The start positions of all well-positioned nucleosomes nucleosomeMap$wp.starts ## [1] 1 168 669 836 1170 1337 1504 1671 1838 2005 2339 2673 2840 3007 ## [15] 3174 #### The number of sequences associated with each well-positioned nucleosome nucleosomeMap$wp.nreads ## [1] 69 54 13 66 65 42 60 69 31 65 15 5 23 39 48 #### IRanges object containing all sequences for the well-positioned nucleosomes head(nucleosomeMap$wp.reads, n = 2) ## IRanges object with 2 ranges and 0 metadata columns: ## start end width ## ## [1] 3 144 142 ## [2] -1 154 156 #### The start positions of all fuzzy nucleosomes nucleosomeMap$fuz.starts ## [1] 1049 2168 702 180 1648 #### The number of sequences associated with each fuzzy nucleosome nucleosomeMap$fuz.nreads ## [1] 44 23 67 18 60 #### A IRanges object containing all sequences for the fuzzy nucleosomes head(nucleosomeMap$fuz.reads, n = 2) ## IRanges object with 2 ranges and 0 metadata columns: ## start end width ## ## [1] 1044 1190 147 ## [2] 1054 1198 145 #### A IRanges object containing all sequences for all nucleosomes head(nucleosomeMap$syn.reads, n = 2) ## IRanges object with 2 ranges and 0 metadata columns: ## start end width ## ## [1] 3 144 142 ## [2] -1 154 156
合成核小体图可以很容易地使用可视化图()
函数。在图上,每个核小体位于图使用coordonnates:
(x, y) =(核小体的中心位置,与核小体相关序列的数量)
# # # #创建合成核小体映射图的可视化表示形式(nucleosomeMap xlab =“位置”,ylab =“覆盖”)
的syntheticNucMapFromDist ()
函数包含一个选项(as.ratio
),使杂交数据的仿真”瓷砖数组”。生成的数据计算核小体之间的比例地图和控制使用均匀分布随机序列创建地图。控制图模拟DNA随机分散的样本。
这是一个例子展示了一种合成可以生成核小体的地图。
as.ratio<- TRUE ### Activate the simulation of hybridization data rnd.seed <- 212309 ### Set seed when result needs to be reproducible #### Create a synthetic nucleosome map with hybridization data nucleosomeMapTiling <- syntheticNucMapFromDist(wp.num=10, wp.del=2, wp.var=20, fuz.num=1, fuz.var=32, max.cover=50, nuc.len=145, len.var=3, lin.len=40, rnd.seed=rnd.seed, as.ratio=as.ratio, distr="Uniform") #### Control sequences for hybridization data (only when as.ratio = TRUE) head(nucleosomeMapTiling$ctr.reads, n=4) ## IRanges object with 4 ranges and 0 metadata columns: ## start end width ## ## [1] 273 511 239 ## [2] 361 610 250 ## [3] 1266 1473 208 ## [4] 460 622 163 #### Ratio for hybridization data (only when as.ratio = TRUE) head(nucleosomeMapTiling$syn.ratio, n=4) ## numeric-Rle of length 4 with 2 runs ## Lengths: 3 1 ## Values : NA 0 #### Create visual representation of the synthetic nucleosome map plot(nucleosomeMapTiling)
合成核小体样本与正向和反向读取地图(paired-end读取)模拟使用新一代测序技术获得。使用相同的前3个步骤创建比合成核小体映射。然而,一些新措施存在:
1。增加定位准确的核小体
合成核小体地图分为固定数量的部分(wp.num
相等长度的)((nuc。len + lin.len)
基地)。核小体的中心定位在一个固定数量的基地从一开始的每个部分(轮(nuc.len / 2)
基地)。Paired-end读取分配,每一个核小体,使用均匀分布。paired-end读取的数量,分配给每一个核小体,可以从1到不同max.cover
。分布(分配
),以及方差(wp.var
)是用于添加一些波动的起始位置读取,而作为一个平均位置对应于一个区域的起始位置。一些波动之间的距离开始paired-end读取之后添加一个正态分布的位置与一个固定的方差(len.var
)。开始位置之间的平均距离paired-end读取对应的核小体的长度(nuc.len
)。
2。删除一些具备良好的核小体
固定数量的核小体(wp.del
)被删除。每个核小体有一个平等的概率被删除。核小体被认为是删除当所有paired-end读取与之关联的消除。
3所示。添加模糊核小体
固定数量的模糊核小体fuz.num
)补充道。模糊核小体的位置选择后一个均匀分布。如定位准确的核小体,读取分配,每个模糊核小体,使用均匀分布。paired-end读取指定的数量可以从1到不同max.cover
。分布(分配
),以及方差(wp.var
)是用于添加一些波动的起始位置读取,而作为一个平均位置对应于一个区域的起始位置。一些波动开始paired-end读取的位置之间的距离也与固定方差正态分布(后添加len.var
)。开始位置之间的平均距离paired-end读取对应的核小体的长度(nuc.len
)。所有读取固定长度(read.len
)。
4所示。添加一个偏移量
一个偏移量(抵消
)被添加到所有的核小体和读取位置,以确保所有价值观是积极的(主要是读取相关)。
这个函数需要核小体及其分布信息来生成一个核小体样本。类的输出syntheticNucMap
。
wp.num<- 30 ### Number of well-positioned nucleosomes wp.del <- 10 ### Number of well-positioned nucleosomes ### to delete wp.var <- 30 ### variance associated with the starting ### positions of the sequences for the ### well-positioned nucleosomes fuz.num <- 10 ### Number of fuzzy nucleosomes fuz.var <- 50 ### Variance associated with the starting ### positions of the sequences for the ### fuzzy nucleosomes max.cover <- 90 ### Maximum paired-end reads associated with ### one nucleosome (default: 100) nuc.len <- 147 ### Length of the nucleosome (default: 147) len.var <- 12 ### variance associated with the distance ### between start positions of ### paired-end reads (default: 10) lin.len <- 20 ### Length of the DNA linker (default: 20) read.len <- 45 ### Length of the generated forward and ### reverse reads (default: 40) distr <- "Uniform" ### Type of distribution to use offset <- 10000 ### The number of bases used to offset ### all nucleosomes and reads rnd.seed <- 202 ### Set seed when result needs to be ### reproducible #### Create Uniform sample nucleosomeSample <- syntheticNucReadsFromDist(wp.num=wp.num, wp.del=wp.del, wp.var=wp.var, fuz.num=fuz.num, fuz.var=fuz.var, max.cover=max.cover, nuc.len=nuc.len, len.var=len.var, read.len=read.len, lin.len=lin.len, rnd.seed=rnd.seed, distr=distr, offset=offset) #### The central position of all well-positioned nucleosomes with the #### number of paired-end reads each associated with each one head(nucleosomeSample$wp, n = 2) ## nucleopos nreads ## 1 10242 61 ## 2 10409 30 #### The central position of all fuzzy nucleosomes with the #### number of paired-end reads each associated with each one head(nucleosomeSample$fuz, n = 2) ## nucleopos nreads ## 1 11985 88 ## 2 14098 36 #### A data.frame with the name of the synthetic chromosome, the starting #### position, the ending position and the direction of all forward and #### reverse reads head(nucleosomeSample$dataIP, n = 2) ## chr start end strand ID ## 1 chr_SYNTHETIC 10140 10185 + 11 ## 2 chr_SYNTHETIC 10140 10185 + 15
合成核小体样本可以很容易地使用可视化图()
函数。在图上,每个核小体位于图使用的坐标:
(x, y) =(核小体的中心位置,paired-end读取相关的核小体)
# # # #创建合成核小体的可视化表示样图(nucleosomeSample xlab =“位置”,ylab =“覆盖率(读取)”)
一种合成核小体样品可以使用核小体地图创建。核小体的核小体和读取地图将添加一个偏移量。正向和反向读取也会生成。类的输出syntheticNucMap
。
# # # #核小体地图已经创建的类(nucleosomeMap) # # [1]“syntheticNucMap”# # # #阅读。len < - 45 # # #的长度反向和正向读抵消< - 500 # # #基地用来抵消所有的核小体的数量和读取# # # #创建示例nucleosomeSampleFromMap < - syntheticNucReadsFromMap核小体(nucleosomeMap read.len =阅读。len抵消=抵消)# # # # data.frame合成染色体的名称,# # # #位置,开始结束位置和所有的方向前进,# # # #反向读头(nucleosomeSampleFromMap dataIP美元,n = 2) # # 1 # #杆开始结束链ID chr_SYNTHETIC 490 535 + 10 # # 2 chr_SYNTHETIC 490 535 + 23
这里的输出sessionInfo ()
本文档对系统的编译:
# # R版本3.6.1(2019-07-05)# #平台:x86_64-pc-linux-gnu(64位)# #下运行:Ubuntu 18.04.3 LTS # # # #矩阵产品:默认# #布拉斯特区:/home/biocbuild/bbs - 3.10 - bioc / R / lib / libRblas。所以# # LAPACK: /home/biocbuild/bbs - 3.10 - bioc / R / lib / libRlapack。# # # #语言环境:# # [1]LC_CTYPE = en_US。utf - 8 LC_NUMERIC = C # #[3]而= en_US。utf - 8 LC_COLLATE = C # # [5] LC_MONETARY = en_US。utf - 8 LC_MESSAGES = en_US。utf - 8 # # [7] LC_PAPER = en_US。utf - 8 LC_NAME = C # # [9] LC_ADDRESS C = C LC_TELEPHONE = # # [11] LC_MEASUREMENT = en_US。utf - 8 LC_IDENTIFICATION = C附加基本包:# # # # # #[1]统计图形grDevices跑龙套数据集方法基础# # # #其他附加包:# # [1]nucleoSim_1.14.0 knitr_1.25 BiocStyle_2.14.0 # # # #通过加载一个名称空间(而不是附加):# # [1]Rcpp_1.0.2 bookdown_0.14 IRanges_2.20.0 # # [4] digest_0.6.22 stats4_3.6.1 magrittr_1.5 # # [7] evaluate_0.14 rlang_0.4.1 stringi_1.4.3 # # [10] S4Vectors_0.24.0 rmarkdown_1.16 tools_3.6.1 # # [13] stringr_1.4.0 parallel_3.6.1 xfun_0.10 # # [16] yaml_2.2.0 compiler_3.6.1 BiocGenerics_0.32.0 # # [19] BiocManager_1.30.9 htmltools_0.4.0