-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
65 lines (57 loc) · 1.74 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# from src.concerto_fp import get_biosynfoni
# from src.tests import tsne
import argparse
parser = argparse.ArgumentParser(description="obtain the biosynfoni of molecule(s)")
parser.add_argument(
"molecule(s)",
metavar="mol",
type=str,
nargs="+",
help="molecule representation to get biosynfoni of",
)
def main():
# required arguments -----------------------------------------------------
parser.add_argument(
"-i",
"--input",
type=str,
required=True,
help="path to molecule supplier, or smiles/InChI string if -s or - is specified.",
)
# optionals --------------------------------------------------------------
# --output--
parser.add_argument(
"-o",
"--output",
type=str,
required=False,
help="Path to output tsv file. If not specified, will use outfile_namer",
)
# --representation--
parser.add_argument(
"-r",
"--representation",
type=str,
help="specify the input type of the molecule(s). If molsupplier, choose sdf (default)",
action="store_true",
default="sdf",
choices=["sdf", "smiles", "inchi"], # "sdfgz", "sdfbz2", "sdfzip"],
)
# -- coverage --
parser.add_argument(
"-c",
"--coverage",
type=bool,
required=False,
default=False,
help="specify if you want an output of the coverage of the biosynfoni",
)
# flags ------------------------------------------------------------------
parser.add_argument(
"--header",
action="store_true",
help="Flag to indicate that input file contains header.",
)
args = parser.parse_args()
print(args)
# print(args.accumulate(args.integers))