Hi Hans, hans.daetwy...@ecodev.vic.gov.au wrote: > Dear All, > > I have a large set of bovine samples (~2700 bam files, on average about 10x > coverage) that I want to run mpileup on. I am getting an error that seems to > indicate that there is a hard coded limit of bam files in Samtools. > > I am running Samtools 1.3 using the following command: > module load samtools/1.3.1 > module load bcftools/1.3.1 > > samtools mpileup -r Chr2:10000-20000 -ugf reference.fa -b bams.txt -t > AD,INFO/AD,ADF,ADR,SP | bcftools call -mv -> 1000Sam1.3.test.vcf > > I get this error: > [mpileup] fail to load index for XXX.bam > Failed to open -: unknown file type
Sounds like a commandline argument parsing problem. > > I have gone and regenerated the XXX.bam.bai file (with Samtools1.3.1), and > rerun and I still get the same error. I have then removed the first bam file > in "bams.txt" and then the error moves to the next bam file in the list after > XXX.bam, lets call it YYY.bam. > [mpileup] fail to load index for YYY.bam > Failed to open -: unknown file type > > This seems to indicate that XXX.bam.bai is OK, but that I hit another cryptic > error in Samtools. Possibly a limit of number of bams? > > XXX.bam is the 1995th file, and YYY.bam is the 1996th. When YYY.bam becomes > the 1995th (because I removed an earlier bam file in the list) file the error > passes XXX.bam and prints at YYY.bam. Provided James suggested to change limits using ulimit command (beware bash has a builtin ulimit function so /usr/bin/ulimit isn't called at all) ...I don't think this sounds like a limit of file descriptors per process IMHO. Instead, I suggest splitting the command into: samtools mpileup -r Chr2:10000-20000 -ugf reference.fa -b bams.txt -t AD,INFO/AD,ADF,ADR,SP > /tmp/1000Sam1.3.test.pileup and in addition, observing the process through strace command: strace -v -f -a 256 samtools mpileup -r Chr2:10000-20000 -ugf reference.fa -b bams.txt -t AD,INFO/AD,ADF,ADR,SP > /tmp/1000Sam1.3.test.pileup 2>/tmp/1000Sam1.3.test.stderr I assume the bcftools part has nothing to do with the error. I think the debug output goes to STDERR. Hope this helps, Martin -- Martin Mokrejs, Ph.D. Adapter/artefact removal from datasets based on the following technologies: 454 / IonTorrent / Evrogen MINT / Clontech SMART / ..., Illumina http://www.bioinformatics.cz/software/supported-protocols/ ------------------------------------------------------------------------------ _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help