RE: Filtering out ASVs from DADA2 based on length

Hello Matthew this is exactly what I was looking for!
Is there any way of doing this using cutadapt function?

Hi @lautaro.rostoll - can you please provide some more context? What are you trying to do? On what data?


I have paired-end sequences with quality. I wanted to know if there is an option to filter out representative sequences based on length after denoising and merging sequences with DADA2.

Thanks for clarifying, @lautaro.rostoll! No need to use cutadapt or q2-cutadapt - you can filter the post-dada2 FeatureData[Sequence] data using the command you linked to above, in your first post. You should have everything you need to make that happen, but if you run into any problems, please let us know!


Thanks a lot, Matthew
Have a good day!

Hello Again,
I was able to filter out sequences that were significantly shorter than my expected amplicon length, I did taxonomical analysis using a amplicon-specific classifier that I created following the tutorials found in the qiime2 documentation.
All that went well, but now when I am trying to create bar plots to visualize the taxonomical composition of my sequences I run into a problem. Because I remove some sequences based on length, now the features from the representative sequences file do not match the feature in the feature table. Here is the error that I get.
"Plugin error from taxa:

Feature IDs found in the table are missing from the taxonomy: {‘df328ed9e23e9e a802c48e3fc0fa68e1’, ‘49b4951c905212d8a671647a253681d9’, ‘9608adcdb80fe95c904395 c465537e3b’, ‘942b345986d54917d3b13e6be81cf14a’, ‘a6d491a6a84ce2619169cd3538c63e 62’, ‘dff45ac694b2ef7186c0093a633fe5de’, ‘44c4a170630b3d3ecebd657ccd8025c1’, ‘65 fa2f461d4ba68b33bf45cb391e5e47’, ‘f3c4ba9a574064e92e84e4c6bd9f6d85’, ‘18dc779e01 4ddff6a1930b6f0fc36844’, ‘a08dee45da8bf236f75aaa29b5d9d981’, ‘d29d4f22de8703dd09 351691a88b8ae6’, ‘b25c25dd8c4ea66d515ba4726a770f81’, ‘f2721c9022b3d0000ad4b9205a c91ccf’, ‘a426de20831b91b128502328779c0861’, ‘48fd17f893369fea4a59608a90c5b4a4’, ‘cac5f1d3af38646bd58ec32c7570239a’, ‘80dc1e882c31eb054a283adcc32c66ef’, ‘606d46 f710fe184c2e74891b7d9177d7’, ‘044485901c8eef72882ca8b965887bc1’, ‘68f65eb31bbaf9 f92d61ba378a8d12b8’, ‘62b9df9ec9666c59c505c8887183efc3’, ‘c299c4838a6d9720aa5b4e 7c40533b91’, ‘f98ba37b882428fa2a8cb47c6ab46e36’, ‘09a65ef6f12541d910fed421f2a5b9 5b’, ‘090078decff21ae8a4331fc1f9ec86d7’, ‘468ffa2047e3544cd216b8c4f878723e’, ‘00 f2449b8351431d61eb3e4bd6523da4’, ‘ca7cba37ae4d1d37d3c7f8bf17e9bd97’}

Debug info has been saved to /home/tmp/eramosa/qiime2-q2cli-err-2bxxojf9.log"

Should I remove all those feature IDs from the feature table?
How can I do this?



For any future readers - @lautaro.rostoll continued the discussion in a new topic: