Closed innagsc closed 4 years ago
what is the output of
ls -lah /pth/to/*.ba*
-rw-rw-r-- 1 user group 11G Mar 28 09:51 /pth/to/.ba
there is no bam file.
what is that .ba file ? whith a prefix '.' it's a hidden file ?
where is the bai file ?
Sorry, this is the correct output: -rw-rw-r-- 1 user group 11G Mar 28 09:51 path/to/.bam -rw-rw-r-- 1 user group 7.1M Mar 28 14:27 /path/to/.bam.bai
there is a "bam.bai' but no '.bam.bai' (dot prefix)
.bam and .bam.bai are located in the same directory
that's a very unusual way to name a file. Please set a valid filename.
mv path/to/.bam path/to/f.bam
mv path/to/.bam.bai path/to/f.bam.bai
and retry.
Sorry, I probably didn't explain it well. My files are named: path/to/f.bam and path/to/f.bam.bai. And unfortunately, I am still having the same problem.
there are some test data in the jvarkit directory. src/test/resources/
what happens when you're trying to use those files; Try:
$ java -jar dist/bamstats04.jar -B <(echo -e "RF01\t10\t20") src/test/resources/S1.bam
#chrom start end length sample mincov maxcov avgcov_0 mediancov_0 nocoveragebp_0 percentcovered_0
RF01 10 20 10 S1 3 4 3.9 4.0 0 100
Verify
Subject of the issue
My input is a .bed file with exons and a .bam file
Your environment
${JAVA_HOME}
Steps to reproduce
My command: java -jar dist/bamstats04.jar -B /path/to/.bed /pth/to/.bam
Expected behaviour
Get statistics (mean, max, median and min)
Actual behaviour
[INFO][BamStats04]/path/to/bam [SEVERE][BamStats04]/path/to/bam is not indexed [INFO][Launcher]bamstats04 Exited with failure (-1)
I used samtools to get .bai file. Tried to run it and got the same error. What is wrong?
Thanks :)