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

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

[复制链接]
发表于 2012-2-25 19:08:14 | 显示全部楼层 |阅读模式
prune(GeneticsPed)
prune()所属R语言包:GeneticsPed

                                        Prune pedigree
                                         修剪谱系

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

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

prune removes noninformative individuals from a pedigree. This process is usually called trimming or pruning. Individuals are removed if they do not provide any ancestral ties between other individuals. It is possible to add some additional criteria. See details.
prune从家谱中删除无信息个人。这个过程通常被称为修剪或修剪。个人将被删除,如果他们不提供任何其他个人之间的祖先关系。它可以添加一些额外的条件。查看详情。


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



prune(x, id, father, mother, unknown=NA, testAdd=NULL, verbose=FALSE)




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

参数:x
data.frame, pedigree data
数据框,系谱数据


参数:id
character, individuals's identification column name
性格,个人的身份列名


参数:father
character, father's identification column name
性格,父亲的身份列名


参数:mother
character, mother's identification column name
性格,母亲的身份列名


参数:unknown
value(s) used for representing unknown parent in x
值(S)用于代表x未知的父


参数:testAdd
logical, additional criteria; see details
逻辑,额外的标准;查看详细信息


参数:verbose
logical, print some more info
逻辑,打印一些更多的信息


Details

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

NOTE: this function does not yet work with Pedigree class.
注:此功能还没有工作与谱系级。

There are always some individuals in the pedigree that jut out. Usually this are older individuals without known ancestors, founders. If such individuals have only one (first) descendant and no phenotype/genotype data, then they do not give us any additional information and can be safely removed from the pedigree. This process resembles cutting/pruning the branches of a tree.
总有在系谱突出部分出一些个人。这通常是年长者没有已知的祖先,创始人。如果这样的人只有一个(第一)的后裔,并没有表型/基因型数据,然后他们不给我们任何额外的信息,并可以安全地从系谱删除。这个过程类似于切割/修剪一棵树的树枝。

By default prune iteratively removes individuals from the pedigree (from top to bottom) if:
默认情况下,prune反复删除个人从系谱(从上到下):

they are founders, have both ancestors i.e. father and mother unknown and
他们的创始人,即父亲和母亲未知的祖先和

have only one or no (first) descendants i.e. children
只有一个或没有(第一)的后裔即儿童

If there is a need to take into account availability of say phenotype/genotype data or any other information, argument testAdd can be used. Value of this argument must be logical and with length equal to number of rows in the pedigree. The easiest way to achieve this is to merge any data to the pedigree and then to perform a test, which will return logical values. Note that value of TRUE in testAdd means to remove an individual - this function is removing individuals! To keep an individual without known parents and one or no children, value of testAdd must be FALSE for that particular individual. Take a look at the examples.
如果有需要采取考虑到可用性说表型/基因型数据或任何其他资料,可用于参数testAdd。此参数值必须是逻辑与长度等于谱系中的行数。最简单的方式实现这一目标是merge任何数据的谱系,然后进行测试,这将返回逻辑值。需要注意的是价值TRUEtestAdd意味着消除一个人 - 这个功能是消除个人!要保持个人,没有已知的父母和一个或无子女的testAdd价值必须是FALSE特定个人。以一个例子。

There are various conventions on representing unknown/missing ancestors, say 0. R's default is to use NA. If other values than NA are present, argument unknown can be used to convert unknown/missing values to NA.
有代表未知/丢失的祖先的各项公约,说0。 R的默认是使用NA。如果比NA目前,参数unknown可以用来转换NA未知/缺失值的其他值。

It is assumed that pedigree is in extended form i.e. that each father and mother has each own record as an individual. Otherwise error is returned with information on which parents do not appear as individuals.
据推测,家谱在扩展形式,即是每个父亲和母亲都有自己的记录作为一个单独的每个。否则将返回错误信息上的父母不出现个人。

prune does not only remove lines for pruned individuals but also removes them from father and mother columns.
prune不只是删除线修剪个人,但也消除他们从father和mother列。

Pruning is done from top to bottom of the pedigree i.e. from oldest individuals towards younger ones. Take for example the following part of the pedigree in example section:
修剪是对年轻的谱系,即从最早的个人底部。例如,采取例如部分系谱以下部分:


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

prune returns a data.frame with possibly fewer individuals. Read also the details.
prune返回可能少的个人数据框。也读细节。


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


Gregor Gorjanc



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

Pedigree
Pedigree


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



  ## Pedigree example[#谱系的例子]
  x <- data.frame(oseba=c(1,  9, 11, 2, 3, 10, 8, 12, 13,  4, 5, 6, 7, 14, 15, 16, 17),
                    oce=c(2, 10, 12, 5, 5,  0, 7,  0,  0,  0, 7, 0, 0,  0,  0,  0,  0),
                   mama=c(3,  8, 13, 0, 4,  0, 0,  0,  0, 14, 6, 0, 0, 15, 16, 17,  0),
                   spol=c(2,  2,  2, 1, 2,  1, 2,  1,  2,  2, 1, 2, 1,  1,  1,  1,  1),
             generacija=c(1,  1,  1, 2, 2,  2, 2,  2,  2,  3, 3, 4, 4,  5,  6,  7,  8),
                   last=c(2, NA,  8, 4, 1,  6,NA, NA, NA, NA,NA,NA,NA, NA, NA, NA, NA))

  ## Default case[#默认情况下]
  prune(x=x, id="oseba", father="oce", mother="mama", unknown=0)

  ## Use of additional test i.e. do not remove individual if it has[#额外的测试,即使用不删除个人,如果有]
  ## known value for "last"[#称为“最后的价值”]
  prune(x=x, id="oseba", father="oce", mother="mama", unknown=0,
                testAdd=is.na(x$last))

  ## Use of other data[#使用的其他数据]
  y <- data.frame(oseba=c( 11,  15, 16),
                  last2=c(8.5, 7.5, NA))

  x <- merge(x=x, y=y, all.x=TRUE)
  prune(x=x, id="oseba", father="oce", mother="mama", unknown=0,
                testAdd=is.na(x$last2))


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-23 04:53 , Processed in 0.071834 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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