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

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

[复制链接]
发表于 2012-2-26 13:28:40 | 显示全部楼层 |阅读模式
FaFile(Rsamtools)
FaFile()所属R语言包:Rsamtools

                                        Manipulate indexed fasta files.
                                         操纵索引FASTA文件。

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

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

Use FaFile() to create a reference to an indexed fasta file. The reference remains open across calls to methods, avoiding costly index re-loading.
使用FaFile()创建一个索引的FASTA文件的参考。参考仍然在呼吁开放的方法,避免了昂贵的指数重新加载。

FaFileList() provides a convenient way of managing a list of FaFile instances.
FaFileList()FaFile实例列表管理提供了一个方便的方式。


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



## Constructors

FaFile(file, ...)
FaFileList(...)

## Opening / closing

## S3 method for class 'FaFile'
open(con, ...)
## S3 method for class 'FaFile'
close(con, ...)

## accessors; also path(), index()

## S4 method for signature 'FaFile'
isOpen(con, rw="")

## actions

## S4 method for signature 'FaFile'
indexFa(file, ...)

## S4 method for signature 'FaFile'
scanFaIndex(file, ...)

## S4 method for signature 'FaFile'
countFa(file, ...)

## S4 method for signature 'FaFile,GRanges'
scanFa(file, param, ...)
## S4 method for signature 'FaFile,RangesList'
scanFa(file, param, ...)
## S4 method for signature 'FaFile,RangedData'
scanFa(file, param, ...)
## S4 method for signature 'FaFile,missing'
scanFa(file, param, ...)

## S4 method for signature 'FaFile'
getSeq(x, param, ...)
## S4 method for signature 'FaFileList'
getSeq(x, param, ...)



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

参数:con, x
An instance of FaFile or (for getSeq) FaFileList.
一个实例(FaFilegetSeq或)FaFileList。


参数:file
A character(1) vector of the fasta file path (for FaFile), or an instance of class FaFile or FaFileList (for getSeq).
FASTA文件路径字符(1)矢量(FaFile),或一个类的实例FaFile或FaFileList(getSeq)。


参数:param
An optional GRanges, RangesList, or RangedData instance to select reads (and sub-sequences) for input. See Methods, below.
一个可选的GRanges,RangesList或RangedData选择输入读取(子序列)的实例。看到方法,在下面。


参数:...
Additional arguments. For FaFileList, this can either be a single character vector of paths to BAM files, or several instances of FaFile objects.
额外的参数。 FaFileList,这可以是单个字符的路径向量BAM文件,或FaFile对象的多个实例。


参数:rw
Mode of file; ignored.
文件模式;忽略。


类的对象----------Objects from the Class----------

Objects are created by calls of the form FaFile().
对象的创建形式FaFile()检测。


领域----------Fields----------

The FaFile class inherits fields from the RsamtoolsFile class.
FaFile类继承RsamtoolsFile类的字段。


函数和方法----------Functions and methods----------

FaFileList inherits methods from RsamtoolsFileList and SimpleList.
FaFileList继承RsamtoolsFileList和SimpleList的方法。

Opening / closing:
打开/关闭:




open.FaFile Opens the (local or remote) path and
open.FaFile打开(本地或远程)path“




close.FaFile Closes the FaFile con; returning (invisibly) the updated FaFile. The instance may be
close.FaFile关闭FaFilecon;返回(不可见)更新FaFile。实例可能

Accessors:
存取:




path Returns a character(1) vector of the fasta path name.
路径返回一个字符的的FASTA路径名称(1)向量。




index Returns a character(1) vector of fasta index name
索引返回一个字符(1)向量FASTA索引名称

Methods:
方法:




indexFa Visit the path in path(file) and create an
path(file)indexFa访问路径,并创建一个




scanFaIndex Read the sequence names and and widths of recorded in an indexed fasta file, returning the information as a
scanFaIndex阅读序列名称和索引的FASTA文件中记录的宽度,返回信息作为




countFa Return the number of records in the fasta file.
countFa返回FASTA文件中的记录数。




scanFa Return the sequences indicated by param as a DNAStringSet instance. seqnames(param) selects the sequences to return; start(param) and end{param} define the (1-based) region of the sequence to return. Values of end(param) greater than the width of the sequence are set to the width of the sequence. When param is missing, all records are selected. When length(param)==0
scanFa返回序列表明paramDNAStringSet实例。 seqnames(param)选择返回的序列;start(param)和end{param}定义序列(1)区域返回。 end(param)比序列的宽度更大的值设置为序列的宽度。当param丢失,所有的记录都被选中。当length(param)==0




getSeq Returns the sequences indicated by param from the indexed fasta file(s) of file.
getSeq返回param从索引FASTA文件(S)file表示序列。

For the FaFile method, the return type is a DNAStringSet. The getSeq,FaFile and scanFa,FaFile,GRanges methods differ in that getSeq will reverse complement sequences selected from the minus strand.
为FaFile方法,返回类型是一个DNAStringSet。 getSeq,FaFile和scanFa,FaFile,GRanges方法在getSeq不同将扭转负链选择的补序列。

For the FaFileList method, the param argument must be a GRangesList of the same length as file, creating a one-to-one mapping between the ith element of file and the ith element of param; the return type is a SimpleList of DNAStringSet instances, with
FaFileList参数对于param方法,必须是GRangesList长度相同file的,<第i个元素之间创建一个一对一的映射x>和filei个元素;返回类型是一个paramSimpleList实例,与




show Compactly display the object.
显示紧显示对象。


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


Martin Morgan



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



fl <- system.file("extdata", "ce2dict1.fa", package="Rsamtools")
fa &lt;- open(FaFile(fl))                   # open[打开]
countFa(fa)
(idx <- scanFaIndex(fa))
(dna <- scanFa(fa, idx[1:2]))
ranges(idx) &lt;- narrow(ranges(idx), -10)  # last 10 nucleotides[过去10个核苷酸]
(dna <- scanFa(fa, idx[1:2]))


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-25 02:26 , Processed in 0.023401 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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