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

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

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

                                        Detection of breakpoints using a fast segmentation algorithm based
                                         检测使用快速分割算法的断点

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

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

Detection of breakpoints using a fast segmentation algorithm based on the cyber t-test.
检测采用快速分割算法,对基于网络的t检验中断点。


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


  fastseg(x, type = 1, alpha = 0.1, segMedianT, minSeg = 4,
  eps = 0, delta = 5, maxInt = 40, squashing = 0,
  cyberWeight = 10, ...)



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

参数:x
Values to be segmented either in the format of a sorted GRanges object, ExpressionSet object, matrix or vector.
值分割,无论在格式一个排序农庄对象的,ExpressionSet对象,矩阵或向量。


参数:type
Parameter that sets the type of test. If set to 1 a test of the left against the right window is performend. If set to 2 the segment is also tested against the global mean. (Default = 1).
参数设置的测试类型。如果设置为1右侧窗口的左侧对测试performend。如果设置为2段也对全球平均测试。 (默认值= 1)。


参数:alpha
A value between 0 and 1 is interpreted as the ratio of initial breakpoints. An integer greater than one is interpreted as number of desired breakpoints. Increasing this parameter leads to more segments. (Default = 0.05)
被解释为0和1之间的值比初始断点。大于一的整数被解释为所需的断点数量。增加此参数会导致更多的细分。 (默认值= 0.05)


参数:segMedianT
A numeric vector of length two with the thresholds of segments' median values that are considered as significant. Only segments with a median above the first or below the second value are kept in a final merging step. If missing the algorithm will try to find a reasonable value by using z-scores. (Default "missing".)
两个分部“为显着的考虑中值的阈值长度的数字向量。与上述第一或第二个值低于中位数只有部分保存在最终合并的步骤。如果错过该算法将试图找到一个合理的值,通过使用Z-分数。 (默认为“失踪”。)


参数:minSeg
The minimal segment length. (Default = 4).
最小段长度。 (默认值= 4)。


参数:eps
Minimal distance between consecutive values. Only consecutive values with a minimium distance of "eps" are tested. This makes the segmentation algorithm even faster. If all values should be tested "eps" can be set to zero. If missing the algorithm will try to find a reasonable value by using quantiles. (Default "missing".)
连续值之间的最小距离。与“易办事”的minimium距离只有连续值进行了测试。这使得分割算法,甚至更快。 “EPS”如果所有的测试值应可设置为零。如果错过该算法将尝试找到一个合理的值,使用位数。 (默认为“失踪”。)


参数:delta
Segment extension parameter. If delta consecutive extensions of the left and the right segment do not lead to a better p-value the testing is stopped. (Default = 5).
段扩展参数。如果Delta连续扩展的左,右段不会导致一个更好的p值测试停止。 (默认值= 5)。


参数:maxInt
Maximal length of the left and the right segment. (Default = 40).
最大长度的左,右段。 (默认值= 40)。


参数:squashing
The degree of squashing of the input values. If set to zero no squashing is performed. (Default = 0).
输入值的挤压程度。如果设置为零,没有压片进行。 (默认值= 0)。


参数:cyberWeight
The nu parameter of the cyber t-test. Can be interpreted as the weight of the global variance. The higher the value the more small segments with high variance will be significant. (Default = 10).
NU参数的网络t检验。可以解释为全球变化的重量。价值较高的高方差更小的细分将是重大的。 (默认值= 10)。


参数:...
Further arguments passed to the plot function.
进一步的参数传递给绘图功能。


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

A data frame containing the segments.
一个数据框包含段。


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



Guenter Klambauer <a href="mailto:klambauer@bioinf.jku.at">klambauer@bioinf.jku.at</a>




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


library(fastseg)

#####################################################################[################################################## ##################]
### the data[#数据]
#####################################################################[################################################## ##################]
data(coriell)
head(coriell)

samplenames <- colnames(coriell)[4:5]
data <- as.matrix(coriell[4:5])
data[is.na(data)] <- median(data, na.rm=TRUE)
chrom <- coriell$Chromosome
maploc <- coriell$Position


###########################################################[################################################## ########]
## GRanges[#农庄]
###########################################################[################################################## ########]

library("GenomicRanges")

## with both individuals[不论是个人#]
gr <- GRanges(seqnames=chrom,
ranges=IRanges(maploc, end=maploc))
elementMetadata(gr) <- data
colnames(elementMetadata(gr)) <- samplenames
res <- fastseg(gr)

segres <- toDNAcopyObj(
segData     = res,
chrom       = as.character(seqnames(gr)),
maploc      = as.numeric(start(gr)),
genomdat    = data,
sampleNames = samplenames)

## with one individual[#一个人]
gr2 <- gr
data2 <- as.matrix(data[, 1])
colnames(data2) <- "sample1"
elementMetadata(gr2) <- data2
res <- fastseg(gr2)

segres <- toDNAcopyObj(
segData     = res,
chrom       = as.character(seqnames(gr)),
maploc      = as.numeric(start(gr)),
genomdat    = as.matrix(data2),
sampleNames = unique(elementMetadata(res)$ID))


###########################################################[################################################## ########]
## vector[#向量]
###########################################################[################################################## ########]
data2 <- data[, 1]
res <- fastseg(data2)
segres <- toDNAcopyObj(
segData     = res,
chrom       = rep(1, length(data2)),
maploc      = 1:length(data2),
genomdat    = as.matrix(data2),
sampleNames = "sample1")


###########################################################[################################################## ########]
## matrix[#矩阵]
###########################################################[################################################## ########]
data2 <- data[1:400, ]
res <- fastseg(data2)
segres <- toDNAcopyObj(
segData     = res,
chrom       = rep(1, nrow(data2)),
maploc      = 1:nrow(data2),
genomdat    = as.matrix(data2),
sampleNames = colnames(data2))


###########################################################[################################################## ########]
## Expression set object[#表达集对象]
###########################################################[################################################## ########]
library(oligo)
eSet <- new("ExpressionSet")
assayData(eSet) <- list(intensity=data)

featureData(eSet) <- new("AnnotatedDataFrame",
data=data.frame(
chrom = chrom,
start = maploc,
end   = maploc))
phenoData(eSet) <- new("AnnotatedDataFrame",
data=data.frame(samples=samplenames))
sampleNames(eSet) <- samplenames
res <- fastseg(eSet)

segres <- toDNAcopyObj(
segData     = res,
chrom       = rep(1, nrow(data)),
maploc      = maploc,
genomdat    = as.matrix(data),
sampleNames = colnames(data))


#####################################################################[################################################## ##################]
### plot the segments[#绘制分部的]
#####################################################################[################################################## ##################]

library(DNAcopy)
plot(segres, xmaploc=TRUE)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-9 07:06 , Processed in 0.149713 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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