Hello,
I’m a little confused. Initially, I had an issue with Kneaddata not realizing my reads were paired-end, which I fixed with the trick mentioned in another thread about adding /1 and /2 to the headers and taking out spaces using the sed
command. Which worked – bowtie2 started processing my reads as paired-end.
However, as you’ll see from my code below, it didn’t work for Trimmomatic, which trimmed my reads as if they were single-end. Do you know how to make it so that Trimmomatic trims my reads as if they’re paired-end?
Also, a side question, but one which would add a lot of convenience – is there a way to make bowtie2 use more than 1 thread for the bowtie2 step that kneaddata kicks off?
For reference, I’m running this on one of two AWS instances, the “bad” one being an m6i.4xl and the “good” one an m6i.16xl, so I have plenty of computing power.
my command:
kneaddata --verbose -i Phinal/Phi_R1.fastq -i Phinal/Phi_R2.fastq -db wheat_ref -o KneadPhi --trimmomatic /home/ubuntu/anaconda3/share/trimmomatic-0.39-2 --decontaminate-pairs lenient
The readout:
Reordering read identifiers ...
Initial number of reads ( /home/ubuntu/KneadPhi/reordered_8bsy21iy_Phi_R1 ): 16997678.0
Initial number of reads ( /home/ubuntu/KneadPhi/reordered_gdt6pix0_Phi_R2 ): 16997678.0
Running Trimmomatic ...
java -Xmx500m -jar /home/ubuntu/anaconda3/share/trimmomatic-0.39-2/trimmomatic.jar PE -threads 1 -phred33 /home/ubuntu/KneadPhi/reordered_8bsy21iy_Phi_R1 /home/ubuntu/KneadPhi/reordered_gdt6pix0_Phi_R2 /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.1.fastq /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.1.fastq /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.2.fastq /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.2.fastq MINLEN:60 ILLUMINACLIP:/home/ubuntu/anaconda3/lib/python3.7/site-packages/kneaddata/adapters/NexteraPE-PE.fa:2:30:10:8:TRUE SLIDINGWINDOW:4:20 MINLEN:75
Total reads after trimming ( /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.1.fastq ): 14685246.0
Total reads after trimming ( /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.2.fastq ): 14685246.0
Total reads after trimming ( /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.1.fastq ): 422991.0
Total reads after trimming ( /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.2.fastq ): 608622.0
Running trf ...
kneaddata_trf_parallel --input /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.1.fasta --output /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.1.fasta.trf.parameters.2.7.7.80.10.50.500.dat --trf-path /home/ubuntu/anaconda3/bin/trf --trf-options '2 7 7 80 10 50 500 -h -ngs' --nproc 1
Running trf ...
kneaddata_trf_parallel --input /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.2.fasta --output /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.2.fasta.trf.parameters.2.7.7.80.10.50.500.dat --trf-path /home/ubuntu/anaconda3/bin/trf --trf-options '2 7 7 80 10 50 500 -h -ngs' --nproc 1
Running trf ...
kneaddata_trf_parallel --input /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.1.fasta --output /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.1.fasta.trf.parameters.2.7.7.80.10.50.500.dat --trf-path /home/ubuntu/anaconda3/bin/trf --trf-options '2 7 7 80 10 50 500 -h -ngs' --nproc 1
Running trf ...
kneaddata_trf_parallel --input /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.2.fasta --output /home/ubuntu/KneadPhi/Phi_R1_kneaddata.trimmed.single.2.fasta.trf.parameters.2.7.7.80.10.50.500.dat --trf-path /home/ubuntu/anaconda3/bin/trf --trf-options '2 7 7 80 10 50 500 -h -ngs' --nproc 1
Decontaminating ...
Running bowtie2 ...
/home/ubuntu/anaconda3/bin/bowtie2 --threads 1 --very-sensitive-local --phred33 -x /home/ubuntu/wheat_ref -1 /home/ubuntu/KneadPhi/Phi_R1_kneaddata.repeats.removed.1.fastq -2 /home/ubuntu/KneadPhi/Phi_R1_kneaddata.repeats.removed.2.fastq --un-conc /home/ubuntu/KneadPhi/Phi_R1_kneaddata_paired_wheat_ref_bowtie2_clean_%.fastq --al-conc /home/ubuntu/KneadPhi/Phi_R1_kneaddata_paired_wheat_ref_bowtie2_contam_%.fastq -S /dev/null
Error executing: /home/ubuntu/anaconda3/bin/bowtie2 --threads 1 --very-sensitive-local --phred33 -x /home/ubuntu/wheat_ref -1 /home/ubuntu/KneadPhi/Phi_R1_kneaddata.repeats.removed.1.fastq -2 /home/ubuntu/KneadPhi/Phi_R1_kneaddata.repeats.removed.2.fastq --un-conc /home/ubuntu/KneadPhi/Phi_R1_kneaddata_paired_wheat_ref_bowtie2_clean_%.fastq --al-conc /home/ubuntu/KneadPhi/Phi_R1_kneaddata_paired_wheat_ref_bowtie2_contam_%.fastq -S /dev/null
Error message returned from bowtie2 :
Error, fewer reads in file specified with -2 than in file specified with -1
terminate called after throwing an instance of 'int'
Aborted (core dumped)
(ERR): bowtie2-align exited with value 134
Subprocess reported error. Please see log file for more details.
If this is similar to anything up here, please let me know! Sometimes, my keyword-fu is weak.
Thank you for your help!