找回密码
 注册
查看: 1457|回复: 0

R语言 ADaCGH2包 pSegment()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 11:03:48 | 显示全部楼层 |阅读模式
pSegment(ADaCGH2)
pSegment()所属R语言包:ADaCGH2

                                         Parallelized/"unified" versions of several aCGH segementation algorithms/methods
                                         并行/“统一”版本数的aCGH Lucene的算法/方法

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

These functions parallelize several segmentation algorithms or (for HaarSeg) make their calling use the same conventions as for other methods.
这些功能并行几个分割算法或(HaarSeg),使他们的呼叫其他方法使用相同的约定。


用法----------Usage----------



pSegmentDNAcopy(cghRDataName, chromRDataName, merging = "mergeLevels",
                mad.threshold = 3, smooth = TRUE,
                alpha=0.01, nperm=10000,
                p.method = "hybrid",
                min.width = 2,
                kmax=25, nmin=200,
                eta = 0.05,trim = 0.025,
                undo.splits = "none",
                undo.prune=0.05, undo.SD=3,
                ...)

pSegmentHaarSeg(cghRDataName, chromRDataName,
                merging = "MAD", mad.threshold = 3,
                W = vector(),
                rawI = vector(),
                breaksFdrQ = 0.001,                          
                haarStartLevel = 1,
                haarEndLevel = 5, ...)

pSegmentHMM(cghRDataName, chromRDataName,
            merging = "mergeLevels", mad.threshold = 3,
            aic.or.bic = "AIC", ...)



pSegmentBioHMM(cghRDataName, chromRDataName, posRDataName,
               merging = "mergeLevels", mad.threshold = 3,
               aic.or.bic = "AIC",
               ...)

pSegmentCGHseg(cghRDataName, chromRDataName, CGHseg.thres = -0.05,
               merging = "MAD", mad.threshold = 3, ...)


pSegmentGLAD(cghRDataName, chromRDataName,
             deltaN = 0.10,
             forceGL = c(-0.15, 0.15),
             deletion = -5,
             amplicon = 1,
             ...)


pSegmentWavelets(cghRDataName, chromRDataName, merging = "MAD",
                 mad.threshold = 3,
                 minDiff = 0.25,
                 minMergeDiff = 0.05,
                 thrLvl = 3, initClusterLevels = 10, ...)







参数----------Arguments----------

参数:cghRDataName
The Rdata file name that contains the ffdf with the aCGH data. This file can be created using as.ffdf with a data frame with genes (probes) in rows and subjects or arrays in columns. Function inputDataToADaCGHData produces these type of files.
RDATA文件名中包含的aCGH数据的ffdf。这个文件可以使用as.ffdf科目或行和列的阵列(探针)与基因数据框。功能inputDataToADaCGHData产生这些类型的文件。


参数:chromRDataName
The RData file name with the ff (short integer) vector with the chromosome indicator. Function inputDataToADaCGHData produces these type of files.  
与FF(短整数)与染色体指标向量的RDATA文件名称。功能inputDataToADaCGHData产生这些类型的文件。


参数:posRDataName
The RData file name with the ff double vector with the location (e.g., position in kbases) of each probe in the chromosome. Function inputDataToADaCGHData produces these type of files.
与FF每个探针的位置,在染色体上(例如,位置在kbases)双向量的的RDATA文件名称。功能inputDataToADaCGHData产生这些类型的文件。


参数:merging
Merging method; for most methods one of "MAD" or "mergeLevels". For CBS (pSegmentDNAcopy),  GGHseg (pSegmentCGHseg), and Wavelets (as in Hsu et al. —pSegmentWavelets)  also "none". This option does not apply to GLAD (which has its own merging-like approach). See details.
合并的方法,大多数方法“疯”或“mergeLevels”之一。对于,GGHseg CBS(pSegmentDNAcopy)(pSegmentCGHseg),小波(许等。pSegmentWavelets)也“没有”。此选项不适用于(GLAD有其自己的合并类似的方法)。查看详情。


