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

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

[复制链接]
发表于 2012-2-26 15:02:34 | 显示全部楼层 |阅读模式
getSRA(SRAdb)
getSRA()所属R语言包:SRAdb

                                        Fulltext search SRA meta data using SQLite fts3 module
                                         全文搜索储备金帐户的元数据,使用SQLite fts3模块

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

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

This function does Fulltext search on any SRA fields in any SRA data types with Fulltext capacity in the SQLite and returns SRA records
此功能全文SQLite和回报储备金帐户记录的能力在任何储备金帐户数据类型的任何储备金帐户里的全文搜索


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


getSRA(search_terms, out_types=c('sra','submission','study','sample','experiment','run'), sra_con, acc_only=FALSE)



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

参数:search_terms
Free text search terms constructed according to SQLite query syntax defined here: http://www.sqlite.org/fts3.html#section_1_3  
自由文本搜索字词按这里定义SQLite的查询语法来构建:http://www.sqlite.org/fts3.html#section_1_3


参数:out_types
Character vector of the following SRA data types: 'sra','submission','study','sample','experiment','run'. Note: if 'sra' is within out_types, the out_types will be set to c('submission','study','sample','experiment').  
特别储备金帐户的下列数据类型:“SRA”,“提交”,“学习”,“样本”,“实验”,“运行”的特征向量。注:如果SRA“在out_types是的,out_types将设置到C(提交,研究”,“样本”,“实验”)。


参数:sra_con
Connection to the SRAmetadb SQLite database  
连接的SRAmetadb SQLite数据库


参数:acc_only
logical, if TRUE, the function will return SRA accession for each out_types  
逻辑,如果为TRUE,函数将返回每个out_types储备金帐户加入


Details

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

Queries performed by this function could be Phrase queries, e.g. '"lin* app*"', or NEAR queries, e.g. '"ACID compliant" NEAR/2 sqlite', or with the Enhanced Query Syntax. Check Full Text Search section on the SQLite site for details. if 'acc_only=TRUE', a data.frame containing only SRA accessions will be returned, which can be used as input for sraGraph.
通过此功能进行查询,可能是短语查询,例如“林*程序*”,或附近的查询,例如“ACID兼容”附近/ 2的SQLite,或增强的查询语法。检查全文SQLite的网站上搜寻。如果“acc_only = TRUE”,将返回数据框只包含储备金帐户加入,可以用作为sraGraph的输入。


值----------Value----------

A data.frame containing all returned SRA records with fields defined by out_types.
数据框包含所有返回的储备金帐户与由out_types定义字段的记录。

If acc_only=FALSE, a data.frame of matched accessions of out_types will be returned.
如果匹配加入out_types数据框acc_only = FALSE时,将被退回。


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



Jack Zhu <zhujack@mail.nih.gov>




参考文献----------References----------



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

sraConvert
sraConvert


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


if(file.exists('SRAmetadb.sqlite')) {

        library(SRAdb)
        sra_dbname <- 'SRAmetadb.sqlite'       
        sra_con <- dbConnect(dbDriver("SQLite"), sra_dbname)
  
        ## Fulltext search SRA meta data using SQLite fts3 module:[#全文搜索储备金帐户元数据使用SQLite fts3模块的:]
        # find all records with words of 'breast' and 'cancer' in a filed and there could be one to many words between 'breast' and 'cancer':   [在提交,并可能有一到许多词之间的乳房和癌症的乳房和癌症的话找到的所有记录:]
        rs <- getSRA (search_terms ='breast cancer', out_types=c('run','study'), sra_con=sra_con)

        # find all records with exact phrase of 'breast cancer' in a filed:   [“乳腺癌”的词组被归档的所有记录:]
        rs <- getSRA (search_terms ='"breast cancer"', out_types=c('run','study'), sra_con=sra_con)

        # find records with words beginning with 'braes' and 'can', and the distance between them is equal or less than two words:[找到与braes和能字开始的记录,以及它们之间的距离等于或小于两句话:]
        rs <- getSRA (search_terms ='breas* NEAR/2 can*', out_types=c('run','study'), sra_con=sra_con)

        # the same as above except that only one space between the two words  [除了这两个词之间只有一个空间上面一样]
        rs <- getSRA (search_terms ='"breas* can*"', out_types=c('study'), sra_con=sra_con)

        # find records with 'MCF7' or 'MCF-7' - adding double quote to avoid the SQLite to break down 'MCF-7' to 'MCF' and '7':[MCF7中或MCF-7“的记录 - 加双引号,以避免在SQLite打破MCF-7”的MCF和7:]
        rs <- getSRA (search_terms ='MCF7 OR "MCF-7"', out_types=c('sample'), sra_con=sra_con)

        # the same as above, but only search the field of 'study_title':[与上述相同,但只搜索“study_title领域:]
        rs <- getSRA (search_terms ='study_title: brea* can*', out_types=c('run','study'), sra_con=sra_con)  

        # the same as above, but only search the field of 'study_title' and return only accessions:[与上述相同,但只搜索“study_title的领域,并返回唯一加入:]
        rs <- getSRA (search_terms ='study_title: brea* can*', out_types=c('run','study'), sra_con=sra_con, acc_only=TRUE)

} else {
          print("use getSRAdbFile() to get a copy of the SRAmetadb.sqlite file  and then rerun the example")
}


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-3 01:08 , Processed in 0.022743 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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