applyMapped(Genominator)
applyMapped()所属R语言包:Genominator
Apply a function over mapped data.
应用超过映射数据的功能。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Apply a function over each element of a list containing data subsets, organized by annotation, with an additional argument for the annotation element associated with the list item.
申请超过一个数据子集,由注释举办,含注释元素与列表项相关的其他参数列表中的每个元素的功能。
用法----------Usage----------
applyMapped(mapped, annoData, FUN, bindAnno = FALSE)
参数----------Arguments----------
参数:mapped
A list of data subsets, typically the return value of a call to splitByAnnotation. Names should correspond to names of annoData object.
一个数据子集的列表,通常是一个splitByAnnotation调用的返回值。名称应该对应到annoData对象的名称。
参数:annoData
A data frame which must contain the columns chr, start, end and strand which specifies annotation regions of interest.
一个数据框,其中必须包含列chr,start,end和strand指定利益注释区域。
参数:FUN
A function of two arguments, the first being an element of mapped, the second being the corresponding element of annoData.
两个参数的函数,首先是mapped,第二annoData的相应元素的元素。
参数:bindAnno
Logical indicating whether annotation information should be included in the output. If TRUE it assumes the output of FUN is conformable into a data.frame.
逻辑表示注释信息是否应包括在输出。如果TRUE它假设的FUN输出到data.frame相适应。
值----------Value----------
If bindAnno is FALSE, returns a list containing the output of FUN for each element of the original mapped argument. If bindAnno is TRUE, returns a data frame, containing annotation information and output of FUN.
如果bindAnno是FALSE,返回一个列表,其中包含原FUN参数中的每个元素mapped输出。 bindAnno如果是TRUE,返回一个数据框,包含注释信息和输出FUN。
作者(S)----------Author(s)----------
James Bullard <a href="mailto:bullard@berkeley.edu">bullard@berkeley.edu</a>, Kasper Daniel
Hansen <a href="mailto:khansen@jhsph.edu">khansen@jhsph.edu</a>
参见----------See Also----------
See Genominator vignette for more information.
看到Genominator更多信息插曲。
举例----------Examples----------
ed <- ExpData(system.file(package = "Genominator", "sample.db"),
tablename = "raw")
data("yeastAnno")
s <- splitByAnnotation(ed, yeastAnno[1:100,],
what = getColnames(ed, all = FALSE),
ignoreStrand = TRUE, addOverStrand = TRUE)
## compute the per-base rate for this dataset.[#按基准利率计算,这个数据集。]
applyMapped(s, yeastAnno, function(dta, anno) {
colSums(dta, na.rm = TRUE)/(anno$end - anno$start + 1)
}, bindAnno = TRUE)[1:4,]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|