ntCard icon indicating copy to clipboard operation
ntCard copied to clipboard

Setting the verbosity arguments

Open sapoudel opened this issue 3 years ago • 3 comments

Would it be possible to add verbosity argument to the CLI to repress writing to stdout? I am running this over many gene clusters so the outputs start to add up quickly.

Capture

sapoudel avatar Apr 20 '21 00:04 sapoudel

Certainly, I will work on this as soon as possible.

jwcodee avatar Apr 20 '21 23:04 jwcodee

could this output not be redirected to /dev/null as a simple solution ?

warrenlr avatar Apr 20 '21 23:04 warrenlr

@warrenlr That was my first thought too. I am trying to integrate it into a larger python pipeline. With this setup, I tried redirecting it to /dev/null/ like this:

import subprocess

def run_ntcard(kmer, outfile, fasta_file):

     nt_cmd = ['ntcard', '-t', '1', '-k',  kmer, '-o', outfile, fasta_file]

     subprocess.call(nt_cmd, stdout=subprocess.DEVNULL)

Unfortunately, this only redirects the python output to DEVNULL and not the output from the called ntcard. In any case, this is more of an annoyance than anything so I would put it at pretty low priority. I assumed it would be fairly easy to implement.

sapoudel avatar Apr 21 '21 03:04 sapoudel