benjjneb / dada2

Accurate sample inference from amplicon data with single nucleotide resolution
http://benjjneb.github.io/dada2/
GNU Lesser General Public License v3.0
466 stars 142 forks source link

Graceful handling of zero-length reads? #1886

Open Danyang1111 opened 7 months ago

Danyang1111 commented 7 months ago

Hi, I am trying to generate quality plot, when I type: plotQualityProfile(cutFs[1]) Error: BiocParallel errors 1 remote errors, element index: 1 0 unevaluated and other errors first remote error: Error in density.default(qscore): 'x' contains missing values How to deal with it?

benjjneb commented 7 months ago

What is the output when you run library(ShortRead);foo<-readFastq(cutFs[1])?

Dianapthv commented 5 months ago

Hi, i have the same problem:

plotQualityProfile(cutFs[1:2]) Error: BiocParallel errors 1 remote errors, element index: 1 0 unevaluated and other errors first remote error: Error in density.default(qscore): 'x' contains missing values.

When I run library(ShortRead);foo<-readFastq(cutFs[1]) output looks like

print(foo) class: ShortReadQ length: 754907 reads; width: 0..200 cycles

benjjneb commented 5 months ago

@Dianapthv It looks like you have some reads that are length zero, which is causing this error. If you filter out reads below a reasonable minimum length that should be resolved. Or just work with the original data rather than the post-processing data that led to these zero-length reads.