Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more unixish behavior #16

Open
UnixJunkie opened this issue Oct 2, 2021 · 3 comments
Open

more unixish behavior #16

UnixJunkie opened this issue Oct 2, 2021 · 3 comments

Comments

@UnixJunkie
Copy link
Contributor

Hello,

The default behavior should be the filter command (because the other commands
should only rarely be used).
-i: input file
-o: output file, same file format than the input (i.e. molecules that passed all filters).
Filtered out molecules should be sent to stderr, or at least go to <input_fn>.errors (but this is less unixish).

I could contribute this if you are interested, but I need to look at the code and code quality to see if this can easily be done.

Regards,
F.

@PatWalters
Copy link
Owner

I agree that the command line interface needs to be revamped. What about something like this? It would do away with the config file and allow users to specify variations from the defaults on the command line.

Usage:
rd_filters -i INPUT_FILE -o OUTPUT_FILE [--alert ALERT_SET][--cfg CONFIG_FILE][--rdalert ALERT_FILE][--np NUM_CORES]
[--mw MW_LIMIT][--logp LOGP_LIMIT][--hbd HBD_LIMIT][--hba HBA_LIMIT][--tpsa TPSA_LIMIT][--filter FILTER_NAME]
rd_filters --wrconfig CONFIG_FILE
rd_filters --show

Options:
-i --in INPUT_FILE input file name
-o --out OUTPUT_FILE output file name, rule failures go to OUTPUT_FILE.err
--alert ALERT_SET_NAME specify structural alert set to use 
--cfg CONFIG_FILE read a configuration file with settings
--rdalert ALERT_FILE read structural alerts from a file
--np NUM_CORES the number of cpu cores to use (default is all)
--mw MW_LIMIT molecular weight limit, input in quotes, default "0 500"
--logp LOGP_LIMIT logp limit, input in quotes, default "0 5"
--hbd HBD_LIMIT hydrogen bond donor limit, input in quotes, default "0 5"
--hba HBA_LIMIT, hydrogen bond acceptor limit, input in quotes, default "0 10"
--rot ROTOR_LIMIT, rotatable bond limit, input in quotes, default "0 10"
--tpsa TPSA_LIMIT, topological polar surface area limit, 
--wrconfig CONFIG_FILE write a configuration file with the defaults settings
--show  show available structural alert sets

@UnixJunkie
Copy link
Contributor Author

I think it's great.
On Unix: {-i|--input}, {-o|--output}; yes, openeye has it wrong too.
Default input should be stdin; default output stdout.
Importantly: we must accept eventually several --alert options on the command-line (maybe: {-a,--alerts}).

@PatWalters
Copy link
Owner

PatWalters commented Oct 5, 2021

Updated, I'll create a fork this weekend.

Usage:
rd_filters [-i INPUT_FILE] [-o OUTPUT_FILE] [-a ALERT_SET][--cfg CONFIG_FILE][--rdalert ALERT_FILE][--np NUM_CORES]
[--mw MW_LIMIT][--logp LOGP_LIMIT][--hbd HBD_LIMIT][--hba HBA_LIMIT][--tpsa TPSA_LIMIT][--filter FILTER_NAME]
rd_filters --wrconfig CONFIG_FILE
rd_filters --show

Options:
-i --input INPUT_FILE input file name, defaults to stdin
-o --output OUTPUT_FILE output file name, rule failures go to OUTPUT_FILE.err, defaults to stdout and stderr
-a --alert ALERT_SET_NAME specify structural alert set to use, multiple sets can be specified in quotes e.g. "bms glaxo"
--cfg CONFIG_FILE read a configuration file with settings
--rdalert ALERT_FILE read structural alerts from a file
--np NUM_CORES the number of cpu cores to use (default is all)
--mw MW_LIMIT molecular weight limit, input in quotes, default "0 500"
--logp LOGP_LIMIT logp limit, input in quotes, default "0 5"
--hbd HBD_LIMIT hydrogen bond donor limit, input in quotes, default "0 5"
--hba HBA_LIMIT, hydrogen bond acceptor limit, input in quotes, default "0 10"
--rot ROTOR_LIMIT, rotatable bond limit, input in quotes, default "0 10"
--tpsa TPSA_LIMIT, topological polar surface area limit, default "0 200"
--wrconfig CONFIG_FILE write a configuration file with the defaults settings
--show  show available structural alert sets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants