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

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

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

                                         create a data.frame representing a PED file (MACH) from a SnpMatrix instance
                                         创建一个数据框代表从SnpMatrix实例1 PED的文件(马赫)

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

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

create a data.frame representing a PED file (MACH) from a SnpMatrix instance
创建一个数据框代表从SnpMatrix实例1 PED的文件(马赫)


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


sm2ped(sm, snpsupp, missing.code = "N", family, person, father, mother, sex)



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

参数:sm
SnpMatrix-class instance  
SnpMatrix-class实例


参数:snpsupp
data frame of 'supporting' metadata as returned by read.HapMap.data  
read.HapMap.data返回支持元数据的数据框


参数:missing.code
token to use for missing genotype  
令牌使用缺少的基因型


参数:family
vector of family identifiers as used in PED files for MACH  
家庭标识符作为向量使用PED的文件马赫数


参数:person
vector of person identifiers  
向量的人标识符


参数:father
each element of this vector specifies the father of the person identified on the same line of the file  
此向量中的每个元素指定文件的同一行上确定的人的父亲


参数:mother
as for father  
father


参数:sex
1 for male, 2 for female  
1为男,女2


Details

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

basic purpose is to convert SnpMatrix instances to PED to allow genotype imputation
基本目的是转换SnpMatrix实例PED认证,以允许基因型归集


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

a data.frame instance
数据框实例


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


if (.Platform$OS.type == "unix") { # can't get pathname in windows?[不能在Windows的路径?]
library(snpStats)
sm = chopsticks::read.HapMap.data(paste("file://",
system.file("hapmap/smallc20CEU.txt.gz", package="GGtools"), sep=""))
supp = sm[[2]]
smat = sm[[1]]
reldata = read.table(system.file("hapmap/relationships_w_pops_051208.txt",
  package="GGtools"), header=TRUE)
rownames(reldata) = as.character(reldata[,2])
hids = rownames(smat)
hrel = reldata[hids,]
hrel[1:5,]
args(sm2ped)
ac = as.character
ss = sm2ped(smat, supp, fam=ac(hrel[,1]), person=ac(hrel[,2]), father=ac(hrel[,3]),
mother=ac(hrel[,4]), sex=hrel[,5])
ss[1:5,1:8]
}

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 17:42 , Processed in 0.022616 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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