xjtu-omics / msisensor-pro

Microsatellite Instability (MSI) detection using high-throughput sequencing data.
Other
93 stars 20 forks source link

bam index issue of baseline option #2

Closed asaki1986 closed 4 years ago

asaki1986 commented 4 years ago

Hi,

I found the sample.bai that was generate from GATK can not be directly loaded in msisensor-pro baseline option. Rather, it required a sample.bam.bai that newly generated by samtools.

[bam_index_load] fail to load BAM index. msisensor-pro: bamreader.cpp:172: bool ReadInBamReads(const char*, const string&, unsigned int, unsigned int, std::vector<SPLIT_READ>&, std::string): Assertionidx' failed.`

However, this kind of index file can be loaded when "msisensor-pro pro" command is applied.

It will be great of help if you can offer a solution.

Thanks

PengJia6 commented 4 years ago

Hi, Thanks for your question. The sample.bam and sample.bam.bai should be pleased in the same location. By the way, if your bam file is generated by GATK, you may have a index file like sample.bai. If that, you can use the symbol link command to generate a sample.bam.bai file. ls -s sample.bai sample.bam.bai Please let me know, if it is worked, and we will fixed this bug in next release.

asaki1986 commented 4 years ago

Hi, Thanks for your question. The sample.bam and sample.bam.bai should be pleased in the same location. By the way, if your bam file is generated by GATK, you may have a index file like sample.bai. If that, you can use the symbol link command to generate a sample.bam.bai file. ls -s sample.bai sample.bam.bai Please let me know, if it is worked, and we will fixed this bug in next release.

Hi,

I tried the ln -s option, but not worked.

PengJia6 commented 4 years ago

Hi, I am sorry to here that. I try msisensor-pro pro using bam file gererated by gatk just now, it worked in my envirorment. Could you please update the msisensor-pro using conda install msisensor-pro. You can also check your bam file using samtools quickcheck to make sure the completion of your bam file.
If it is also not worked, please offer you gatk and msisensor-pro scripts. Thank you!

arielyh commented 3 years ago

Hi Peng,

I had similar issues. Here is my command and results: (msisensor-env) [myid@compute-a-xx-xxx msisensor_test]$ msisensor-pro baseline -d hg19_msi_reference.list -i configure.txt -o . baseline -d hg19_msi_reference.list -i configure.txt -o .

Check for the environment ... Current work path: /home/myid/msisensor_test Microsatellites file: /home/myid/msisensor_test/hg19_msi_reference.list Configure file path: /home/myid/msisensor_test/configure.txt Output path:/home/myid/msisensor_test /home/myid/msisensor_test/ is existing! OK! /home/myid/msisensor_test/detail is existing! OK!

Load files ... load bam:/home/myid/msisensor_test/normal/case1_sorted.bam OK! load bam:/home/myid/msisensor_test/normal/case2_sorted.bam OK! Open bam file failed( ), please provide valid bam file with its index file !

However, I have both the .bam and .bai files under the normal folder. I've also checked the bam files using samtools and they are correct with completed EOF. I tried both case1_sorted.bam.bai and case1_sorted.bai, but neither of them worked for me.