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

R语言 ShortRead包 Snapshot-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-26 14:08:06 | 显示全部楼层 |阅读模式
Snapshot-class(ShortRead)
Snapshot-class()所属R语言包:ShortRead

                                        Class "Snapshot"
                                         类“快照”

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

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

A Snapshot-class to visualize genomic data from  BAM files with zoom and pan functionalities.
一个Snapshot一流的基因组数据的可视化与缩放和平移功能,BAM文件。


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


Snapshot(files, range, ...)



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

参数:files
A character() or BamFileList specifying the file(s) to be visualized.  
一个字符()或BamFileList指定的文件(S)的可视化。


参数:range
A GRanges object specifing the range to be visualized.
一个GRangesspecifing对象的范围,可视化。


参数:...
Additional, optional, arguments to be passed to the Snapshot initialize function. Arguments include:     
另外,可选,参数被传递快照initialize函数。参数包括:

functions:A SnapshotFunctionList of functions, in addition to built-in "fine_coverage", "coarse_coverage", "multifine_coverage", to be used for visualization.  
功能:一SnapshotFunctionList的功能,除了内置的“fine_coverage,coarse_coverage,multifine_coverage,使用可视化。

currentFunction:character(1) naming the function, from functinos to be used for data input and visualization. The default chooses a function based on the scale at which the data is being visualized.  
currentFunction:字符(1)命名的功能,从functinos被用于数据输入和可视化。默认选择基于规模的数据可视化功能。

annTrack:Annotation track. If built-in visulization functions are to be used, annTrack should be a GRanges instance and the first column of its elementMeatdata would be used to annotate the range.  
annTrack:诠释轨道。如果要使用内置的visulization功能,annTrack应该是GRanges实例和其elementMeatdata的第一列将用来注释的范围。

fac:Character(1) indicating which factor used for grouping the sample files. The factor should be included in the elementMetadata of files, otherwise ignored. Used only to visualize multiple files.   
因素:性格(1)哪些因素分组示例文件。的因素应包括在fileselementMetadata,否则忽略。仅用于可视化多个文件。

.auto_display:logical(1) indicating whether the visualization is to be updated when show is invoked.  
。逻辑auto_display:(1)表示,是否要更新时show调用可视化。

.debuglogical(1) indicating whether debug messages are to be printed.   
。debuglogical(1)说明是否要打印调试消息。


方法----------Methods----------




zoom signature(x = "Snapshot"): Zoom (in or out) the
变焦signature(x = "Snapshot"):放大(或缩小)




pan signature(x = "Snapshot"): Pan (right or left)
泛signature(x = "Snapshot"):潘(左或右)




togglefun signature(x = "Snapshot"): Toggle the current functions which imported records are to be immediately evaluated. Note that the active range will be changed to the
togglefunsignature(x = "Snapshot"):切换进口记录将被立即评估目前的职能。请注意,活动范围将改为




togglep signature(x = "Snapshot"): Toggle the panning
togglepsignature(x = "Snapshot"):切换平移




togglez signature(x = "Snapshot"): Toggle the zooming
togglezsignature(x = "Snapshot"):切换缩放


存取----------Accessors----------




show signature(object = "Snapshot"): Display a
显示signature(object = "Snapshot"):显示




files signature(x = "Snapshot"): Get the files
文件signature(x = "Snapshot"):files




functions signature(x = "Snapshot"): Get the functions field (object of SnapshotFunctionList) of a
功能signature(x = "Snapshot"):functions场(SnapshotFunctionList对象)的




view signature(x = "Snapshot"): Get the view
查看signature(x = "Snapshot"):view




vrange signature(x = "Snapshot"): Get the .range field (object of GRanges) of a Snapshot
vrangesignature(x = "Snapshot"):.range场(对象GRanges)Snapshot




getTrellis signature(x = "Snapshot"): Get the
getTrellissignature(x = "Snapshot"):获取


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




.debug: Object of class function to display
.debug:Object类的function显示




.auto_display: Object of class logical to
类的对象.auto_display:logical




.range: Object of class GRanges indicating
.range:Object类的GRanges说明




.zin: Object of class logical indicating
.zin:Object类的logical说明




.pright: Object of class logical indicating
.pright:Object类的logical说明




.data: Object of class data.frame containing
.data:Object类的data.frame包含




.data_dirty: Object of class logical
.data_dirty类logical:对象




.initial_functions: Object of class
.initial_functions:对象类




.current_function: Object of class character of the function the imported recored are currently evaluated and
.current_function:character类对象的功能导入条记录目前正在评估,并




annTrack: Default to NULL if not intended to visulize the annotation track. If default visulization function(s) is intended to be used to plot the annotation,
annTrack:默认为NULL如果不打算以visulize注解轨道。如果的默认visulization功能(S)的目的是要用来绘制批注,




functions: Object of class SnapshotFunctionList of customized functions to evaluate
functions类SnapshotFunctionList定制功能的对象,以评估