参数:mad.threshold
If using merging = "MAD" the value such that all segments where abs(smoothed value) > m*MAD will be declared aberrant —see p. i141 of Ben-Yaacov and Eldar. No effect if merging = "mergeLevels" (or "none").
如果使用merging = "MAD"的值,如ABS(平滑值)> M *疯狂将被宣布,所有段异常见第。 i141的本雅各和埃尔达尔。合并=的“mergeLevels”(或“无”),如果没有效果。


参数:smooth
For DNAcopy only. If TRUE (default) carry out smoothing as explained in smooth.CNA.
仅对于DNAcopy。如果为TRUE(默认)进行平滑,在smooth.CNA解释。


参数:alpha
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:nperm
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:p.method
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:min.width
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:kmax
For DNAcopy only. See segment.
仅对于DNAcopy。看到segment。


参数:nmin
For DNAcopy only. See segment.
仅对于DNAcopy。看到segment。


参数:eta
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:trim
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:undo.splits
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:undo.prune
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:undo.SD
For DNAcopy only. See segment.  
仅对于DNAcopy。看到segment。


参数:W
For HaarSeg:  Weight matrix, corresponding to quality of measurment.  Insert 1/(sigma**2) as weights if your platform output sigma as the quality of measurment. W must have the same size as I.
HaarSeg:重量矩阵,相应的测算质量。作为权数,插入1 /(Σ** 2)如果您的平台输出西格玛质量的测算。 W必须有一相同的大小


参数:rawI
For HaarSeg. Mininum of the raw red and raw green measurment, before the log. rawI is used for the non-stationary variance compensation.  rawI must have the same size as I.  
对于HaarSeg。最低限度的原料红色和绿色原料的测算,之前的log。拉维用于非平稳方差补偿。拉维必须有一相同的大小


参数:breaksFdrQ
For HaarSeg.  The FDR q parameter. Common used values are 0.05, 0.01, 0.001. Default value is 0.001.
对于HaarSeg。FDRq参数。常用的值是0.05,0.01,0.001。默认值是0.001。


参数:haarStartLevel
For HaarSeg.  The detail subband from which we start to detect peaks. The higher  this value is, the less sensitive we are to short segments. The default is value is 1, corresponding to segments of 2 probes.
对于HaarSeg。从我们开始检测峰的细节子带。这个值越高,较不敏感,我们要短段。默认值是1,对应的2个探针段。


参数:haarEndLevel
For HaarSeg. The detail subband until which we use to detect peaks. The higher  this value is, the more sensitive we re to large trends in the data. This value DOES NOT indicate the largest possible segment that can be detected. The default is value is 5, corresponding to step of 32 probes in each direction.
对于HaarSeg。细节子带,直到我们用它来检测峰。这个值越高,我们重新在数据的大趋势更加敏感。此值不显示,可以检测到的最大可能的部分。默认值是5,相应加强在各个方向的32探针。


参数:aic.or.bic
For HMM and BioHMM. One of "AIC" or "BIC". See criteria in runBioHMM.  
HMM和BioHMM。 “工商局”或“的BIC”之一。看到criteriarunBioHMM。


参数:CGHseg.thres
The threshold for the adaptive penalization in Picard et al.'s CGHseg. See p. 13 of the original paper. Must be a negative number. The default value used in the original reference is -0.5. However, our experience with the simulated data in Willenbrock and Fridlyand (2005) indicates that for those data values around -0.005 are more appropriate. We use here -0.05 as default.
Picard等。的CGHseg自适应惩罚的阈值。见p。 13的原始文件。必须是负数。在原始参考使用默认值是-0.5。然而,我们的经验表明,在Willenbrock和Fridlyand(2005)的模拟数据为-0.005左右的数据值是比较合适的。我们在这里使用默认-0.05。


参数:deltaN
Only for GLAD. See deltaN in daglad.
只为高兴。看到deltaNdaglad。


参数:forceGL
Only for GLAD. See forceGL in daglad.
只为高兴。看到forceGLdaglad。


参数:deletion
Only for GLAD. See deletion in daglad.
只为高兴。看到deletiondaglad。


参数:amplicon
Only for GLAD. See amplicon in daglad.
只为高兴。看到amplicondaglad。


参数:minMergeDiff
Used only when doing merging in the wavelet method of Hsu et al..  The finall call as to which segments go together is done by a mergeLevels approach, but an initial collapsing of very close values is performed (otherwise, we could end up passing to mergeLevels as many initial levels as there are points).  
只有在小波许等方法合并使用......哪段一起去finall呼叫是通过mergeLevels方法,但一个非常接近值的初始崩溃(否则,我们可能最终会传递到mergeLevels许多初始水平还有点)进行。


参数:minDiff
For Wavelets (Hsu et al.). Minimum (absolute) difference between the medians of two adjacent clusters for them to be considered truly different.  Clusters "closer" together than this are collapsed together to form a single cluster.  
为小波(Hsu等)。最小(绝对值),他们被认为是真正不同的两个相邻簇中位数之间的差异。聚类“接近”比这一起被倍数起来,形成一个单一的聚类。


参数:thrLvl
The level used for the wavelet thresholding in Hsu et al.
Hsu等人的小波阈值水平。


参数:initClusterLevels
For Wavelets (Hsu et al.). The initial number of clusters to form.  
为小波(Hsu等)。聚类的初始形式。


参数:...
Additional arguments; not used.
额外的参数,不使用。


Details

详情----------Details----------

In most cases, these are wrappers to the original code, with modifications for parallelization and for using ff objects. The functions will not work if you try to use them with the regular R data frames, matrices, and vectors.
在大多数情况下,这些都是包装的原代码,修改为并行和使用ff对象。如果您尝试使用常规的R数据框,矩阵和向量的功能将无法正常工作。

We have parallelized all computations by array (in contrast to former versions of ADaCGH, where some computations, depending on number of samples, could be parallelized over array*chromosome).
我们所有的计算并行阵列(对比前ADaCGH,一些计算,取决于样本数量,可以通过阵列*染色体并行版本)。

CGHseg has been implemented here following the original authors description. Note that several publications incorrectly claim that they use the CGHseg approach when, actually, they are only using the "segment" function in the "tilingArray" package, but they are missing the key step of choosing the optimal number of segments (see p. 13 in Picard et al, 2005). We implement the author's method in our (internal, so use "ADaCGH2:::piccardsKO") function "piccardsKO".
CGHseg这里已经实施后,原作者的描述。请注意,一些出版物错误地声称,他们使用的CGHseg的方法时,实际上,他们只用在“tilingArray”包“段”功能,但他们缺少的段选择最佳数量的关键一步(见页13 Picard等人,2005年)。我们实施的方法,在我们的(内部的,所以使用“ADaCGH2 ::: piccardsKO”)功能“piccardsKO”。

