View Single Post
Old 03-13-2015, 01:02 PM   #17
Junior Member
Location: Calgary

Join Date: Jun 2014
Posts: 5
Default Problem with argument length

Dear Brian,
I have run into a problem when trying to create an index for bbsplit using a large number of files (~20,000). In the example below the variable $files contains 20,000 comma delimited, file names.

[email protected][BBMap] -Xmx100g threads=20 ref=$files                                                                                                                         [ 2:47PM]
zsh: argument list too long:
What I have found out so far is that the linux kernel has a upper limit for the argument length in the shell, which causes this problem. I have tried various workarounds e.g. trying to pipe the file names in from STDIN or creating a bash script. But nothing has worked.
Any suggestions how to get bbsplit to indext such a large number of files before running the splitting?
Maybe one solution would be if one could hand the ref= argument a folder containing all fasta files and then bbsplit writes an index for each .fasta file in the folder!?

Thanks a lot in advance for your help,
manuelkleiner is offline   Reply With Quote