torognes / vsearch

Versatile open-source tool for microbiome analysis
Other
656 stars 122 forks source link

Can vsearch combine two clustered-otutab together? #507

Closed peiyaohu closed 1 year ago

peiyaohu commented 1 year ago

Can vsearch be used to merge 2 otutabs (clustered from two different batches of samples, at 97% similarity) together?

torognes commented 1 year ago

No, sorry, I don't see how this should be carried out with vsearch.

peiyaohu commented 1 year ago

Thanks! But I have another question: Both otutab1 and otutab2 were clustered at 97% similarity. And I want combine them into a new otutab(otutab3):

If I use otutab1 as a reference, use blast to compare otutab2 with it (set 97% similarity), some otu may be aligned while others are not. Then relabel the unaligned OTUs bind them to otutab1, that’s=> otutab3 =otutab1+ otutab2-unaligned, then is otutab3 reliable?

torognes commented 1 year ago

I would not rely on it. Even though all OTUs in otutab3 are at least 97% different, there might be sequences assigned to an otu in otutab1 that are actually more similar to otus in otutab2 and the other way round. You should reassign all sequences to otus again together.

frederic-mahe commented 1 year ago

Even though all OTUs in otutab3 are at least 97% different, there might be sequences assigned to an otu in otutab1 that are actually more similar to otus in otutab2 and the other way round.

I've added a test covering that specific case https://github.com/frederic-mahe/vsearch-tests/commit/8d421c49ac150823c5cb9b5c2d4cd03502acb79d

I am going to close that issue. Please feel free to re-open if need be.