On Wed, Oct 31, 2018 at 10:02:12PM +0000, Yarza, Fauna wrote:
> this error will be returned
> Failed to open file ./samtools.7711.2619.tmp.0252.bam samtools sort: fail to 
> open "./samtools.7711.2619.tmp.0252.bam": Too many open files

You can reduce the number of files it attempts to merge from by
increasing their size, which is governed by the samtools sort -m
parameter.

Try setting this to be something higher ("free -h" or "top" can give
you an idea of how much you have on your system).  Just be warned that
this is the memory *per thread*, so if you specify multiple threads
then it'll be much more than you think.

James

-- 
James Bonfield (j...@sanger.ac.uk)
The Sanger Institute, Hinxton, Cambs, CB10 1SA


-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to