I started today learning nim, so any kind of suggestion is welcome.
I tried using argparse thinking its similarity with Python's library would make my life easy.
I'd like to have an application with this interface:
tool [options] File1 File2 ... FileN
my parser object is like:
var p = newParser(prog):
help("Dereplicate FASTA (and FASTQ) files, print dereplicated sorted by cluster size with ';size=NNN' decoration.")
flag("-k", "--keep-name", help="Do not rename sequence, but use the first sequence name")
flag("-i", "--ignore-size", help="Do not count 'size=INT;' annotations (they will be stripped in any case)")
option("-m", "--min-size", help="Print clusters with size equal or bigger than INT sequences", default="0")
option("-p", "--prefix", help = "Sequence name prefix", default = "seq")
option("-s", "--separator", help = "Sequence name separator", default = ".")
flag("-c", "--size-as-comment", help="Print cluster size as comment, not in sequence name")
arg("inputfile", help="Input file")
I'm looking for something like nargs="+", but from what I understand an integer is expected, and I didn't get how to specify an arbitrary number of inputs.
Thanks!
PS:
- The tool I'm using to experiment is here