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

R语言 MSnbase包 writeMgfData-methods()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-26 07:33:20 | 显示全部楼层 |阅读模式
writeMgfData-methods(MSnbase)
writeMgfData-methods()所属R语言包:MSnbase

                                         Write an experiment or spectrum to an mgf file
                                         写实验MGF文件或频谱

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

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

Methods writeMgfData write individual "Spectrum" instances of whole "MSnExp" experiments to a file in Mascot Generic Format (mgf) (see  http://www.matrixscience.com/help/data_file_help.html for more details). Function readMgfData read spectra from and mgf file and creates an "MSnExp" object.
方法writeMgfData写个人"Spectrum"整个"MSnExp"实验实例吉祥物通用格式的文件(MGF)(见http://www.matrixscience.com/help/data_file_help.html更多详情)。功能readMgfData读取和的的MGF文件光谱创建一个"MSnExp"对象。


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

参数:object
An instance of class "Spectrum" or "MSnExp".  
一个实例的类"Spectrum"或"MSnExp"。


参数:con
A valid connection or a character string with the name of the file to save the object. In case of the latter, a file connection is created. If not specified, 'spectrum.mgf'  or 'experiment.mgf' are used depending on the class of object. Note that existing files are overwritted.  
一个有效的connection或character字符串的文件名保存该对象。在后者的情况下,创建一个file连接。如果没有指定,spectrum.mgf“或experiment.mgf取决于类object。请注意,现有的文件overwritted。


参数:COM
Optional character vector with the value for the 'COM' field.  
可选的特征向量与“COM”字段的值。


参数:TITLE
Optional character vector with the value for the spectrrm 'TITLE' field. Not applicable for experiments.
可选的特征向量标题spectrrm领域的价值。为实验不适用。


Details

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

Note that when reading an mgf file, the original order of the spectra is lost. Thus, if the data was originally written to mgf from an MSnExp object using writeMgfData, although the feature names will be identical, the spectra are not as a result of the reordering. See example below.
请注意,阅读MGF文件时,光谱的原始订单丢失。因此,如果数据最初被写了MGF从MSnExp使用writeMgfData对象,虽然功能名称将是相同的,谱是不是作为一个重新排序的结果。见下面的例子。


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




signature(object = "MSnExp") Writes the full
signature(object = "MSnExp")写完整




signature(object = "Spectrum") Writes an individual
signature(object = "Spectrum")写入个人


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

readMgfData function to read data from and mgf file.
readMgfData函数来读取数据和MGF文件。


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


  ## Not run: [#无法运行:]
    data(itraqdata)
    writeMgfData(itraqdata,file="itraqdata.mgf",COM="MSnbase itraqdata")
    itraqdata2 <- readMgfData("itraqdata.mgf")
    ## note that the order of the spectra is altered[#注意,光谱顺序改变]
    ## and precision of some values (precursorMz for instance)[#和精度的一些值(例如precursorMz)]
    match(signif(precursorMz(itraqdata2),4),signif(precursorMz(itraqdata),4))
    ## [1]  1 10 11 12 13 14 15 16 17 18 ...[[1] 1 10 11 12 13 14 15 16 17 18 ...]
    ## ... but all the precursors are there[#...但所有的前体有]
    all.equal(sort(precursorMz(itraqdata2)),sort(precursorMz(itraqdata)),
              check.attributes=FALSE,
              tolerance=10e-5)
    ## is TRUE[#是属实]
    all.equal(as.data.frame(itraqdata2[[1]]),as.data.frame(itraqdata[[1]]))
    ## is TRUE[#是属实]
    all.equal(as.data.frame(itraqdata2[[3]]),as.data.frame(itraqdata[[11]]))
    ## is TRUE[#是属实]
    ## But, beware that[#但是,注意的是,]
    all(featureNames(itraqdata2)==featureNames(itraqdata))
    ## is TRUE too![#太是真!]
  
## End(Not run)[#结束(不运行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-3 00:58 , Processed in 0.022082 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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