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

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

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

                                        Distance in bases to the closest interval(s)
                                         在碱基的距离最接近的时间间隔(S)

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

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

Given two objects, from and to, compute the distance in bases of each from interval to the nearest to interval(s). The distance between a base and the next inter-bases on either side values 0.5. Thus, base - base and inter-base - inter-base intervals distances are integer, whereas base - inter-base intervals distances are half-integers.
由于两个对象,from和to,计算出每个from间隔距离碱基最近的to间隔(S)。两边碱基和未来间碱基之间的距离为0.5。因此,碱基 - 碱基和间碱基 - 碱基间的间隔距离是整数,而碱基 - 基间的间隔距离是半整数。


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


## S4 method for signature 'Genome_intervals,Genome_intervals'
distance_to_nearest(from, to)
## S4 method for signature 'Genome_intervals_stranded,Genome_intervals_stranded'
distance_to_nearest(from, to)



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

参数:from
A Genome_intervals or Genome_intervals_stranded object.
一个Genome_intervals或Genome_intervals_stranded对象。


参数:to
A Genome_intervals or Genome_intervals  object.  
一个Genome_intervals或Genome_intervals 对象。


Details

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

A wrapper calling intervals::distance_to_nearest by seq_name and by strand (if both from and to are Genome_intervals_stranded objects). Thus, if both are stranded, distances are computed over each strand separately. One object must be coerced to Genome_intervals if this is not wished.
一个包装调用intervals::distance_to_nearestseq_name和strand(如果双方from和to是Genome_intervals_stranded对象)。因此,如果滞留,距离计算分别在每个链。一个对象必须强迫Genome_intervals如果这是不希望的。


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

A numeric vector of distances with one element for each row of from.
一个数字的距离向量的与每个from行的一个元素。


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

intervals::distance_to_nearest
intervals::distance_to_nearest


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


## load toy examples[#装载玩具的例子。]
data(gen_ints)                 

## i in close_intervals notation[#我close_intervals符号]
close_intervals(i)

## j in close_intervals notation[#J close_intervals符号]
close_intervals(j)

## distances from i to j [#距离从i到j]
dn = distance_to_nearest(i,j)
dn

## distance == 0 if and only if the interval overlaps another one:[#距离== 0当且仅当另一个区间重叠:]
io = interval_overlap(i,j)
if( any( ( sapply(io, length) >0 )  != (!is.na(dn) & dn ==0) ) )
        stop("The property 'distance == 0 if and only if the interval overlaps another one' is not followed for at least one instance.")

## distances without strand-specificity[#无链特异性的距离]
distance_to_nearest(
                as(i,"Genome_intervals"),
                as(j,"Genome_intervals")
)        

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-7 15:51 , Processed in 0.044544 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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