Sequence ordering can lead to inconsistent results for comments

Welcome to the forum @zhigang !

No it will not.

How did you sort the sequences? You might have introduced an error while sorting, because this result is a common issue when classifying sequences that are in mixed or incorrect orientations:

By any chance did you also have other sequences that had improved annotations after sorting? (e.g., went from kingdom to species-level annotation). It is very possible that your sequences are in mixed orientations. The classify-sklearn method infers the read orientation from the first 100 sequences, and requires that all reads are in the same orientation. So re-sorting the reads will lead to a different result if the reads are in mixed orientations.

You can use the RESCRIPt plugin to harmonize your read orientation prior to classifying:

Give that a try and let us know what you find.

good luck!

2 Likes