motu-tool / mOTUs

motus - a tool for marker gene-based OTU (mOTU) profiling
GNU General Public License v3.0
144 stars 24 forks source link

Output mode with individual read assignments? #80

Closed sjaenick closed 2 years ago

sjaenick commented 2 years ago

Hi,

within our MGX framework, we'd like to also include mOTUs for taxonomic profiling. However, MGX works in a way where individual metagenome reads are taxonomically annotated, and since motus profile only outputs a summary profile, we can't directly include it.

Would it be possible to provide a subcommand to mOTUs that outputs individual read assignments with full lineage (-A) similar to what MetaPhlAn does? (Also, NCBI taxids would be nice to have..)

Thanks!

AlessioMilanese commented 2 years ago

Hi @sjaenick,

Thanks for your interest in mOTUs! If I understand correctly you are trying to assign a taxonomy to each read. This will not work for mOTUs because we use only a fraction of the reads, but for MetaPhlAn you should have the same problem (unless you are interested only in the reads that map to the adtabase).

A solution would be to use the -I option. This would save the samtools result to a bam file, but it would not solve your problem. Internally we split reads into unique and multiple mappers. If a read map to multiple mOTUs (multiple mapper), it is counted for multiple mOTUs. Hence there is not a fix map read X --> species Y. It might be possible to haev this for unique mappers.

sjaenick commented 2 years ago

Just to clarify - yes, we assign taxa to individual reads, but having assignments for only a subset of reads is perfectly fine.

I was not aware that reads could be assigned to more than one species, thanks for the explanation.

AlessioMilanese commented 2 years ago

I can let you know if we implement this. We were anyway considering this as a possible update.