pop from empty list error from feature-classifier

Hi,

I encountered some error after training silva 132 release for 16s and testing the classifier. Checked with this post: [qiime2 pop from empty list]. However, I checked with a python script, did not get a line with missing taxonomy.

def checkTaxa(file):
    checkList = ["D_0__", "D_1__", "D_2__", "D_3__", "D_4__", "D_5__", "D_6__", ]
    with open(file, 'r') as f:
        for line in f:
            line = line.strip()
            if not any(n in line for n in checkList):
                print(line)

Not sure what the issue was.

I am using qiime2 2019 04

for input sequence, I used the 99 fasta and with the 7 levels taxonomy. I stripped off "#" in the taxonomy as well as the white space.

attached are the debug log and scripts.
qiime2-debug.txt (3.2 KB)

train_classifier.txt (1.4 KB)
test_classifier.txt (492 Bytes)

Thank you

Hi @Xio_Lee,

The modifications you made to the taxonomy file must have somehow resulted in uneven levels.

Note that your checkTaxa function will not actually validate this appropriately:

You should check for all instead of any (though theoretically that may not catch missing levels if, e.g., you are missing a semicolon but have the rank label).

Give that a try and let us know if that helps track down the issue!

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