samtools faidx创建fasta格式文件索引fai

2020-11-10  本文已影响0人  生信编程日常

fasta是一种常用的序列存储格式,GATK、IGV等软件对序列进行快速查找的时候通常需要建立fasta的索引文件。fa文件的索引为fai结尾的文件,可以使用samtools faidx命令创建,具体用法如下:

#samtools faidx input_ref.fa
samtools faidx GRCm38.p5.genome.fa

head(GRCm38.p5.genome.fa.fai)

输出为GRCm38.p5.genome.fa.fai文件,.fai文件格式如下, 共5列,\t分隔:

NAME Name of this reference sequence
LENGTH Total length of this reference sequence, in bases
OFFSET Offset within the FASTA file of this sequence's first base
LINEBASES The number of bases on each line
LINEWIDTH The number of bytes in each line, including the newline

即第一列 NAME : 序列名
第二列 LENGTH: 序列的长度, 单位为bp
第三列 OFFSET : 第一个碱基的偏移量, 从0开始计数,换行符也统计进行
第四列 LINEBASES : 行的碱基数, 单位为bp;
第五列 LINEWIDTH : 行宽

参考:https://www.cnblogs.com/xudongliang/p/5200655.html

上一篇 下一篇

猜你喜欢

热点阅读