解决tabix建索引报错[E::hts_idx_push] Unsorted positions on sequence #
2023-09-27 14:23:25 时间
当我对两个基因型文件位置取交集,并重新生成两个vcf:
$ bcftools view -R overlap.lst variant.filter.vcf.gz -Oz -o 300.vcf.gz
出现如下错误:
$ tabix 300.vcf.gz
[E::hts_idx_push] Unsorted positions on sequence #4: 29013869 followed by 29013853
tbx_index_build failed: 300.vcf.gz
原因是位点未排序。因此可知bcftools从vcf取位点子集时,并不会对位点进行排序。
解决如下:
zcat 300.vcf.gz |grep '^#'>header
zcat 300.vcf.gz |grep -v '^#' |sort -k1,1d -k2,2n > body
cat header body |bgzip -c >new.300.vcf.gz
tabix new.300.vcf.gz
相关文章
- check password policy on win 10查看密码策略
- 解决 If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'
- 213Echarts - 数据区域缩放(Tooltip and DataZoom on Mobile)
- jquery on事件jquery on实现绑定多个事件
- WARNING: 'aclocal-1.14' is missing on your system.
- Install OpenCV 3.0 and Python 2.7+ on Ubuntu
- 《嵌入式系统开发之道——菜鸟成长日志与项目经理的私房菜》——第1章 系统•嵌入•硬件 01-01 Welcome on board!
- timestamp的自动更新 ON UPDATE CURRENT_TIMESTAMP
- <SPECTRAL-SPATIAL CLUSTERING OF HYPERSPECTRAL IMAGE BASED ON LAPLACIAN REGULARIZED DEEP SUBSPACE >笔记
- Vue3+ts+eslint报错记录及解决:warning Unexpected any. Specify a different type、warning Delete `·` 、Missing return type on function、Require statement not part of import statement、Unnecessary escape character
- Hive on Spark生产调优之组件参数配置
- petite-vue源码剖析-事件绑定`v-on`的工作原理
- [LeetCode] 1275. Find Winner on a Tic Tac Toe Game 找出井字棋的获胜者
- E.ON携Google拓展欧洲市场 于德推Sunroof计划
- C#-linq join on 后多个条件怎么写
- 【bzoj1803】Spoj1487 Query on a tree III DFS序+主席树