motu-tool / mOTUs

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

Possible error in help for 'motus map_tax' #83

Closed mikemc closed 2 years ago

mikemc commented 2 years ago

The help for motus map_tax says

Output options:
   -o   FILE         output file name [stdout]
   -b                save the result of BWA in BAM format

which makes it sound like the -b flag should be used to specify the BAM output. However, doing so gives an error, and the published workflow instead shows that the '-o' flag should be used for the output BAM file.

AlessioMilanese commented 2 years ago

Dear @mikemc, Thanks for the comment. The way it works is as follow:

motus map_tax -s INPUT.fq

This will print to stdout a sam file, which you can for example re-direct to do some analysis:

motus map_tax -s INPUT.fq | RUN ANOTHER TOOL

Instead of going to stdout, you can save to file with the -o option. These two calls produce the same result:

motus map_tax -s INPUT.fq > RESULT.sam
motus map_tax -s INPUT.fq -o RESULT.sam

If you want to save the result in .bam format instead of .sam format, you can use:

motus map_tax -s INPUT.fq -o RESULT.sam -b

This is also specified in the Output options as -b do not have the FILE word that -o has. But I can see how this can be confusing. I will update the description of -b!

AlessioMilanese commented 2 years ago

However, doing so gives an error, and the published workflow instead shows that the '-o' flag should be used for the output BAM file.

I think you refer to:

motus map_tax -f input/ERR479298s.1.fq.gz -r input/ERR479298s.2.fq.gz -o ERR479298s-default.bam

That is a correct usage of -o. But, it should be ERR479298s-default.sam instead of ERR479298s-default.bam. It works for the whole analysis because mOTUs can use both .bam and .sam files and will understand the type automatically.

I will check how to solve this. Thanks again for the comment and for spotting this.

mikemc commented 2 years ago

Hey @AlessioMilanese, that makes sense, thanks!