Quality-filter "'NoneType' object is not subscriptable"


I'm trying to use q2 quality-filter on the Mockrobiota 'Extreme' data (mock-12) before denoising with deblur, using the command

qiime quality-filter q-score \
--i-demux demuxed_sequences.qza \
--o-filtered-sequences quality_filtered_seqs.qza \
--o-filter-stats quality_filtered_stats.qza \

However, I get the following error when I try to run it on my data:

Traceback (most recent call last):
File "/home/dylan/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in q_score
File "/home/dylan/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/home/dylan/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in callable_executor
output_views = self._callable(**view_args)
File "/home/dylan/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2_quality_filter/_filter.py", line 90, in q_score
phred_offset = yaml.load(metadata_view,
TypeError: 'NoneType' object is not subscriptable
Plugin error from quality-filter:
'NoneType' object is not subscriptable
See above for debug info.

This error occurs in both the 2021.4 and 2021.11 release.

Can anyone shed some light on this?

Hi @dylan - one of our moderators will be with you soon, we're still catching up from a holiday week in the US - thanks!


I have not been able to replicate this error locally, with 2021.4, 2021.8, or 2021.11. This makes me think there is something weird going on with the imported data or with your environment. Let's start with the data! Could you post how you went about getting the mock-12 data into demuxed_sequences.qza?


Thanks for taking a look. I'm doing the following in 2021.4.

I downloaded the forward sequences from https://s3-us-west-2.amazonaws.com/mockrobiota/latest/mock-12/mock-forward-read.fastq.gz as '1_1_L001_R1_001.fastq.gz', wrote a manifest file pointing there, and made an empty metadata.yml file. I imported with the command

qiime tools import \
--type 'SampleData[SequencesWithQuality]' \
--input-path $PWD \
--output-path demuxed_sequences


Ah, I think your import step is the problem! You will need to use this section of the importing tutorial since they are already demultiplexed but not Casava formatted. Download both files somewhere, create the TSV manifest file(use Google Sheets or Excel), then run a command like this:

qiime tools import \                                                                                                     [email protected]
  --type 'SampleData[PairedEndSequencesWithQuality]' \
  --input-path ./manifest.tsv \
  --output-path paired-end-demux.qza \
  --input-format PairedEndFastqManifestPhred33V2

Then try running quality-filter again!


Great, that solved it. Thanks very much.

1 Like

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