various aa_index_scripts

This commit is contained in:
Tanushree Tunstall 2022-06-13 09:42:48 +01:00
parent 0c316e4a41
commit bd7d01c7e6
11 changed files with 4223 additions and 202 deletions

View file

@ -15,35 +15,36 @@ import warnings
warnings.filterwarnings("ignore")
CURRENT_FOLDER = '/home/local/BHRI/sportelli/Desktop/Important_Code/structural/aaindex'
#CURRENT_FOLDER = '/home/local/BHRI/sportelli/Desktop/Important_Code/structural/aaindex'
CURRENT_FOLDER = '/home/tanu/git/LSHTM_analysis/scripts/aa_index_scripts/aaindex'
DATA_FOLDER = os.path.join(CURRENT_FOLDER,'data')
RSA_SST_DEPENDENT = {
'exposed_helix' : 'KOSJ950101',
'exposed_beta' : 'KOSJ950102',
'exposed_turn' : 'KOSJ950103',
'exposed_coil' : 'KOSJ950104',
'buried_helix' : 'KOSJ950105',
'buried_beta' : 'KOSJ950106',
'buried_turn' : 'KOSJ950107',
'buried_coil' : 'KOSJ950108',
'exposed_beta' : 'KOSJ950102',
'exposed_turn' : 'KOSJ950103',
'exposed_coil' : 'KOSJ950104',
'buried_helix' : 'KOSJ950105',
'buried_beta' : 'KOSJ950106',
'buried_turn' : 'KOSJ950107',
'buried_coil' : 'KOSJ950108',
}
SST_DEPENDENT = {
'helix' : 'KOSJ950109',
'beta' : 'KOSJ950110',
'turn' : 'KOSJ950111',
'coil' : 'KOSJ950112',
'helix' : 'KOSJ950109',
'beta' : 'KOSJ950110',
'turn' : 'KOSJ950111',
'coil' : 'KOSJ950112',
}
RSA_DEPENDENT1 = {
'exposed' : 'KOSJ950113',
'buried' : 'KOSJ950114',
'buried' : 'KOSJ950114',
}
RSA_DEPENDENT2 = {
'exposed' : 'OVEJ920104',
'buried' : 'OVEJ920105',
'buried' : 'OVEJ920105',
}
def get_environment(pdb_file, chain, position, insertion_code=' '):
@ -51,7 +52,7 @@ def get_environment(pdb_file, chain, position, insertion_code=' '):
structure = parser.get_structure(pdb_file, pdb_file)
model = structure[0]
dssp = DSSP(model, pdb_file)
dssp = DSSP(model, pdb_file, dssp='mkdssp')
dssp_key = [item for item in dssp.keys() if item[0] == chain and item[1][1] == int(position) and item[1][2] == insertion_code]
dssp_key = dssp_key[0]
@ -62,7 +63,7 @@ def get_environment(pdb_file, chain, position, insertion_code=' '):
def main():
"""
READ IMPUT
READ INPUT
"""
pdb_file = sys.argv[1]
chain_id = sys.argv[2]