Spaces:
Sleeping
Sleeping
Commit
·
5244246
1
Parent(s):
514d0dc
Update code/add_3Dalignment.py
Browse files- code/add_3Dalignment.py +4 -4
code/add_3Dalignment.py
CHANGED
|
@@ -214,13 +214,13 @@ def get_coords(annot, alignments, coords, resnums_for_sasa, mode):
|
|
| 214 |
return np.NaN, np.NaN, np.NaN
|
| 215 |
|
| 216 |
|
| 217 |
-
def get_alignments_3D(identifier, model_num,
|
| 218 |
print('In Function')
|
| 219 |
pdbSequence = convert_non_standard_amino_acids(pdbSequence)
|
| 220 |
print(pdbSequence)
|
| 221 |
print(mode, source)
|
| 222 |
if mode == 1:
|
| 223 |
-
if source
|
| 224 |
# Step 1: Fetch the PDB file
|
| 225 |
pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
|
| 226 |
response = requests.get(pdb_url)
|
|
@@ -233,7 +233,7 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
|
|
| 233 |
atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
|
| 234 |
coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
|
| 235 |
resnums_for_sasa = [i[5] for i in atoms]
|
| 236 |
-
|
| 237 |
else:
|
| 238 |
atomSequence = ''
|
| 239 |
coords = []
|
|
@@ -244,7 +244,7 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
|
|
| 244 |
atomSequence += threeToOne(line[17:20].strip())
|
| 245 |
coords.append([line[31:38].strip(), line[39:46].strip(), line[47:54].strip()])
|
| 246 |
resnums_for_sasa.append(line[22:26].strip())
|
| 247 |
-
|
| 248 |
aligner.mode = 'local'
|
| 249 |
aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
|
| 250 |
aligner.open_gap_score = -11
|
|
|
|
| 214 |
return np.NaN, np.NaN, np.NaN
|
| 215 |
|
| 216 |
|
| 217 |
+
def get_alignments_3D(identifier, model_num, pdbSequence, source, chain, pdbID, mode, file_format = 'gzip'):
|
| 218 |
print('In Function')
|
| 219 |
pdbSequence = convert_non_standard_amino_acids(pdbSequence)
|
| 220 |
print(pdbSequence)
|
| 221 |
print(mode, source)
|
| 222 |
if mode == 1:
|
| 223 |
+
if source != 'MODBASE':
|
| 224 |
# Step 1: Fetch the PDB file
|
| 225 |
pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
|
| 226 |
response = requests.get(pdb_url)
|
|
|
|
| 233 |
atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
|
| 234 |
coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
|
| 235 |
resnums_for_sasa = [i[5] for i in atoms]
|
| 236 |
+
"""
|
| 237 |
else:
|
| 238 |
atomSequence = ''
|
| 239 |
coords = []
|
|
|
|
| 244 |
atomSequence += threeToOne(line[17:20].strip())
|
| 245 |
coords.append([line[31:38].strip(), line[39:46].strip(), line[47:54].strip()])
|
| 246 |
resnums_for_sasa.append(line[22:26].strip())
|
| 247 |
+
"""
|
| 248 |
aligner.mode = 'local'
|
| 249 |
aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
|
| 250 |
aligner.open_gap_score = -11
|