inputDataToADaCGHData(ADaCGH2)
inputDataToADaCGHData()所属R语言包:ADaCGH2
Convert CGH data to ff data frames
全息数据转换到FF的数据框
译者:生物统计家园网 机器人LoveR
描述----------Description----------
An input data frame with CGH data is converted to several ff files and data checked for potential errors and location duplications.
与全息数据的输入数据框转换为FF几个文件和潜在的错误和位置重复检查的数据。
用法----------Usage----------
inputDataToADaCGHData(ffpattern = paste(getwd(), "/", sep = ""),
MAList = NULL,
cloneinfo = NULL,
filename = NULL,
sep = "\t",
quote = "\"",
na.omit = FALSE,
minNumPerChrom = 10)
参数----------Arguments----------
参数:ffpattern
See argument pattern in ff. The default is to create the "ff" files in the current working directory.
看到参数patternff。默认创建的“FF”在当前工作目录的文件。
参数:MAList
The name of an object of class MAList (as.MAList) or SegList (e.g., dim.SegList). See vignnettes for these packages for details about these objects.
一个类的对象的名称MAList(as.MAList)SegList(例如,dim.SegList)。看到有关这些对象的详细信息,这些包vignnettes。
参数:cloneinfo
A character vector with the full path to a file that conforms to the characteristis of file in function read.clonesinfo (see details in the vignette) or the name of a data frame with at least a column named "Chr" (with chromosomal informtaion) and "Position".
与特征向量的固有特性,符合文件的完整路径file功能read.clonesinfo(见详情)在暗角或至少有一列数据框的名字命名的“ CHR“(与染色体informtaion)和”位置“。
参数:filename
Name of data RData file that contains the data frame with original, non-ff, data. Note: this is the name of the RData file (possibly including path), NOT the name of the data frame. The first three columns of the data frame are the IDs of the probes, the chromosome number, and the position, and all remaining columns contain the data for the arrays, one column per array. The names of the first three column do not matter, but the order does. Names of the remaining columns will be used if existing; otherwise, fake array names will be created.
名称的数据的RDATA文件包含原始的,非FF,数据的数据框。注:这是的RDATA文件(可能包括路径),而不是数据框的名称的名称。前三列的数据框的探针,染色体数目和位置的ID,和所有其余的列包含的阵列,每个阵列的一列数据。前三列的名字并不重要,但为了做。其余列的名称将用于如果存在,否则,将创建假数组名。
参数:sep
Argument to read.table if reading a cloneinfo file.
参数read.table如果读cloneinfo文件。
参数:quote
Argument to read.table if reading a cloneinfo file.
参数read.table如果读cloneinfo文件。
参数:na.omit
Omit NAs? If there are NAs and na.omit is set to FALSE, the function will stop with an error.
省略定居吗?如果有NAS和na.omit的设置为FALSE,函数将停止错误。
参数:minNumPerChrom
If any chromosome has fewer observations than minNumPerChrom the function will fail. This can help detect upstream pre-processing errors.
如果有任何染色体较少的观测,比minNumPerChrom功能将失败。这可以帮助检测上游预先处理错误。
Details
详情----------Details----------
If there are identical positions (in the same chromosome) a small random uniform variate is added to get unique locations.
如果有相同的位置(在同一条染色体)添加到一个小的随机均匀变量获得独特的位置。
Commented examples of reading objects from limma and snapCGH are provided in the vignnette.
limma和snapCGH在vignnette中提供的评论阅读对象的例子。
值----------Value----------
This function is used mainly for its side effects: writing several ff files to the current working directory (the actual names are printed out).
此功能主要用于其副作用:FF几个文件,以书面的当前工作目录(打印出的实际名称)。
In addition, and since we need to manipulate the complete set of original data, the return value is a data frame that is could be used later to speed up certain calculations. Right now, however, this is not used for anything, except for information purposes. This table is similar to a dictionary or hash table. This data frame has (number of arrays * number of chromosomes) rows. The columns are
此外,因为我们需要处理的一套完整的原始数据,返回值是一个数据框,可用于购买加快某些计算。然而,眼下,这是不为别的,只作参考用途,使用。此表是一本字典或哈希表类似。这个数据框(阵列*号染色体的数目)行。列
参数:Index
The integer index of the entry, 1:number of arrays * number of chromosomes
整数索引项,1:阵列数量的染色体数目
参数:ArrayNum
The array number
数组号
参数:Arrayname
The name of the array
数组名
参数:ChromNum
The chrosome number
chrosome数量
参数:ChromName
The chromosome name. Yes, chromosome must be numeric, but the values of ChromNum form a set of integers starting at one and going up to the total number of different chromosomes. E.g., if you only have two chromosomes, say 3 and 22, ChromNum contains values 1 and 2, whereas ChromName contains values 3 and 22.
染色体的名称。是的,染色体必须是数字,但的ChromNum的价值观形成了一套在一开始并持续到不同的染色体总数的整数。例如,如果你只有两条染色体,说3和22,ChromNum包含值1和2,,而ChromName包含值3和22。
参数:posInit
The first position (in a vector ordered from 1 to total number of probes, with probes ordered by chromosome and position within chromosome) of a probe of this chromosome.
这种染色体探针第一的位置(在一个向量下令从1到染色体和染色体内的位置排列的探针,探针总数)。
参数:posEnd
The last position of a probe of this chromosome.
这种染色体探针的最后一个位置。
注意----------Note----------
Converting a very large data set into a set of ff files can be memory consuming. Since this function is mainly used for its side effects (leaving the ff files in the disk), it can be run in a separate process that will then be killed. See an example below using multicore. (For the example you must install multicore).
转换成一套FF文件的一个非常大的数据集可以是内存消耗。由于此功能主要用于其副作用(留在磁盘上的FF文件),它可以运行在一个单独的进程,然后将被杀死。请参阅下面使用multicore的一个例子。 (对于这个例子,你必须安装multicore)。
作者(S)----------Author(s)----------
Ramon Diaz-Uriarte <a href="mailto:rdiaz02@gmail.com">rdiaz02@gmail.com</a>
举例----------Examples----------
## Create a temp dir for storing output.[#创建一个临时目录,用于存储输出。]
## (Not needed, but cleaner).[#(不是必需的,但清洁剂)。]
dir.create("ADaCGH2_example_input_dir")
originalDir <- getwd()
setwd("ADaCGH2_example_input_dir")
Sys.sleep(1)
## Get location (and full filename) of example data file[#获取,例如数据文件的位置(全名)]
fname <- list.files(path = system.file("data", package = "ADaCGH2"),
full.names = TRUE, pattern = "inputEx1")
tableChromArray <- inputDataToADaCGHData(filename = fname)
### Clean up (DO NOT do this with objects you want to keep!!!)[#清理(不跟你想保留的对象!!)]
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")
### Running in a separate process[#运行在一个单独的进程]
### This example only does anything if you have multicore installed.[#本例仅做任何事情,如果你有多核安装。]
if(require(multicore)) {
parallel(inputDataToADaCGHData(filename = fname), silent = FALSE)
tableChromArray <- collect()[[1]]
if(inherits(tableChromArray, "try-error")) {
stop("ERROR in input data conversion")
}
### Clean up (DO NOT do this with objects you want to keep!!!)[#清理(不跟你想保留的对象!!)]
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")
}
### Try to prevent problems in R CMD check[#尽量避免问题在R加利福尼亚检查]
Sys.sleep(2)
### Delete temp dir[#删除临时目录]
setwd(originalDir)
Sys.sleep(2)
unlink("ADaCGH2_example_input_dir", recursive = TRUE)
Sys.sleep(2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|