Dada2 minimum overlap

I was wondering, is there any way to set minimum overlap for merging the reads in q2-DADA2 for paired reads? Like minOverlap in R. Just to be able to compare the outputs with default 12 bases and custom parameter.

No there is currently no way to adjust this with q2-dada2, but it would be an easy fix. I have raised an issue to address this. Contributions are welcome and encouraged! :wink:

1 Like

Thx, I will try to do it as well :eyes:

1 Like

I tried to modify this file /home/My_PC_Name/anaconda3/envs/qiime2-2019.4/bin/run_dada_paired.R and changed this part:

# Loop over rest in streaming fashion with learned error rates
denoisedF <- rep(0, length(filtsF))
mergers <- vector("list", length(filtsF))
cat("3) Denoise remaining samples ")
for(j in seq(length(filtsF))) {
  drpF <- derepFastq(filtsF[[j]])
  ddF <- dada(drpF, err=errF, multithread=multithread, verbose=FALSE)
  drpR <- derepFastq(filtsR[[j]])
  ddR <- dada(drpR, err=errR, multithread=multithread, verbose=FALSE)
  mergers[[j]] <- mergePairs(ddF, drpF, ddR, drpR, minOverlap=4)
  denoisedF[[j]] <- getN(ddF)

by adding “mergers[[j]] <- mergePairs(ddF, drpF, ddR, drpR, minOverlap=4)”

Do I really changed parameters to run it with minOverlap 4 by this way?
In the output with the same data and the same other parameters I received more than 100 additional readpairs and about from 1 to 50 or more in most of the samples. And now I am wondering if it is because of the changes I did or it can happens by some other random factors?..
Thank you in advance.
PS wanted to add something like option
to the command line options but it’s over my head to figure out everything I need to change (I am a beginner in python and coding and bioinformatics)

That looks correct to me. If you did not receive an error that is probably a good sign…

No worries — we will add this feature in a future release of QIIME 2. Thanks for the suggestion!