vaFilter(VariantAnnotation)
vaFilter()所属R语言包:VariantAnnotation
Functions for VariantAnnotation filters
VariantAnnotation过滤器的功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions create instances of VAFilter objects. Filters can be applied to genomic variants in a GRanges object. The object returned contains a logical vector indicating which records satisfied the filter and stats on how many elements satisfied the filter.
这些功能创建VAFilter对象的实例。过滤器可以应用于基因变种GRanges对象。返回的对象包含一个逻辑向量,说明它记录满足多少元素满足过滤器的过滤器和统计。
用法----------Usage----------
vaFilter(fun, name = NA_character_, ...)
## S4 method for signature 'missing'
vaFilter(fun, name=NA_character_, ...)
## S4 method for signature 'function'
vaFilter(fun, name=NA_character_, ...)
compose(filt, ..., .name)
dbSNPFilter(dbSNP=character(0), .name="dbSNPFilter")
regionFilter(txdb, region="coding", .name="regionFilter")
参数----------Arguments----------
参数:fun
An object of class function to be used as a filter. fun must accept a single named argument x, and is expected to return a logical vector such that x[fun(x)] selects only those elements of x satisfying the conditions of fun
function类的对象被用作过滤器。 必须接受fun单一命名参数x,预计返回一个逻辑向量x[fun(x)]x满足fun的条件只选择那些元素
参数:name
A character(1) object to be used as the name of the filter. The name is useful for debugging and reference.
过滤器的名字被用来作为一个character(1)对象。 name是有用的调试和参考。
参数:filt
A VAFilter object, to be used with additional arguments to create a composite filter.
一个VAFilter对象,将使用额外的参数,创建一个复合过滤器。
参数:.name
An optional character(1) object used to over-ride the name applied to default filters.
一个可选的character(1)对象使用过骑适用于默认过滤器的名称。
参数:dbSNP
The character(0) name of the dbSNP package to be used. The default (character(0)) performs no filtering
character(0) dbSNP的包要使用的名称。默认(character(0))不执行过滤
参数:txdb
The TranscriptDb object used to identifying gene regions.
TranscriptDb对象用来确定基因区域。
参数:region
A character(1) object specifying the region on which to filter the results. Possible values are "coding", "intron", "3UTR", "5UTR" and "intergenic".
一个character(1)对象指定区域上筛选结果。可能的值是“编码”,“内含子”,“3UTR”,“5UTR的”和“间隔”。
参数:...
Additional arguments
额外的参数
Details
详情----------Details----------
vaFilter allows users to construct their own filters. The fun argument to vaFilter must be a function accepting a single argument x and returning a logical vector indicating which records passed the filter.
vaFilter允许用户建立自己的过滤器。 funvaFilter参数必须是一个函数接受一个参数x和返回的记录通过过滤器的一个逻辑向量。
The signature(fun="missing") method creates a default filter that returns a vector of TRUE values with length equal to length(x).
signature(fun="missing")方法创建一个默认的过滤器,返回TRUE值的向量长度等于length(x)。
compose constructs a new filter from one or more existing filter. The result is a filter that returns a logical vector with indices corresponding to components of x that pass all filters. If not provided, the name of the filter consists of the names of all component filters, each separated by " o ".
compose构造一个新的过滤器由一个或多个现有的过滤器。结果是一个过滤器,对应x通过所有过滤器组件与指数返回一个逻辑向量。如果不提供,过滤器的名称,包括所有组件过滤器,每个" o "分隔的名称。
The remaining functions documented on this page are built-in filters that accept arguments x, subset=TRUE and return a logical vector of length(x) indicating which components of x satisfy the filter.
此页面上剩余的记录功能,内置的过滤器,接受参数x, subset=TRUE返回一个逻辑向量length(x)说明哪些组件x满足过滤器。
dbSNPFilter selects elements present in the specified dbSNP package
dbSNPFilter选择元素存在于指定dbSNP的包
regionFilter selects elements present in the region specified.
regionFilter选择在指定的区域目前的元素。
值----------Value----------
vaFilter returns an object of VAFilter.
vaFilterVAFilter返回一个对象。
Filters return a logical vector of length(x), with TRUE indicating components that pass the filter.
过滤器返回length(x)的逻辑向量,TRUE显示元件,通过过滤器。
作者(S)----------Author(s)----------
Valerie Obenchain <vobencha@fhcrc.org>
参见----------See Also----------
VAFilter
VAFilter
举例----------Examples----------
data(variants)
# variants present in dbSNP [变种呈现在dbSNP数据库]
snpFilt <- dbSNPFilter("SNPlocs.Hsapiens.dbSNP.20090506")
# subset of variants that passed the filter[变种的子集,通过过滤器]
snpFilt(variants)
# VAFilterResult with logical vector indicating which variants passed the filter[VAFilterResult逻辑向量指示变种通过过滤器]
snpFilt(variants, subset=FALSE)
# variants present in coding regions [变异存在于编码区]
library(TxDb.Hsapiens.UCSC.hg18.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg18.knownGene
regionFilt <- regionFilter(txdb, region="coding")
regionFilt(variants, subset=FALSE)
# subset of variants that passed both filters[变种的子集,通过两个过滤器]
comboFilt <- compose(snpFilt, regionFilt)
comboFilt(variants)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|