argument too long
-
linux的shell对参数的整体长度有限制 可以使用下面的命令查看大小
getconf ARG_MAXhttp://www.htslib.org/doc/samtools-merge.html
samtools在手册中也提到了这个问题
Problems may arise when attempting to merge thousands of files together. The operating system may impose a limit on the maximum number of simultaneously open files. See ulimit -n for more information. Additionally many files being read from simultaneously may cause a certain amount of "disk thrashing". To partially alleviate this the merge command will load 1MB of data at a time from each file, but this in turn adds to the overal merge program memory usage. Please take this into account when setting memory limits.In extreme cases, it may be necessary to reduce the problem to fewer files by successively merging subsets before a second round of merging.
建议的方案就是多次合并 每次合并一部分