muellan / metacache

memory efficient, fast & precise taxnomomic classification system for metagenomic read mapping
GNU General Public License v3.0
57 stars 12 forks source link

separator not properly handled in the output #7

Closed leoqiang closed 4 years ago

leoqiang commented 5 years ago

I tried to use tab as separator to set '-separator "\t"' parameter for query. However, the control sequence '\t' is literally printed in the output, instead of converted into tab.

e.g., ERR024951.132\tspecies\tKlebsiella pneumoniae\t573

leoqiang commented 5 years ago

I finally set the separator properly by using "$'\t'". However, it might be much easier if "\t" or '\t' can be directly supported as in the other language.

muellan commented 5 years ago

Your shell (e.g., Bash) handles, how the command line argument characters are passed to an application. I as application developer don't have any influence on that. You have to use whatever convention your shell requires. In Bash that would be $'\t'.

muellan commented 5 years ago

Well, maybe I could postprocess the command line args and replace \t with a tab character. I guess that would be more comfortable for users.

leoqiang commented 5 years ago

Although I figure it out, the modification will surely benefit general users. Thanks.

muellan commented 4 years ago

Finally added code (see this commit) that sanitizes the input of the -separator <string> option which resolves this issue.