Spaces:
Sleeping
Sleeping
Commit
·
c975dff
1
Parent(s):
22626ae
Update code/add_3Dalignment.py
Browse files- code/add_3Dalignment.py +1 -11
code/add_3Dalignment.py
CHANGED
|
@@ -215,18 +215,11 @@ def get_coords(annot, alignments, coords, resnums_for_sasa, mode):
|
|
| 215 |
|
| 216 |
|
| 217 |
def get_alignments_3D(identifier, model_num, pdbSequence, source, chain, pdbID, mode,file_format = 'gzip'):
|
| 218 |
-
print('I am here get alignments 3D')
|
| 219 |
-
print(type(mode))
|
| 220 |
pdbSequence = convert_non_standard_amino_acids(pdbSequence)
|
| 221 |
-
print('AFTER')
|
| 222 |
-
print((pdbSequence))
|
| 223 |
if mode == 1:
|
| 224 |
-
print('mode')
|
| 225 |
if source != 'MODBASE':
|
| 226 |
-
print('spırce')
|
| 227 |
# Step 1: Fetch the PDB file
|
| 228 |
pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
|
| 229 |
-
print('pdb_url')
|
| 230 |
response = requests.get(pdb_url)
|
| 231 |
response.raise_for_status() # Check for a successful response
|
| 232 |
|
|
@@ -237,8 +230,7 @@ def get_alignments_3D(identifier, model_num, pdbSequence, source, chain, pdbID,
|
|
| 237 |
atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
|
| 238 |
coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
|
| 239 |
resnums_for_sasa = [i[5] for i in atoms]
|
| 240 |
-
|
| 241 |
-
print(atomSequence)
|
| 242 |
else:
|
| 243 |
pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
|
| 244 |
|
|
@@ -281,8 +273,6 @@ def get_alignments_3D(identifier, model_num, pdbSequence, source, chain, pdbID,
|
|
| 281 |
aligner.open_gap_score = -11
|
| 282 |
aligner.extend_gap_score = -1
|
| 283 |
alignments = aligner.align(pdbSequence, atomSequence)
|
| 284 |
-
print(' here is 3D alignments')
|
| 285 |
-
print(alignments)
|
| 286 |
alignments = (list(alignments))
|
| 287 |
#for alignment in alignments:
|
| 288 |
# f.write(str(alignment))
|
|
|
|
| 215 |
|
| 216 |
|
| 217 |
def get_alignments_3D(identifier, model_num, pdbSequence, source, chain, pdbID, mode,file_format = 'gzip'):
|
|
|
|
|
|
|
| 218 |
pdbSequence = convert_non_standard_amino_acids(pdbSequence)
|
|
|
|
|
|
|
| 219 |
if mode == 1:
|
|
|
|
| 220 |
if source != 'MODBASE':
|
|
|
|
| 221 |
# Step 1: Fetch the PDB file
|
| 222 |
pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
|
|
|
|
| 223 |
response = requests.get(pdb_url)
|
| 224 |
response.raise_for_status() # Check for a successful response
|
| 225 |
|
|
|
|
| 230 |
atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
|
| 231 |
coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
|
| 232 |
resnums_for_sasa = [i[5] for i in atoms]
|
| 233 |
+
|
|
|
|
| 234 |
else:
|
| 235 |
pdb_url = f"https://files.rcsb.org/download/{pdbID}.pdb"
|
| 236 |
|
|
|
|
| 273 |
aligner.open_gap_score = -11
|
| 274 |
aligner.extend_gap_score = -1
|
| 275 |
alignments = aligner.align(pdbSequence, atomSequence)
|
|
|
|
|
|
|
| 276 |
alignments = (list(alignments))
|
| 277 |
#for alignment in alignments:
|
| 278 |
# f.write(str(alignment))
|