The hisat2-build indexer
使用dna文件构建索引,输出后缀为.1.ht2到.8.ht2的八个文件。如果索引较大,后缀改为ht2l。后续的比对需要这八个文件,并且一旦索引构建成功,就不在需要原始的dna文件。
使用Karkkainen的逐块算法可以使hisat2构建在运行时间和内存使用之间进行权衡。hisat2-build具有三种控制权衡的选项:[-p /-packed],-bmax /-bmaxdivn和--dcv。默认情况下,histat2-build将自动搜索设置,从而使用最佳运行时间但不会耗尽内存。也可以使用-a /-noauto选项禁用此行为
索引器提供与索引的“形状”相关的选项,例如,--offrate控制“标记”的Burrows-Wheeler行的分数(即后缀数组样本的密度;有关详细信息,请参见原始FM索引文件)。当然,可以根据实际应用修改参数。但根据我们的实验,已将它们设置为对于大多数情况都合理的默认值。 有关详细信息,请参见性能调整。
hisat2可以构建大的或者小的索引,封装好的软件将根据基因组的大小自动决定
如果引用不超过40亿个字符,但想构建大索引,则用户可以指定--large-index来强制hisat2-build来构建大索引。
HISAT2索引基于Ferragina和Manzini的FM索引,而FM索引又基于Burrows-Wheeler变换。
用于建立索引的算法基于Karkkainen的分块算法。
Command Line
Usage:
hisat2-build [options]* <reference_in> <ht2_base>
Notes
If you use --snp, --ss, and/or --exon, hisat2-build will need about 200GB RAM for the human genome size as index building involves a graph construction.
Otherwise, you will be able to build an index on your desktop with 8GB RAM.
Main arguments
<reference_in>
A comma-separated list of FASTA files containing the reference sequences to be aligned to, or, if -c is specified, the sequences themselves. E.g., <reference_in> might be chr1.fa,chr2.fa,chrX.fa,chrY.fa, or, if -c is specified, this might be GGTCATCCT,ACGGGTCGT,CCGTTCTATGCGGCTTA.
<ht2_base>
The basename of the index files to write. By default, hisat2-build writes files named NAME.1.ht2, NAME.2.ht2, NAME.3.ht2, NAME.4.ht2, NAME.5.ht2, NAME.6.ht2, NAME.7.ht2, and NAME.8.ht2 where NAME is <ht2_base>.
Options
-f
The reference input files (specified as <reference_in>) are FASTA files (usually having extension .fa, .mfa, .fna or similar).
需要写进去吗?不知道。。。。
-c
The reference sequences are given on the command line. I.e. <reference_in> is a comma-separated list of sequences rather than a list of FASTA files.
不写这个参数,一般用不到,意思是把参考续写直接写到命令行里,用逗号隔开?
--large-index
Force hisat2-build to build a large index, even if the reference is less than ~ 4 billion nucleotides long.
及时是小文件也要构建大索引,所以也不用管
-a/--noauto
Disable the default behavior whereby hisat2-build automatically selects values for the --bmax, --dcv and [--packed] parameters according to available memory. Instead, user may specify values for those parameters. If memory is exhausted during indexing, an error message will be printed; it is up to the user to try new parameters.
把自动设置的开关关掉。所以不能关,打开自动设置!
大部分都不用设置,不看了。
构建基因组索引之前需要提取.ss.exon
extract_exons.py Danio_rerio.GRCz10.90.gtf > genome.exon
extract_splice_sites.py Danio_rerio.GRCz10.90.gtf > genome.ss
提取snp的.py可能是基于Python2,运行老是报错,就不写了。
hisat2-build -p 4 Danio_rerio.GRCz10.dna.chromosome.1.fa --ss genome.ss --exon genome.exon genome
以斑马鱼基因组为例,运行内存不少于64gb
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)