Hello, I used samtools to sort a 210GB bam file. The command was:
samtools sort -on in.bam out.prefix
About 1058 .bam files were created. Each of them has about 200,000kb size. The names are
out.prefix.0000.bam
out.prefix.0001.bam
out.prefix.0002.bam
....
out.prefix.1057.bam
However after several days running, there was an error finally.
[bam_sort_core] merging from 1249 files...
open: Too many open files
[bam_merge_core] fail to open file out.prefix.1020.bam
Thanks for advice.
Hi zhshqzyc! You have asked 15 questions so far and not accepted a single answer. Please click on the outline of the checkmark next to it if it solves your problem.
Sorry about it. I just realized there is such a function existing.