tabix -p vcf test.vcf.gz
[E::hts_idx_push] Unsorted positions on sequence #1: 130023 followed by 130022
tbx_index_build failed: test.vcf.gz
由以上可以知道,错误是由test.vcf.gz中变异未能按照染色体、位置排序导致
重新排序
- less test.vcf|grep -v '#'|sort -k1,1d -k2,2n >body
- less test.vcf|grep '^#' >header
- cat header body >test1.vcf
重新索引即可