files: Object of class BamFileList to be imported.
files:Object类的BamFileList要依赖进口。




view: Object of class SpTrellis that is
view:Object类的SpTrellis这是


基于类的方法----------Class-Based Methods----------




display(): Display the current Snapshot object.
display():显示当前的Snapshot对象。




pan(): Pan (right or left) the current plot.
pan():潘(左或右)目前的图。




zoom(): Zoom (in or out) the current plot.
zoom():放大(或缩小)当前的图。




toggle(zoom, pan, currentFunction): Toggle zooming, panning effects or the currentFuction in which the imported
toggle(zoom, pan, currentFunction):切换缩放,平移的影响,其中进口currentFuction


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


Martin Morgan and Chao-Jen Wong <a href="mailto:cwon2@fhcrc.org">cwon2@fhcrc.org</a>



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

SpTrellis
SpTrellis


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



## example 1: Importing specific ranges of records[#示例1:导入记录的具体范围]

file <- system.file("extdata", "SRR002051.chrI-V.bam",
                    package="yeastNagalakshmi")
which <-  GRanges("chrI", IRanges(1, 2e5))
s <- Snapshot(file, range=which)

## methods[#方法]
zoom(s) # zoom in[放大]
## zoom in to a specific region[#放大到一个特定的区域]
zoom(s, range=GRanges("chrI", IRanges(7e4, 7e4+8000)))
pan(s)  # pan right[潘权]
togglez(s) # change effect of zooming[改变缩放效果]
zoom(s) # zoom out[缩小]
togglep(s) # chage effect of panning[CHAGE效果的平移]
pan(s)

## accessors[#存取]
functions(s)
vrange(s)
show(s)
ignore.strand(s)
view(s) ## extract the spTrellis object[#提取spTrellis对象。]
getTrellis(s) ## extract the trellis object[#提取网格对象。]

## example 2: ignore strand[例2:忽略链]
s <- Snapshot(file, range=which, ignore.strand=TRUE)

##[#]
## example 3: visulizing annotation track[#示例3:visulizing注释轨道]
##[#]

library(GenomicFeatures)

getAnnGR <- function(txdb, which) {
    ex <- exonsBy(txdb, by="gene")
    sn <- keepSeqlevels(ex, seqlevels(which))
    r <- range(sn)
    gr <- unlist(r)
    values(gr)[["gene_id"]] <- rep.int(names(r), times=elementLengths(r))
    gr
}

txdbFile <- system.file("extdata", "sacCer2_sgdGene.sqlite",
                    package="yeastNagalakshmi")
# txdb &lt;- makeTranscriptDbFromUCSC(genome="sacCer2",[txdb < -  makeTranscriptDbFromUCSC(基因组“sacCer2”]
#                                  tablename="sgdGene")[TableName的=“sgdGene”)]
txdb <- loadFeatures(txdbFile)
which <-  GRanges("chrI", IRanges(1, 2e5))
gr <- getAnnGR(txdb, which)
## note that the first column of the elementMetadata annotates of the[#注意,第一列的elementMetadata的诠释]
## range of the elements.[#范围内的元素。]
gr

s <- Snapshot(file, range=which, annTrack=gr)
annTrack(s)
## zoom in to an interesting region[#放大到一个有趣的区域]
zoom(s, range=GRanges("chrI", IRanges(7e4, 7e4+8000)))

togglez(s) ## zoom out[#放大了]
zoom(s)

pan(s)

## example 4, 5, 6: muliple BAM files with 'multicoarse_covarage'[#示例4,5,6:muliple的BAM文件“multicoarse_covarage”]
## and 'mutifine_coverage' view.[#和“mutifine_coverage的意见。]

## Resolution does not automatically switch for views of multiple[#决议不自动切换多个视图]
## files. It is important to note if width(which) &lt; 10,000, use[#文件。重要的是要注意,如果宽度()<10,000,使用]
## multifine_coverage.  Otherwise use multicoarse_coverage[#multifine_coverage。否则使用multicoarse_coverage]
file <- system.file("extdata", "SRR002051.chrI-V.bam",
                    package="yeastNagalakshmi")
which <-  GRanges("chrI", IRanges(1, 2e5))
s <- Snapshot(c(file, file), range=which,
              currentFunction="multicoarse_coverage")

## grouping files and view by 'multicoarse_coverage'[#分组multicoarse_coverage的文件,并查看]
bfiles <- BamFileList(c(file, file))
values(bfiles) <- DataFrame(sampleGroup=factor(c("normal", "tumor")))
values(bfiles)
s <- Snapshot(bfiles, range=which,
              currentFunction="multicoarse_coverage", fac="sampleGroup")

## grouping files and view by 'multifine_coverage'[#分组multifine_coverage的文件,并查看]
which <- GRanges("chrI", IRanges(7e4, 7e4+8000))
s <- Snapshot(bfiles, range=which,
              currentFunction="multifine_coverage", fac="sampleGroup")


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-24 08:39 , Processed in 0.030004 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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