近來在進行染色體級別基因組的分析。
使用pindel軟件對染色體的結(jié)構(gòu)變異進行檢測。
在計算過程中發(fā)現(xiàn),和delly不同,pindel需要使用二代數(shù)據(jù)(*.bam)并識別索引“.bai”而不識別“.csi”。
由于我的基因組組裝至chromsome(scaffold)水平,因此scaffold1>512M。
本人系統(tǒng)默認samtools在對其進行索引建立的過程中報錯如下,
[E::hts_idx_check_range] Region 536870752..536870915 cannot be stored in a bai index. Try using a csi index with min_shift = 14, n_lvls >= 6
[E::sam_index] Read '***' with ref_name='hic_scaffold_1', ref_length=569202264, flags=97, pos=536870753 cannot be indexed
samtools index: failed to create index for "***.bam": Numerical result out of range
通過檢測samtools版本發(fā)現(xiàn)
samtools --version 檢測版本?

進而通過查閱發(fā)現(xiàn)其他策略解決,
包括1、切割染色體,使用bed文件對內(nèi)容進行切割,本人沒有嘗試過
2、聽說biobambam2可以構(gòu)建,本人也沒有嘗試過。
3、使用其他版本samtools,這是我使用的解決辦法。
首先找到其他版本的samtools, 這里根據(jù)網(wǎng)上的提示我找到的是samtools-0.1.13版本
在網(wǎng)頁https://sourceforge.net/projects/samtools/files/samtools/0.1.13/
在linux界面使用
wget https://sourceforge.net/projects/samtools/files/samtools/0.1.13/samtools-0.1.13.tar.bz2
tar -jxvf?samtools-0.1.13.tar.bz2
make
./samtools 運行看是否可以用。

使用絕對路徑直接調(diào)用samtools即可解決samtools不能index過長scaffold的問題。