Demux error on Moving Pictures Tutorial

I am using Qiime2 on my Institution’s computing cluster. I was working through the ‘Moving Pictures’ tutorial and got the following error trying to view the sequence quality information after demultiplexing the sequences. From other posts on this forum, it seems that the problem is with matplotlib configuration. However, since I have no control over the installation or dependencies on the cluster, I am not sure how to proceed. Error message and log text is below.
Thank you for your time!

qiime demux emp-single \
> --i-seqs emp-single-end-sequences.qza \
> --m-barcodes-file sample-metadata.tsv \
> --m-barcodes-category BarcodeSequence \
> --o-per-sample-sequences demux.qza
Saved SampleData[SequencesWithQuality] to: demux.qza
qiime demux summarize \
> --i-data demux.qza \
> --o-visualization demux.qzv
Plugin error from demux:

  Invalid DISPLAY variable

Debug info has been saved to /tmp/qiime2-q2cli-err-ye0uzr3p.log

Traceback (most recent call last):
Traceback (most recent call last):
  File "/group/bioinfo/apps/apps/miniconda-4.3.21/envs/qiime2-2017.10/lib/python
3.5/site-packages/q2cli/", line 218, in __call__
    results = action(**arguments)
  File "<decorator-gen-325>", line 2, in summarize
  File "/group/bioinfo/apps/apps/miniconda-4.3.21/envs/qiime2-2017.10/lib/python
3.5/site-packages/qiime2/sdk/", line 220, in bound_callable
    output_types, provenance)
  File "/group/bioinfo/apps/apps/miniconda-4.3.21/envs/qiime2-2017.10/lib/python
3.5/site-packages/qiime2/sdk/", line 416, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/group/bioinfo/apps/apps/miniconda-4.3.21/envs/qiime2-2017.10/lib/python
3.5/site-packages/q2_demux/_summarize/", line 162, in summarize
    ax = sns.distplot(result, kde=False)
  File "/group/bioinfo/apps/apps/miniconda-4.3.21/envs/qiime2-2017.10/lib/python
3.5/site-packages/seaborn/", line 163, in distplot
    ax = plt.gca()
  File "/group/bioinfo/apps/apps/miniconda-4.3.21/envs/qiime2-2017.10/lib/python
3.5/site-packages/matplotlib/", line 959, in gca
    return gcf().gca(**kwargs)
  File "/group/bioinfo/apps/apps/miniconda-4.3.21/envs/qiime2-2017.10/lib/python
3.5/site-packages/matplotlib/", line 170, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
    canvas = cls.FigureCanvas(figure)
3.5/site-packages/matplotlib/backends/", line 35, in __init__
    super(FigureCanvasQTAggBase, self).__init__(figure=figure)
3.5/site-packages/matplotlib/backends/", line 235, in __init__
3.5/site-packages/matplotlib/backends/", line 122, in _create_qApp
    raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable
1 Like

Hey @Ariangela_Davis!

We recently added a hook that should automatically set an environment variable for matplotlib when you run source activate <whatever>. But I’m guessing your institutional cluster has a different mechanism for loading software.

Fortunately it’s an easy variable to set:

export MPLBACKEND='Agg'

You can run that whenever you start a new session that you want to run QIIME 2 in.

Assuming that works, you might pass that on to your system administrator and they can probably do something to make sure that environment variable is set when QIIME 2 is loaded.

Let me know if that works!


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