This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Trimmomatic error: cannot execute binary file: Exec format error

I am trying to run Trimmomatic from a docker container using this piece of command:

docker run -v ~:/home  -v /data:/data quay.io/biocontainers/trimmomatic:0.36--6 trimmomatic PE -trimlog /usr/local/share/trimmomatic-0.36-6/adapters/NexteraPE-PE.fa:2:30:10 | /data/Sample1_R1.fastq.gz /data/Sample1_R2.fastq.gz | Sample1_R1_paired.fastq.gz Sample1_R1_unpaired.fastq.gz Sample1_R2_paired.fastq.gz Sample1_R2_unpaired.fastq.gz

this is the error I recieve

-bash: Sample1_R1_paired.fastq.gz: command not found
-bash: /data/Sample1_R1.fastq.gz: cannot execute binary file: Exec format error
/usr/local/bin/trimmomatic: line 6: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory

I don't have the "sudo" rights and I haven't installed the docker, I am just running it, so where I am wrong?

p.s. the NexteraPE-PE.fa is inside the container's directory and the sample files are in the local directory /data, if it helps. Thanks

adapter trimmomatic fastq

1 answer

this is unrelated to docker. You put a pipe in your command line

(..) astq.gz | Sample1_R1_paired.fastq.gz (...)

so you shell thinks there is an executable named "Sample1_R1_paired.fastq.gz"

Thanks that fixed it partially, so I don't get the sample error anymore, but I still get this warning and doesn't start running:

 /usr/local/bin/trimmomatic: line 6: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
Usage:
       PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-quiet] [-validatePairs] [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
   or:
       SE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-quiet] <inputFile> <outputFile> <trimmer1>...
   or:
       -version

Log in to answer this question.