-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
47 lines (32 loc) · 1002 Bytes
/
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 7 14:19:41 2021
@author: anderjackf
"""
from appparams import AppParams
import file_iterators as fi
def main():
params_manager = AppParams()
params = params_manager.get_params()
########print('using params:',params)
#Se extraen los parametros del usuario
data_path=params["data"]
id_dict=params["id"]
query=params["query"][0]
#El query "proteinseq" se maneja diferente pues tiene un codigo de
#acceso que debe buscarse
if "proteinseq" in query:
protseq=query[11:]
query=query[:10]
else:
protseq=0
########print(protseq,query)
#Dependiendo de la presencia de la opcion "id" la busqueda se maneja de
#forma diferente.
if len(id_dict) == 1:
fi.cycler_id(data_path,query,id_dict,protseq)
elif len(id_dict) == 0:
fi.cycler_full(data_path,query,protseq)
if __name__ == '__main__':
main()