主要内容

bwaindex

从参考序列创建BWA索引

描述

example

bwaindex(referenceFile)creates BWA index files for the reference sequence inreferenceFile[1][2]。默认情况下,该函数将索引文件写入同一目录referenceFile

The index files are in the AMB, ANN, BWT, PAC, and SA file formats.

bwaindex要求BWA支金宝app持包装BoioInformatics Toolbox™。If the support package is not installed, then the function provides a download关联。有关详细信息,请参阅生物信息学Toolbox Software Support Packages

example

bwaindex(referenceFile,indexOptions.)使用指定的其他选项indexOptions.

example

bwaindex(referenceFile,Name,Value)使用指定的其他选项one or more name-value pair arguments. For example,bwaindex(referenceFile,'Algorithm','is')specifies the linear-time algorithm.

例子

全部收缩

此示例要求BWA支持包用于BioInformatics To金宝appolbox™。如果未安装支持金宝app包,软件提供了下载链接。有关详细信息,请参阅生物信息学Toolbox Software Support Packages

Build a set of index files for the Drosophila genome. This example uses the reference sequencedmel_chr4.fa., provided with the toolbox. The'Prefix'argument lets you define the prefix of the output index files. You can also include the file path information. For this example, define the prefix asdmel_chr4.并将索引文件保存在当前目录中。

bwaindex('Dmel_chr4.fa','Prefix','./Dmel_chr4');

作为指定名称值对参数的替代方案,您可以使用BWAIndexOptionsobject to specify the indexing options.

indexopt = bwaindexOptions;indexopt.prefix =.'./Dmel_chr4';indexOpt.Algorithm ='bwtsw';bwaindex('Dmel_chr4.fa',indexOpt);

Once the index files are ready, map the read sequences to the reference usingbwamem。Two pair-end read input files are already provided with the toolbox. Using name-value pair arguments, you can specify different alignment options, such as the number of parallel threads to use.

Bwamem('dmel_chr4','SRR6008575_10k_1.fq','srr6008575_10k_2.fq','srr6008575_10k_chr4.sam','NumThreads',4);

或者,您可以使用BWAMEMoptionsto specify the alignment options.

inpileOpt = bwamemoptions;alpionOpt.numthreads = 4;Bwamem('dmel_chr4','SRR6008575_10k_1.fq','srr6008575_10k_2.fq','srr6008575_10k_chr4.sam',alignOpt)

Input Arguments

全部收缩

参考文件名称, specified as a character vector or string. The file must be a FASTA-formatted file with the reference sequence information for indexing.

Data Types:char|string

索引的其他选项,指定为aBWAIndexOptionsobject, character vector, or string. The character vector or string must be in theBWA索引本机语法(以划线为前缀)。如果您指定了一个BWAIndexOptions对象,该函数仅使用设置或修改的属性。

Data Types:char|string

Name-Value Arguments

指定可选的参数成对Name1=Value1,...,NameN=ValueN, whereNameis the argument name and价值是相应的价值。名称 - 值参数必须在其他参数之后出现,但对的顺序无关紧要。

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

例子:BWAINDEX(参考文件,'算法','BWTSW')specifies to use the BWT-SW algorithm.

Algorithm to construct the BWT (Burrows-Wheeler transform) index, specified as a character vector or string. Options are:

  • 'is'- 线性时算法。使用此选项的内存要求是数据库大小的5.37倍。如果您的数据库大于2 GB,则无法使用此选项。

  • 'bwtsw'— BWT-SW algorithm.

根据参考基因组的大小自动选择默认算法。

Data Types:char|string

每批处理的基数数量bwtswalgorithm, specified as a positive scalar.

Data Types:double

额外的命令, specified as a character vector or string.

命令必须是本机语法(由一个或两个破折号前缀)。使用此选项可在没有相应的Matlab的情况下应用未记录的标志和标志®特性。

例子:'ExtraCommand','-6'

Data Types:char|string

Flag to include all available options with the corresponding default values when converting to the original options syntax, specified as真的要么false

The original (native) syntax is prefixed by one or two dashes. By default, the function converts only the specified options. If the value is真的, the software converts all available options, with default values for unspecified options, to the original syntax.

Note

如果你设置了IncludeAllto真的,该软件转换了所有可用的属性,具有未指定属性的默认值。唯一的例外是,当属性的默认值是时NaN,inf,[],'', or"", then the software does not translate the corresponding property.

例子:'IncludeAll',true

Data Types:logical

输出索引文件的前缀,指定为字符向量或字符串。您只能指定前缀或文件路径和前缀。默认值与输入Fasta文件名相同。

例子:'Prefix','D:/ngs/GRCh38_p12'

Data Types:char|string

参考

[1]Li, Heng, and Richard Durbin. “Fast and Accurate Short Read Alignment with Burrows-Wheeler Transform.”生物信息学25,不。14(2009年7月15日):1754-60。https://doi.org/10.1093/bioinformatics/btp324

[2]Li, Heng, and Richard Durbin. “Fast and Accurate Long-Read Alignment with Burrows–Wheeler Transform.”生物信息学26,不。5(2010年3月1日):589-95。https://doi.org/10.1093/bioinformatics/btp698

Version History

Introduced in R2020b