RangesMatching-class(IRanges)
RangesMatching-class()所属R语言包:IRanges
Matchings between Ranges
匹配之间的范围
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The RangesMatching class stores a set of matchings between the ranges in one Ranges object and the ranges in another. Currently, RangesMatching are used to represent the result of a call to findOverlaps, though other matching
RangesMatching类存储在一个Ranges对象和范围,在另一组的范围之间的匹配。目前,RangesMatching是用来代表调用findOverlaps的结果,虽然其他配套
Details
详情----------Details----------
The as.matrix method coerces a RangesMatching to a two column matrix with one row for each matching, where the value in the first column is the index of a range in the first (query) Ranges and the index of the matched subject range is in the second column. The matchMatrix function returns the same thing, but use of as.matrix is preferred.
as.matrix方法,胁迫,以两列RangesMatching每个匹配,在第一列的值是一个范围的指数在第一行(查询)matrix Ranges“匹配的主题范围的指数是在第二列。函数返回matchMatrix同样的事情,但as.matrix使用是首选。
The as.table method counts the number of matchings for each query range and outputs the counts as a table.
as.table方法计算每个查询范围的匹配数和输出table计数。
To transpose a RangesMatching x, so that the subject and query are interchanged, call t(x). This allows, for example, counting the number of subjects that matched using as.table.
转RangesMatchingx,这样的主题和查询互换,叫t(x)。例如,这允许计数的科目数量匹配使用as.table。
To get the actual regions of intersection between the overlapping ranges, use the ranges accessor.
为了得到交点之间的重叠范围的实际区域,使用ranges存取。
强迫----------Coercion----------
In the code snippets below, x is a RangesMatching object.
在下面的代码片段,x是RangesMatching对象。
as.matrix(x): Coerces x to a two column integer matrix, with each row representing a matching between a query index (first column) and subject index (second column).
as.matrix(x)胁迫x一个两列的整数矩阵,每行代表之间的查询索引(第一列)和主题索引(第二列)匹配。
as.table(x): counts the number of matchings for each query range in x and outputs the counts as a table.
as.table(x):计数为每个查询范围匹配x和输出table计数。
t(x): Interchange the query and subject in x,
t(x):交换查询和主题x
as.list(x): Returns a list with an element for each query, where each element contains the indices of the subjects that match to the corresponding query.
as.list(x):返回一个列表,为每个查询的元素,其中每个元素包含指数的课题,匹配相应的查询。
as(x, "List"): Like as.list, above.
as(x, "List")像as.list上面。
存取----------Accessors----------
queryHits(x): Gets the indices of overlapping ranges in the query, equivalent to as.matrix(x)[,1].
queryHits(x):获取查询范围重叠的指数,相当于as.matrix(x)[,1]。
subjectHits(x): Gets the indices of overlapping ranges in the subject, equivalent to as.matrix(x)[,2].
subjectHits(x):获取重叠在主题范围的指标,相当于as.matrix(x)[,2]。
matchMatrix(x): A synonym for as.matrix, above.
matchMatrix(x):as.matrix的代名词,以上。
ranges(x, query, subject): returns a Ranges holding the intersection of the ranges in the Ranges objects query and subject, which should be the same subject and query used to generate x. Eventually, we might store the query and subject inside x, in which case the arguments would be redundant.
,ranges(x, query, subject):返回一个Ranges范围的交集Ranges对象query和subject,这应该是同一主题和查询用来生成x。最终,我们可能存储里面x的查询和主题,在这种情况下,参数是多余的。
length(x): get the number of matches
length(x):匹配的数量
nrow(x): get the number of queries in the matching
nrow(x):查询匹配
ncol(x): get the number of subjects in the matching
ncol(x):获得匹配的科目数
dim(x): get a two-element integer vector, essentially c(nrow(x), ncol(x)).
dim(x):得到一个有两个元素的整数向量,基本上c(nrow(x), ncol(x))。
作者(S)----------Author(s)----------
Michael Lawrence
参见----------See Also----------
findOverlaps, which generates an instance of this class.
findOverlaps,生成这个类的一个实例。
举例----------Examples----------
query <- IRanges(c(1, 4, 9), c(5, 7, 10))
subject <- IRanges(c(2, 2, 10), c(2, 3, 12))
tree <- IntervalTree(subject)
matchings <- findOverlaps(query, tree)
as.matrix(matchings)
as.table(matchings) # hits per query[点击每个查询]
as.table(t(matchings)) # hits per subject[点击每科]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|