Dada2 parameter for pair end reads


before running dada2, How I can decide the correct parameter for



I am also using --p-trim-left-f 19 , --p-trim-left-r 20 to remove the primer sequences.


I am using 11.2018 version. I tried to use this command but showing error:

qiime demux summarize --i-data demux.qza --o-visualization demux.qzv --verbose

Traceback (most recent call last):
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/q2cli/”, line 274, in call
results = action(**arguments)
File “”, line 2, in summarize
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/qiime2/sdk/”, line 231, in bound_callable
output_types, provenance)
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/qiime2/sdk/”, line 424, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/q2_demux/_summarize/”, line 190, in summarize
ax = sns.distplot(result, kde=False)
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/seaborn/”, line 166, in distplot
ax = plt.gca()
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/”, line 969, in gca
return gcf().gca(**kwargs)
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/”, line 586, in gcf
return figure()
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/”, line 533, in figure
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/”, line 161, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/”, line 167, in new_figure_manager_given_figure
canvas = cls.FigureCanvas(figure)
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/backends/”, line 24, in init
super(FigureCanvasQTAgg, self).init(figure=figure)
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/backends/”, line 234, in init
File “/opt/gridware/pkg/el6/apps/qiime/2018.11.0/bin/lib/python3.5/site-packages/matplotlib/backends/”, line 125, in _create_qApp
raise RuntimeError(‘Invalid DISPLAY variable’)
RuntimeError: Invalid DISPLAY variable

Plugin error from demux:

Invalid DISPLAY variable

See above for debug info.

Hi @Yogesh_Gupta,

The solution has been reported here:

You are on the right track, using demux-summarize to look at quality scores. See the tutorials here and the many posts on this forum for more advice on setting truncation lengths.

Good luck!

I just run this command and it works:
echo “backend: Agg” > ~/.config/matplotlib/matplotlibrc

do I need to run it always before running any Qiime2 command?

No. You should only need to do that once.

Here is the image for forward and reverse reads. it looks all reads are of high quality. do I need to truncate them, what parameter should I use?

–p-trunc-len-f ?

–p-trunc-len-r ?

how dada2 works: does it first truncate reads and then trim the primer or it first removed primer then truncate reads

If it first trim primer then read length is going to be the same.


yes, quality looks good. Truncate at maximum length. Read through this forum for more general troubleshooting tips regarding where to truncate.

truncate then trim.

Good luck!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.