-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.py
executable file
·45 lines (36 loc) · 1.67 KB
/
project.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/python
# -*- coding: utf-8 -*-
# PBI - Projekt, varianta B
#
# project.py - Identifikace spolecnych strukturnich elementu vysetrovanych
# proteinu, jejich spojeni do vetsich celku a jejich zobrazeni na
# libovolnem proteinu.
#
# Autor: Jaroslav Bendl, xbendl00
#
import sys
from parameter import Parameter
from record import Record
from strElementFinder import StrElementFinder
from strElementJoiner import StrElementJoiner
def main():
"""Ridi cinnost programu."""
# Nacte seznam vysetrovanych proteinu a zajisti jejich dostupnost ve slozce proteins
param = Parameter("configuration.txt")
proteinList = param.getProteinList()
# Ziskani strukturnich elementu a jejich ulozeni do souboru
strElemFinder = StrElementFinder(param.angstromDist)
strElemList = strElemFinder.getStructureElements(proteinList)
print "> Identifikace spolecnych strukurnich elementu probehla uspesne."
strElemFinder.saveElements(param.outputFile1)
print "> Seznam spolecnych strukturnich elementu byl ulozen do souboru: " + param.outputFile1
# Ziskani strukturnich celku a jejich ulozeni do souboru
strElemJoiner = StrElementJoiner()
strElemJoiner.getStructureUnits(strElemList)
bestUnitList = strElemJoiner.getBestStructureUnits(param.unitCount)
print "> Identifikace strukurnich celku probehla uspesne."
strElemJoiner.saveBestStructureUnits(param.outputFile2, bestUnitList)
proteinPath = param.getShowProteinPath()
strElemJoiner.showBestStructureUnits(bestUnitList, param.showProteinId, proteinPath)
print "> Seznam nejvesich strukturnich celku byl ulozen do souboru: " + param.outputFile2
main() # GO!