dada2
dada2 copied to clipboard
Error in add(bin) : record does not start with '@'
Dear,
When I use filterAndTrim to clean the gzip fastq file, I always get the error "Error in add(bin) : record does not start with '@'". I guess the error is related to ShortRead but I don't know how to solve it. Could you help me with the problem?
The dada2 version is 1.20. The operation system is Win10.
Thanks in advance!
Do you get this error with the following?
library(ShortRead)
fn <- "path/to/example.fastq.gz"
reads <- readFastq(fn)
If that gives the same error, I'd start by gunzipping one of the fastq files, and just looking at the first few lines (e.g. head -n8 example.fastq
in the shell). Do they look like proper fastq format?
Dear benjjneb,
I also encountered the same problem yesterday. In order to check the filtered fastq files, I entered the code as you say and there's no error information. Then I opened file with Notepad and I found the record start with '@' so the fastq format is correct. The screenshot is below.
I hope my feedback can help you solve the problem.
@M1chibata To troubleshoot this you'll want to isolate a single fastq file (rather than a collection) that might be causing this issue. That is, for what single file fn
does readFastq(fn)
work and learnErrors
(or equivalently and much faster derepFastq
) fail?
In your case, you might want to look if any of the samples failed filtering, i.e. had zero reads pass the filter. If there are any such, you need to remove them from filtFs
/filtRs
before proceeding to denoising.
@benjjneb I moved the fastq files to another path and the pipeline runned normally. This problem may caused by invalid path name with Chinese or other non-English characters. Thanks a lot!
This problem may caused by invalid path name with Chinese or other non-English characters Yes,i invalid
This problem may caused by invalid path name with Chinese or other non-English characters Yes,i invalid
Indeed. The parent directory includes Chinese characters after changing to English letters, the problem is solved.