For DNAcopy, BioHMM and HMM the smoothed results are merged, by default by the mergeLevels algorithm, as recommended in <CITE>Willenbrock and Fridlyand, 2005</CITE>. Merging is also done in GLAD (with GLAD's own merging algorithm). For HaarSeg, calling/merging is carried out using MAD, following page i141 of Ben-Yaacov and Eldar, section 2.3, "Determining aberrant intervals": a MAD (per their definition) is computed and any segment with absolute value larger than mad.threshold * MAD is considered aberrant.  Merging is also performed for CGHseg (the default, however, is MAD, not mergeLevels).  Merging (using either of "mergeLevels" or "MAD") can also be used with the wavelet-based method of Hsu et al.; please note that the later is an experimental feature implemented by us, and there is no study of its performance.
平滑结果,为DNAcopy,BioHMM和HMM合并,默认情况下,算法的mergeLevels建议,在2005年<CITE> Willenbrock和Fridlyand </引用>。也做了合并(GLAD GLAD的自己的算法)。 ,调用/合并为HaarSeg进行使用(MAD),下页奔雅各和2.3节,埃尔达尔i141“,确定异常的时间间隔”:一个疯狂(每其定义)计算,比疯了较大绝对值的任何部分阈值*疯狂被视为异常。合并也进行CGHseg(默认情况下,然而,是疯了,不mergeLevels)。 Hsu等基于小波变换的方法也可以用来合并(使用的“mergeLevels”或“疯狂”之一);请注意,后来是我们实施的一个实验性的功能,并没有研究它的性能。

In summary, for all segmentation methods (except GLAD) merging is available as either "mergeLevels" or "MAD". For DNAcopy, CGHseg, and wavelets as in Hsu et al., you can also choose no merging, though this will rarely be what you want (we offer this option to allow using the original authors' choices in their first descriptions of methods).
总之,所有分割方法(GLAD)合并,要么“mergeLevels”或“疯狂”。 Hsu等的DNAcopy,CGHseg,小波,你也可以选择不合并,虽然这很少会是你想要什么(我们提供此选项允许使用在他们的第一次描述的方法对原作者的选择)。

When using mergeLevels, we map the results to states of "Alteration", so that we categorize each probe as taking one, and only one, of three possible values, -1 (loss of genomic DNA), 0 (no change in DNA content), +1 (gain of genomic DNA). We have made the assumption, in this mapping, that the "no change" class is the one that has the absolute value closest to zero, and any other classes are either gains or losses. When the data are normalized, the "no change" class should be the most common one. When using MAD this step is implicit in the procedure ( any segment with absolute value larger than mad.threshold * MAD is considered aberrant).
我们当使用mergeLevels,映射的结果,“改造”的状态,所以我们每个探针归类为接受一个,只有一个,三个可能的值,-1(基因组DNA的损失),0(DNA中没有变化内容),+1(基因组DNA的增益)。我们所作的假设,在此映射,认为“没有变化”类是一个具有接近零的绝对值,和任何其他类要么是收益或亏损。当数据标准化,“没有改变”类应该是最常见的一种。疯狂这一步是当使用过程中的隐式(任何具有绝对值比mad.threshold大段* MAD的异常)。

Note that "mergeLevels", in addition to being used for calling gains and losses, results in a decrease in the number of distinct smoothed values, since it can merge two or more adjacent smoothed levels. "MAD", in contrast, performs no merging as such, but only calling.
请注意,“mergeLevels”,除了被调用的得失,结果在一个独特的平滑值的数量减少,因为它可以合并两个或多个相邻的平滑水平。 “疯狂”,相反,不进行合并等,但只调用。


值----------Value----------

A list of two components:
两部分组成名单:


参数:outSmoothed
An ffdf object with smoothed values. Each column is an array or sample, and each row a probe.
ffdf平滑值的对象。每一列是一个数组或样品,每行一个探针。


参数:outState
An ffdf object with calls for probes. Each column is an array or sample, and each row a probe. For methods that accept "none" as an argument to merging, the states cannot be interpreted directly as gain or loss; they are simply discrete codes for distinct segments.
ffdf对象为探针的呼声。每一列是一个数组或样品,每行一个探针。 merging接受的参数“无”的方法,美国不能被解释为收益或亏损直接,他们只是离散的代码是针对不同的细分。

Rows and columns of each element can be accessed in the usual way for ffdf objects, but accept also most of the usual R operations for data frames.
每个元素的行和列可以进行访问在ffdf对象通常的方式,但也接受数据框最常用的R类作业。


作者(S)----------Author(s)----------



The code for DNAcopy, HMM, BioHMM, and GLAD are basically wrappers
around the original functions by their corresponding authors, with some
modiffications for parallelization and usage of ff objects. The original
packages are: <code>DNAcopy</code>, <code>aCGH</code>, <code>snapCGH</code>, <code>cgh</code>,
<code>GLAD</code>, respectively. The CGHseg method uses package
<code>tilingArray</code>.

HaarSeg has been turned into an R package, available from
<a href="https://r-forge.r-project.org/projects/haarseg/">https://r-forge.r-project.org/projects/haarseg/</a>. That package
uses, at its core, the same R and C code as we do, from Ben-Yaacov and
Eldar. We have not used the available R package for historical reasons
(we used Eldar and Ben-Yaacov's C and R code in the former ADaCGH
package, before a proper R package was available).

For the wavelet-based method we have only wrapped the code that was
kindly provided by L. Hsu and D. Grove, and parallelized a few
calls. Their original code is included in the sources of the package.

Parallelization and modifications for using ff and additions are by
Ramon Diaz-Uriarte         
<a href="mailto:rdiaz02@gmail.com">rdiaz02@gmail.com</a>




参考文献----------References----------

(2010). waviCGH: a web application for the analysis and visualization of genomic copy number alterations. Nucleic Acids Research, 38 Suppl:W182&ndash;187.
Albertson, Donna  G. (2004). Hidden Markov models approach to the analysis of array CGH data. Journal of Multivariate Analysis, 90: 132&ndash;153.
P. (2005) Denoising array-based comparative genomic hybridization data using wavelets. Biostatistics, 6:211-26.
Barillot, E. (2004). Analysis of array CGH data: from signal ratio to gain and loss of DNA regions. Bioinformatics, 20: 3413&ndash;3422.
Borresen-Dale AL. (2005). CGH-Explorer: a program for analysis of CGH-data. Bioinformatics, 21: 821&ndash;822.
heterogeneous hidden Markov model for segmenting array CGH data. Bioinformatics, 22: 1144&ndash;1146.
M. (2004) Circular binary segmentation for the analysis of array-based DNA copy number data. Biostatistics, 4, 557&ndash;572. http://www.mskcc.org/biostat/~olshena/research.
Daudin, J. J. (2005). A statistical approach for array CGH data analysis. BMC Bioinformatics, 6, 27. http://dx.doi.org/10.1186/1471-2105-6-27.
Smith L, Greenfield A, Tiganescu A, Buckle V, Ventress N, Ayyub H, Salhan A, Pedraza-Diaz S, Broxholme J, Ragoussis J, Higgs DR, Flint J, Knight SJ. (2005) SW-ARRAY: a dynamic programming solution for the identification of copy-number changes in genomic DNA using array comparative genome hybridization data. Nucleic Acids Res., 33:3455-64.
segmentation to array CGH data for downstream analyses. Bioinformatics, 21, 4084&ndash;4091.
web-based application and R package for the analysis of aCGH data, PLoS ONE, 2: e737.
the Segmentation of aCGH Data, Bioinformatics, 24: i139-i145.

参见----------See Also----------

pChromPlot, inputDataToADaCGHData
pChromPlot,inputDataToADaCGHData


举例----------Examples----------



## Create a temp dir for storing output.[#创建一个临时目录,用于存储输出。]
## (Not needed, but cleaner).[#(不是必需的,但清洁剂)。]

dir.create("ADaCGH2_example_tmp_dir")
originalDir <- getwd()
setwd("ADaCGH2_example_tmp_dir")



## Start a socket cluster. Change the appropriate number of CPUs[#启动一个插座聚类。改变适当数量的CPU]
## for your hardware[#为您的硬件]

snowfallInit(universeSize = 2, typecluster = "SOCK")

## Get input data in ff format[#获取在FF格式输入数据。]

## To speed up R CMD check, we do not use inputEx1, but a much smaller[#为了加快R CMD检查,我们不使用inputEx1,但要小得多]
## data set. When you try the examples, you might one to use[#设置数据。当您尝试的例子,你可能要使用的]
## inputEx1 instead.[#inputEx1代替。]

## Not run: [#无法运行:]

fname <- list.files(path = system.file("data", package = "ADaCGH2"),
                     full.names = TRUE, pattern = "inputEx1")

## End(Not run)[#结束(不运行)]

fname <- list.files(path = system.file("data", package = "ADaCGH2"),
                     full.names = TRUE, pattern = "inputEx2")

tableChromArray <- inputDataToADaCGHData(filename = fname)



### Run all segmentation methods[#运行所有的分割方法]

cbs.out <- pSegmentDNAcopy("cghData.RData",
                           "chromData.RData")
cbs_mad.out <- pSegmentDNAcopy("cghData.RData",
                           "chromData.RData", merging = "MAD")
cbs_none.out <- pSegmentDNAcopy("cghData.RData",
                           "chromData.RData", merging = "none")

names(cbs.out)
cbs.out$outState ## not the best way[#不是最好的办法]
open(cbs.out$outSmoothed) ## better[#更好]
cbs.out$outSmoothed
rle(cbs.out$outSmoothed[, 1])

open(cbs_mad.out$outSmoothed)
rle(cbs_mad.out$outSmoothed[, 1])



hs_ml.out <- pSegmentHaarSeg("cghData.RData",
                           "chromData.RData", merging = "mergeLevels")
hs_mad.out <- pSegmentHaarSeg("cghData.RData",
                           "chromData.RData", merging = "MAD")

open(hs_ml.out[[2]])
open(hs_mad.out[[2]])
summary(hs_ml.out[[2]][,])
summary(hs_mad.out[[2]][,])


hmm_ml.out <- pSegmentHMM("cghData.RData",
                           "chromData.RData", merging = "mergeLevels")
hmm_mad.out <- pSegmentHMM("cghData.RData",
                           "chromData.RData", merging = "MAD")
hmm_mad_bic.out <- pSegmentHMM("cghData.RData",
                           "chromData.RData", merging = "MAD",
                            aic.or.bic = "BIC")

## we can open the two ffdfs in the list with lapply[#我们可以在与lapply列表打开两个ffdfs]
lapply(hmm_ml.out, open)
lapply(hmm_mad.out, open)
lapply(hmm_mad_bic.out, open)


rle(hmm_ml.out[[2]][, 3])$lengths
rle(hmm_mad.out[[2]][, 3])$lengths

## MAD and mergeLevels seem to make similar calls in second array[#疯狂和mergeLevels的似乎在第二个数组类似的检测]
rle(hmm_ml.out[[2]][, 2])$lengths
rle(hmm_mad.out[[2]][, 2])$lengths

## but smoothed values are grouped differently[但平滑值是不同的分组]
rle(hmm_ml.out[[1]][, 2])$lengths
rle(hmm_mad.out[[1]][, 2])$lengths

## And BIC leads to differences compared to AIC[#导线相比,AIC的差异和BIC]
open(hmm_mad_bic.out[[2]])
rle(hmm_mad_bic.out[[1]][, 2])$lengths
rle(hmm_mad_bic.out[[2]][, 2])$lengths

### BioHMM is very slow and can crash[#BioHMM是非常缓慢的,并可以崩溃]
## Not run: [#无法运行:]
biohmm_ml.out <- pSegmentBioHMM("cghData.RData",
                           "chromData.RData",
                           "posData.RData",
                            merging = "mergeLevels")
biohmm_mad.out <- pSegmentBioHMM("cghData.RData",
                           "chromData.RData",
                           "posData.RData",
                            merging = "MAD")
biohmm_mad_bic.out <- pSegmentBioHMM("cghData.RData",
                           "chromData.RData",
                           "posData.RData",
                            merging = "MAD",
                            aic.or.bic = "BIC")

lapply(biohmm_ml.out, open)
lapply(biohmm_mad.out, open)
lapply(biohmm_mad_bic.out, open)

summary(biohmm_ml.out[[2]][,])
summary(biohmm_mad.out[[2]][,])
summary(biohmm_mad_bic.out[[2]][,])

summary(biohmm_ml.out[[1]][,])
summary(biohmm_mad.out[[1]][,])
summary(biohmm_mad_bic.out[[1]][,])

## End(Not run)[#结束(不运行)]


cghseg_ml.out <- pSegmentCGHseg("cghData.RData",
                           "chromData.RData", merging = "mergeLevels")
cghseg_mad.out <- pSegmentCGHseg("cghData.RData",
                           "chromData.RData", merging = "MAD")
cghseg_none.out <- pSegmentCGHseg("cghData.RData",
                           "chromData.RData", merging = "none")

lapply(cghseg_ml.out, open)
lapply(cghseg_mad.out, open)
lapply(cghseg_none.out, open)

summary(cghseg_ml.out[[1]][,])
summary(cghseg_mad.out[[1]][,])
summary(cghseg_none.out[[1]][,])

summary(cghseg_ml.out[[2]][,])
summary(cghseg_mad.out[[2]][,])
summary(cghseg_none.out[[2]][,])


glad.out <- pSegmentGLAD("cghData.RData",
                          "chromData.RData")


waves_ml.out <- pSegmentWavelets("cghData.RData",
                           "chromData.RData", merging = "mergeLevels")
waves_mad.out <- pSegmentWavelets("cghData.RData",
                           "chromData.RData", merging = "MAD")
waves_none.out <- pSegmentWavelets("cghData.RData",
                           "chromData.RData", merging = "none")
lapply(waves_ml.out, open)
lapply(waves_mad.out, open)
lapply(waves_none.out, open)


summary(waves_ml.out[[1]][,])
summary(waves_mad.out[[1]][,])
summary(waves_none.out[[1]][,])

summary(waves_ml.out[[2]][,])
summary(waves_mad.out[[2]][,])
summary(waves_none.out[[2]][,])


############## Clean up actions[#############清理行动]
####  (These are not needed. They are convenient here, to prevent[###(这些都是不需要的,他们在这里很方便,以防止]
####   leaving garbage in your hard drive. In "real life" you will[###离开你的硬盘中的垃圾。在“现实生活”,你会]
####   have to decide what to delete and what to store).[##决定删除和存储什么)。]



### Explicitly stop cluster[#明确停止聚类]
sfStop()


### All objects (RData and ff) are left in this directory[##所有的对象(RDATA和FF)都留在这个目录]
getwd()

### We will clean it up, and do it step-by-step[##我们将清理,并做一步一步由]
### BEWARE: DO NOT do this with objects you want to keep!!![#注意:不跟你想保留的对象!!]

## Remove ff and RData for the data[#FF和RDATA数据删除]

load("chromData.RData")
load("posData.RData")
load("cghData.RData")

delete(cghData); rm(cghData)
delete(posData); rm(posData)
delete(chromData); rm(chromData)
unlink("chromData.RData")
unlink("posData.RData")
unlink("cghData.RData")
unlink("probeNames.RData")


## Remove ff and R objects with segmentation results[#FF和R对象分割结果中删除]

lapply(cbs.out, delete)
rm(cbs.out)

lapply(cbs_mad.out, delete)
rm(cbs_mad.out)

lapply(cbs_none.out, delete)
rm(cbs_none.out)

lapply(hs_ml.out, delete)
rm(hs_ml.out)

lapply(hs_mad.out, delete)
rm(hs_mad.out)

lapply(hmm_ml.out, delete)
rm(hmm_ml.out)

lapply(hmm_mad.out, delete)
rm(hmm_mad.out)

lapply(hmm_mad_bic.out, delete)
rm(hmm_mad_bic.out)

lapply(cghseg_ml.out, delete)
rm(cghseg_ml.out)

lapply(cghseg_mad.out, delete)
rm(cghseg_mad.out)

lapply(cghseg_none.out, delete)
rm(cghseg_none.out)

lapply(glad.out, delete)
rm(glad.out)

lapply(waves_mad.out, delete)
rm(waves_mad.out)

lapply(waves_ml.out, delete)
rm(waves_ml.out)

lapply(waves_none.out, delete)
rm(waves_none.out)


## Not run: [#无法运行:]
## Execute only if you run the BioHMM examples[#执行如果你运行的BioHMM的例子]
lapply(biohmm_ml.out, delete)
rm(biohmm_ml.out)
lapply(biohmm_mad.out, delete)
rm(biohmm_mad.out)
lapply(biohmm_mad_bic.out, delete)
rm(biohmm_mad_bic.out)

## End(Not run)[#结束(不运行)]

### Try to prevent problems in R CMD check[#尽量避免问题在R加利福尼亚检查]
Sys.sleep(2)
### To prevent CMD check from crashing after cleanEx[#为了防止从加利福尼亚检查碰撞后cleanEx]
detach("package:rlecuyer", unload = TRUE)


### Delete temp dir[#删除临时目录]
setwd(originalDir)
Sys.sleep(2)
unlink("ADaCGH2_example_tmp_dir", recursive = TRUE)
Sys.sleep(2)


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-22 21:07 , Processed in 0.021088 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表