getSS(GGBase)
getSS()所属R语言包:GGBase
construct a small-footprint smlSet instance from a specially structured package
从一个特殊结构的封装构造一个小巧的smlSet实例
译者:生物统计家园网 机器人LoveR
描述----------Description----------
construct a small-footprint smlSet instance from a specially structured package
从一个特殊结构的封装构造一个小巧的smlSet实例
用法----------Usage----------
getSS(packname, chrs, renameChrs = NULL, probesToKeep = NULL, wrapperEndo = NULL)
参数----------Arguments----------
参数:packname
string naming a package with eset.rda in data folder, defining ExpressionSet instance ex, and folder parts (from inst in pre-installed image) containing a collection of rda files holding snpStats SnpMatrix-class instances
字符串,命名与eset.rda包数据文件夹,定义ExpressionSet实例前,夹件(从本月预装形象)持有snpStatsSnpMatrix-class实例包含RDA文件的集合
参数:chrs
vector of strings of names of SnpMatrix instances to be included, typically these are the basenames of files in the parts folder, and correspond to chromosomes
名SnpMatrix实例的字符串向量被列入,这些通常是在parts文件夹中的文件的主档名,和对应的染色体
参数:renameChrs
vector of strings of same length of chrs that will supply names to the elements of the smList component of the returned smlSet
向量的长度相同的字符串chrs,smList组件返回smlSet的元素将提供姓名
参数:probesToKeep
vector of strings of probe names to be retained in the returned smlSet
探针名称字符串向量被保留在返回smlSet
参数:wrapperEndo
function receiving and returning an smlSet instance to be invoked prior to returning the smlSet
接收函数返回一个实例被调用之前返回的smlSet的smlSet
值----------Value----------
an instance of smlSet-class
一个smlSet-class的实例
举例----------Examples----------
## Not run: [#无法运行:]
hm20 = getSS("GGdata", "20", renameChrs="chr20")
## End(Not run)[#结束(不运行)]
### The function is currently defined as[#函数定义为]
#function (packname, chrs, renameChrs = NULL, probesToKeep = NULL, [功能(packname,CHRS,renameChrs = NULL,probesToKeep = NULL,]
# wrapperEndo = NULL) [wrapperEndo = NULL)]
#{[{]
# if (!is.null(renameChrs) && (length(chrs) != length(renameChrs))) [(,!is.null(renameChrs)&&(长度(CHRS)!=长度(renameChrs)的))]
# stop("renameChrs must have same length as chrs in call to getSS")[停止(renameChrs必须在调用getSS相同的长度为CHRS“)]
# require(packname, character.only = TRUE)[要求(packname,character.only = TRUE)]
# ex = get(load(system.file(package = packname, "data/eset.rda")))[EX =(负载(。系统(包= packname“数据/ eset.rda”)))]
# if (!is.null(probesToKeep)) [如果(,!is.null(probesToKeep))]
# ex = ex[probesToKeep, ][EX = EX [probesToKeep]]
# partsfol = system.file("parts", package = packname)[partsfol。系统(“零件”,包= packname)]
# chk = sapply(chrs, function(x) file.exists(paste(partsfol, [CHK = sapply(CHRS,函数(x)file.exists(糊(partsfol]
# "/", x, ".rda", sep = "")))[“/”,X,“RDA”,九月=“”)))]
# if (!all(chk)) {[如果(!所有(CHK)){]
# cat("requesting ", paste(chrs, ".rda", sep = ""))[猫(“请求”,粘贴(CHRS“。RDA”,SEP =“”))]
# cat(" but finding\n")[猫(“但要找到\ N”)]
# print(dir(partsfol))[打印(DIR(partsfol))]
# stop("cannot retrieve requested SNP file.")[停止(“不能检索请求的SNP文件”。)]
# }[}]
# sml = lapply(chrs, function(x) get(load(paste(partsfol, "/", [SML = lapply(CHRS(X),功能(负载(糊(partsfol,“/”,]
# x, ".rda", sep = ""))))[X,“RDA”,九月=“”))))]
# if (is.null(renameChrs)) [(is.null(renameChrs))]
# names(sml) = chrs[名称(SML)= CHRS]
# else names(sml) = renameChrs[其他名称(SML)= renameChrs]
# ans = make_smlSet(ex, sml, harmonizeSamples = TRUE)[ANS = make_smlSet(前,SML harmonizeSamples; = TRUE时),]
# if (is.null(wrapperEndo)) [(is.null(wrapperEndo))]
# return(ans)[返回(ANS)]
# else {[其他{]
# ans = wrapperEndo(ans)[ANS = wrapperEndo(ANS)]
# if (isTRUE(tst <- validObject(ans))) [(isTRUE(尖沙咀< - validObject(ANS)))]
# return(ans)[返回(ANS)]
# stop(tst)[停止(TST)]
# }[}]
# }[}]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|