forked from fak/mapChEMBLPfam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaster.py
executable file
·60 lines (47 loc) · 1.7 KB
/
master.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
"""
Function: master
Goes through all necessary steps.
--------------------
Author:
Felix Kruger
"""
def master(release, user, pword, host, port):
## Get all human protein coding genes from ensembl and a count of all uniqe domains.
import os
import pfamDomains
import mapPfamDomains
import pdbChembl
import uniprotChembl
import analysis
import yaml
# Read config file.
paramFile = open('mpf.yaml')
params = yaml.safe_load(paramFile)
user = params['user']
pword = params['pword']
host = params['host']
port = params['port']
th = params['threshold']
# Get Uniprot identifiers for all human proteins.
os.system("R CMD BATCH --vanilla queryBioMaRt.R")
# Map Pfam domains and positions to all Uniprot identifiers.
#pfamDomains.pfamDomains(release, user, pword, host, port)
# Map small molecule binding to Pfam domains.
mapPfamDomains.mapPDs(th, release, user, pword, host, port)
# Get all ChEMBL interactions in PDB and binding site residues.
#pdbDict = pdbChembl.query(release, user, pword, host, port)
# Get all ChEMBL interactions in Uniprot and binding site annotation.
#uniprotDict = uniprotChembl.query(release, user, pword, host, port)
# Analyze the data.
#analysis.analysis(th, release, user, pword, host, port)
if __name__ == '__main__':
import sys
if len(sys.argv) < 5: # the program name and the two arguments
sys.exit("Must specify release, user, pword, host, port")
release = sys.argv[1]
user = sys.argv[2]
pword = sys.argv[3]
host = sys.argv[4]
port = int(sys.argv[5])
master(release, user, pword, host, port)