quadram-institute-bioscience / phage-annotation-workshop

Phage Annotation Workshop 2021
Creative Commons Zero v1.0 Universal
6 stars 1 forks source link

Quality_filtering: ERROR: Failed to write: filtered/T4_R1.fq.gz #1

Closed noutin2020 closed 2 years ago

noutin2020 commented 2 years ago

Hello to the trainers of this workshop and many thanks for making avainlable your resources on GitHub. I am encountering the following challengue with one of your commands provided. Below is the different outputs:

(base) mifer@fmichodigni:~/Desktop/phage-annotation-workshop/data/illumina$ ls
illumina_qc               qc              T4_R2.fastq.gz  T7_R2.fastq.gz
Illumina_Reads_stats.csv  T4_R1.fastq.gz  T7_R1.fastq.gz
(base) mifer@fmichodigni:~/Desktop/phage-annotation-workshop/data/illumina$ fastp -i T4_R1.fastq.gz -I T4_R2.fastq.gz -o filtered/**T4_R1.fq.gz** -O filtered/**T4_R2.fq.gz** --length_required 100 --detect_adapter_for_pe --cut_tail -j qc/T4.json -h qc/T4.html
Detecting adapter sequence for read1...
No adapter detected for read1

Detecting adapter sequence for read2...
No adapter detected for read2

ERROR: Failed to write: filtered/T4_R1.fq.gz
(base) mifer@fmichodigni:~/Desktop/phage-annotation-workshop/data/illumina$ fastp -i T4_R1.fastq.gz -I T4_R2.fastq.gz -o filtered/**T4_R1.fastq.gz** -O filtered/**T4_R2.fastq.gz** --length_required 100 --detect_adapter_for_pe --cut_tail -j qc/T4.json -h qc/T4.html
Detecting adapter sequence for read1...
No adapter detected for read1

Detecting adapter sequence for read2...
No adapter detected for read2

ERROR: Failed to write: filtered/T4_R1.fastq.gz

I tried to change the file T4_R1.fq.gz to T4_R1.fastq.gz in order to get positive output, but the same issue came out.

Please, help me out!

Thanks in advance for your time!

telatin commented 2 years ago

It seems that you are selecting as output -o filtered/T4_R1.fq.gz -O filtered/T4_R2.fq.gz, but - as your ls shows, the filtered directory does not exist.

Fastp is working as you see the messages like "Deteting adapter..." but fails to write the output (ERROR: Failed to write).

Try with

mkdir filtered

before running the command

noutin2020 commented 2 years ago

Issue sorted and many thanks for being around to reply.

(base) mifer@fmichodigni:~/Desktop/phage-annotation-workshop/data/illumina$ fastp -i T4_R1.fastq.gz -I T4_R2.fastq.gz -o filtered/T4_R1.fq.gz -O filtered/T4_R2.fq.gz --length_required 100 --detect_adapter_for_pe --cut_tail -j qc/T4.json -h qc/T4.html Detecting adapter sequence for read1... No adapter detected for read1

Detecting adapter sequence for read2... No adapter detected for read2

Read1 before filtering: total reads: 289683 .....................

fastp -i T4_R1.fastq.gz -I T4_R2.fastq.gz -o filtered/T4_R1.fq.gz -O filtered/T4_R2.fq.gz --length_required 100 --detect_adapter_for_pe --cut_tail -j qc/T4.json -h qc/T4.html fastp v0.23.2, time used: 20 seconds