mhcnuggets icon indicating copy to clipboard operation
mhcnuggets copied to clipboard

Feature request: allow for silent/verbose mode

Open richelbilderbeek opened this issue 4 years ago • 3 comments

Dear MHCnuggets maintainer,

I have written a package to call MHCnuggets from R. However, when I call the predict function, MHCnuggets produces output, which (1) I cannot prevent, and (2) clutters the log files. Taking a look at the code, one can observe that there are no if statements around the output.

I suggest to add a silent/verbose mode, so that it is possible to run MHCnuggets without having output.

richelbilderbeek avatar Jun 02 '20 07:06 richelbilderbeek

@XiaoshanShao: has this been closed because it is implemented or because it will not be?

richelbilderbeek avatar Sep 28 '20 11:09 richelbilderbeek

I believe mhcnuggets' output only goes to log file if you did not provide an output path to it under the output flag as shown in this section of the code:

if output: filehandle = open(output, 'w') else: filehandle = sys.stdout

Do you wish to not output indication message such as which alleles it is predicting against or how many peptides it is predicting?

XiaoshanShao avatar Sep 29 '20 00:09 XiaoshanShao

I believe mhcnuggets' output only goes to log file if you did not provide an output path to it under the output flag [...]

Yes, that is correct.

Do you wish to not output indication message such as which alleles it is predicting against or how many peptides it is predicting?

Yes, that is where I was referring to: I would enjoy to run MHCnuggets without any output. Here is an example from my log files:

Predicting for 2616 peptides
Number of peptides skipped/total due to length 0 / 0
Building model
Closest allele found HLA-A01:01
BA_to_HLAp model found, predicting with BA_to_HLAp model...
Using TensorFlow backend.

richelbilderbeek avatar Sep 29 '20 12:09 richelbilderbeek