muellan / metacache

memory efficient, fast & precise taxnomomic classification system for metagenomic read mapping

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

separator not properly handled in the output

leoqiang opened this issue · comments

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

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.

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'.

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.

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

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