Off topic:Failed Due To Truncated File Or Corrupt Bam Index File Error When Downloading Bam File From Samtools
0
0
Entering edit mode
12.5 years ago
Pascal ★ 1.5k

Hi. I'm trying to open a fragment of a bam file using "samtools view" but I get "failed due to truncated file or corrupt BAM index file" trying to do the following error:

samtools view -hb <ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/data/NA12878/alignment/NA12878.chrom1.ILLUMINA.bwa.CEU.high_coverage.20100311.bam> 1:150,000,000-151,000,000 > NA12878.chrom1.ILLUMINA.bwa.CEU.high_coverage.20100311_150M-151M.bam
[main_samview] retrieval of region "1:150,000,000-151,000,000" failed due to truncated file or corrupt BAM index file

I've tried to let samtools downloading the bai file and also to download it myself beforehand but it always give me the same error.

Regards.

samtools • 5.6k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2807 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6