forked from DrDongSi/Ca-Backbone-Prediction
-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.py
25 lines (21 loc) · 1.54 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
import argparse
import os
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=os.path.abspath, help='Folder containing protein maps')
parser.add_argument('output', type=os.path.abspath, 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')
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)