1.输入unzip命令行提示“ubuntu 环境变量失效”
Command 'unzip' is available in '/usr/bin/unzip'
The command could not be located because '/usr/bin' is not included in the PATH environment variable
解决方法:将/usr/bin写入环境变量
export PATH=/usr/bin:$PATH
最后显示
Archive: /disk1/shares/Trimmomatic-0.38.zip
creating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/LICENSE
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/trimmomatic-0.38.jar
creating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/NexteraPE-PE.fa
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/TruSeq2-PE.fa
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/TruSeq2-SE.fa
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/TruSeq3-PE-2.fa
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/TruSeq3-PE.fa
inflating: /disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/TruSeq3-SE.fa
成功运行
2.运行测试
java -jar ~/Biosofts/Trimmomatic-0.38/trimmomatic-0.38.jar
Usage:
PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-summary <st atsSummaryFile>] [-quiet] [-validatePairs] [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseo ut <outputBase> | <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
or:
SE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-summary <st atsSummaryFile>] [-quiet] <inputFile> <outputFile> <trimmer1>...
or:
-version
同样成功
3.原始数据过滤
mkdir trim_out
java -jar ~/Biosofts/Trimmomatic-0.38/trimmomatic-0.38.jar PE -phred33 /disk/shares/Seqs/test_7942raw_1.fq.gz /disk/shares/Seqs/test_7942raw_2.fq.gz ./trim_out/output_forward_paired.fq.gz ./trim_out/output_forward_unpaired.fq.gz ./trim_out/output_reverse_paired.fq.gz ./trim_out/output_reverse_unpaired.fq.gz ILLUMINACLIP:/disk/teaching/Biosofts/Trimmomatic-0.38/adapters/TruSeq2-PE.fa:2:30:10 SLIDINGWINDOW:5:20 LEADING:20 TRAILING:20 MINLEN:75
### 把ILLUMINACLIP后的路径换为自己的,用相对路径就出错了
替换后即为:
mkdir trim_out
java -jar ~/Biosofts/Trimmomatic-0.38/trimmomatic-0.38.jar PE -phred33 /disk/shares/Seqs/test_7942raw_1.fq.gz /disk/shares/Seqs/test_7942raw_2.fq.gz ./trim_out/output_forward_paired.fq.gz ./trim_out/output_forward_unpaired.fq.gz ./trim_out/output_reverse_paired.fq.gz ./trim_out/output_reverse_unpaired.fq.gz ILLUMINACLIP:/disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/TruSeq2-PE.fa
:2:30:10 SLIDINGWINDOW:5:20 LEADING:20 TRAILING:20 MINLEN:75
显示为
TrimmomaticPE: Started with arguments:
-phred33 /disk/shares/Seqs/test_7942raw_1.fq.gz /disk/shares/Seqs/test_7942raw_2.fq.gz ./trim_out/output_forward_paired.fq.gz ./trim_out/output_forward_unpaired.fq.gz ./trim_out/output_reverse_paired.fq.gz ./trim_out/output_reverse_unpaired.fq.gz ILLUMINACLIP:/disk1/202031107010094/Biosofts/Trimmomatic-0.38/adapters/TruSeq2-PE.fa
Multiple cores found: Using 4 threads
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at org.usadellab.trimmomatic.trim.IlluminaClippingTrimmer.makeIlluminaClippingTrimmer(IlluminaClippingTrimmer.java:54)
at org.usadellab.trimmomatic.trim.TrimmerFactory.makeTrimmer(TrimmerFactory.java:32)
at org.usadellab.trimmomatic.Trimmomatic.createTrimmers(Trimmomatic.java:59)
at org.usadellab.trimmomatic.TrimmomaticPE.run(TrimmomaticPE.java:552)
at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:80)