I am try to trim the reads using Trimmomatic 0.39. But I am encountering error saying command not found. I am invoking it using command:
java -jar Trimmomatic-0.39/trimmomatic-0.39.jar
After that I am getting:
Usage:
       PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-summary <statsSummaryFile>] [-quiet] [-validatePairs] [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
   or:
       SE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-summary <statsSummaryFile>] [-quiet] <inputFile> <outputFile> <trimmer1>...
   or:
       -version
After the following command, I am getting the mentioned error:
trimmomatic PE threads 4 mycoplasma_pneumoniae_F_100K.fastq m ycoplasma_pneumoniae_R_100K.fastq./trimmomatic-out/mycoplasma_pneumoniae_F_paired_100K.fastq/trimmomatic-out/mycoplasm a_pneumoniae_F_unpaired_100K.fastq./trimmomatic-out/mycoplasma_pneumoniae_R_paired_100K.fastq./trimmomatic-out/mycoplas ma_pneumoniae_R_unpaired_100K.fastq ILLUMINACLIP: all_adapters.fa:2:30:10 LEADING:3 TRAILING: 3 SLIDINGWINDOW:4:20 CROP:240 HEADCROP:19 MINLEN:50
I am aware of anaconda/conda. But this method should also work.
I searched for executables and also defined the PATH. But still getting the same problem.
Any suggestion would be highly appreciated. Thanks!
Do you get a valid directory path after running
which trimmomatic.If your
$PATHis correctly set then you should get theusageto print (as above) if you just runtrimmomatic. If you don't then your$PATHis not set right.You also need to make sure you have spaces in the correct delimiting positions and
-in front of options likethreadsand no space beteween:and filename below.which trimmomatic does not returns anything. But, whereis trimmomatic works. I am getting usage after calling trimmomatic (means I have set path correctly).
Even trimmomatic -version gives command not found error.
The zip from github does not contain any executable, just the
./trimmomatic-0.39.jarandadaptersdir. Compare the output:whereis java=>java: /path/to/java_executablevswhereis trimmomatic trimmomatic: (nothing here)So most likely there is no
trimmomaticcommand anywhere on your system, not just on your PATH unless you installed it not from the zip but from another source