-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathmain.py
26 lines (22 loc) · 1.68 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
import argparse
from prediction.prediction import run_predictions
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Ca Backbone Prediction from High Resolution CryoEM Data')
parser.add_argument('input', type=str, help='Folder containing protein maps')
parser.add_argument('output', type=str, help='Folder where prediction results will be stored')
parser.add_argument('-t', '--thresholds', metavar='Thresholds', type=str,
help='JSON file which contains the thresholds')
parser.add_argument('-s', '--skip', metavar='N', type=int, nargs=1, default=[0],
help='Number of prediction steps that should be skipped')
parser.add_argument('-c', '--check_existing', action='store_const', const=True, default=False,
help='Check if results already exists and if so skip prediction step')
parser.add_argument('-d', '--hidedusts', metavar='HideDusts', type=str,
help='JSON file which contains the hide dust sizes')
parser.add_argument('-b', '--debug', action='store_const', const=True, default=False,
help='Enter debug mode, where mrc files are kept, otherwise mrc files are deleted at end to save memory')
parser.add_argument('-p', '--chimera_path', metavar='Links', type=str,
help='location that identifies where the chimera symbolic link is')
args = parser.parse_args()
args.input += '/' if args.input[-1] != '/' else ''
args.output += '/' if args.output[-1] != '/' else ''
run_predictions(args.input, args.output, args.thresholds, args.skip[0], args.check_existing, args.hidedusts, args.debug, args.chimera_path)