applyCdfGroups(affxparser)
applyCdfGroups()所属R语言包:affxparser
Applies a function over the groups in a CDF structure
适用于一个CDF结构比组的功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Applies a function over the groups in a CDF structure.
在民防结构的群体,应用的功能。
用法----------Usage----------
applyCdfGroups(cdf, fcn, ...)
参数----------Arguments----------
参数:cdf
A CDF list structure.
一个CDF list结构。
参数:fcn
A function that takes a list structure of group elements and returns an updated list of groups.
一个function需要list族元素的结构,并返回更新list组。
参数:...
Arguments passed to the fcn function.
fcn函数参数传递。
值----------Value----------
Returns an updated CDF list structure.
返回一个更新的民防部队list结构。
预先定义的重组功能----------Pre-defined restructuring functions----------
Generic:
通用:
cdfGetFields() - Gets a subset of groups fields in a CDF structure.
cdfGetFields() - 获取在民防结构的群体领域的一个子集。
cdfGetGroups() - Gets a subset of groups in a CDF structure.
cdfGetGroups() - 获取在民防结构组的一个子集。
cdfOrderBy() - Orders the fields according to the value of another field in the same CDF group.
cdfOrderBy() - 常规根据民防部队在同一组的另一个领域的价值领域。
cdfOrderColumnsBy() - Orders the columns of fields according to the values in a certain row of another field in the same CDF group.
cdfOrderColumnsBy() - 订单根据民防部队在同一组中的某一行的另一个字段的值的字段的列。
Designed for SNP arrays:
SNP芯片设计:
cdfAddBaseMmCounts() - Adds the number of allele A and allele B mismatching nucleotides of the probes in a CDF structure.
cdfAddBaseMmCounts() - 添加等位基因数A和B等位基因错配核苷酸探针在民防结构。
cdfAddProbeOffsets() - Adds probe offsets to the groups in a CDF structure.
cdfAddProbeOffsets() - 将探针偏移在民防结构的群体。
cdfGtypeCelToPQ() - Function to immitate Affymetrix' gtype_cel_to_pq software.
cdfGtypeCelToPQ() - 函数immitate Affymetrix公司的gtype_cel_to_pq软件。
cdfMergeAlleles() - Function to join CDF allele A and allele B groups strand by strand.
cdfMergeAlleles() - 功能加入民防部队等位基因A和B基因组链链。
cdfMergeStrands() - Function to join CDF groups with the same names.
cdfMergeStrands() - 功能加入民防组具有相同的名称。
We appreciate contributions.
我们赞赏的贡献。
作者(S)----------Author(s)----------
Henrik Bengtsson (<a href="http://www.braju.com/R/">http://www.braju.com/R/</a>)
举例----------Examples----------
##############################################################[################################################## ###########]
if (require("AffymetrixDataTestFiles")) { # START #[开始#]
##############################################################[################################################## ###########]
cdfFile <- findCdf("Mapping10K_Xba131")
# Identify the unit index from the unit name[确定的单位名称单位指标]
unitName <- "SNP_A-1509436"
unit <- which(readCdfUnitNames(cdfFile) == unitName)
# Read the CDF file[阅读CDF文件]
cdf0 <- readCdfUnits(cdfFile, units=unit, stratifyBy="pmmm", readType=FALSE, readDirection=FALSE)
cat("Default CDF structure:\n")
print(cdf0)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
# Tabulate the information in each group[制表各组的信息]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
cdf <- readCdfUnits(cdfFile, units=unit)
cdf <- applyCdfGroups(cdf, lapply, as.data.frame)
print(cdf)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
# Infer the (true or the relative) offset for probe quartets.[推断为探针四重奏(真实或相对)偏移。]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
cdf <- applyCdfGroups(cdf0, cdfAddProbeOffsets)
cat("Probe offsets:\n")
print(cdf)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
# Identify the number of nucleotides that mismatch the[识别的核苷酸的数量不匹配]
# allele A and the allele B sequences, respectively.[等位基因A和B等位基因序列,分别。]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
cdf <- applyCdfGroups(cdf, cdfAddBaseMmCounts)
cat("Allele A & B target sequence mismatch counts:\n")
print(cdf)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
# Combine the signals from the sense and the anti-sense[从意识和反义结合的信号]
# strands in a SNP CEL files.[链中的一个SNP CEL文件。]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
# First, join the strands in the CDF structure.[首先,加入民防部队结构链。]
cdf <- applyCdfGroups(cdf, cdfMergeStrands)
cat("Joined CDF structure:\n")
print(cdf)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
# Rearrange values of group fields into quartets. This[重新成为四重奏组字段的值。这]
# requires that the values are already arranged as PMs and MMs.[要求该值已安排PMS和MMS。]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
cdf <- applyCdfGroups(cdf0, cdfMergeAlleles)
cat("Probe quartets:\n")
print(cdf)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
# Get the x and y cell locations (note, zero-based)[取得X和Y单元的位置(注意,零基)]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[-------------------------------]
x <- unlist(applyCdfGroups(cdf, cdfGetFields, "x"), use.names=FALSE)
y <- unlist(applyCdfGroups(cdf, cdfGetFields, "y"), use.names=FALSE)
# Validate[验证]
ncol <- readCdfHeader(cdfFile)$cols
cells <- as.integer(y*ncol+x+1)
cells <- sort(cells)
cells0 <- readCdfCellIndices(cdfFile, units=unit)
cells0 <- unlist(cells0, use.names=FALSE)
cells0 <- sort(cells0)
stopifnot(identical(cells0, cells))
##############################################################[################################################## ###########]
} # STOP #[停止#]
##############################################################[################################################## ###########]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|