Spaces:
Sleeping
Sleeping
Commit
·
c4654ab
1
Parent(s):
83997e9
Update code/add_alignment.py
Browse files- code/add_alignment.py +4 -4
code/add_alignment.py
CHANGED
@@ -9,7 +9,7 @@ from Bio.pairwise2 import format_alignment
|
|
9 |
def do_alignment(identifier, uniprotSequence, pdbSequence, alignment_path):
|
10 |
print(f'Aligning Datapoint: {identifier}')
|
11 |
if len(pdbSequence) >= 1:
|
12 |
-
f = open(Path(alignment_path / f'{identifier}_alignment.txt'),"w")
|
13 |
aligner.mode = 'local'
|
14 |
aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
|
15 |
aligner.open_gap_score = -11
|
@@ -18,9 +18,9 @@ def do_alignment(identifier, uniprotSequence, pdbSequence, alignment_path):
|
|
18 |
alignments = (list(alignments))
|
19 |
alignment_list = []
|
20 |
for alignment in alignments:
|
21 |
-
f.write(str(alignment))
|
22 |
-
f.write('\n')
|
23 |
-
f.write('\n')
|
24 |
alignment = (str(alignment).strip().split('\n'))
|
25 |
alignment = [''.join(['.' if m == ' ' else m for m in x]) for x in alignment]
|
26 |
alignment_list.append(alignment)
|
|
|
9 |
def do_alignment(identifier, uniprotSequence, pdbSequence, alignment_path):
|
10 |
print(f'Aligning Datapoint: {identifier}')
|
11 |
if len(pdbSequence) >= 1:
|
12 |
+
#f = open(Path(alignment_path / f'{identifier}_alignment.txt'),"w")
|
13 |
aligner.mode = 'local'
|
14 |
aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
|
15 |
aligner.open_gap_score = -11
|
|
|
18 |
alignments = (list(alignments))
|
19 |
alignment_list = []
|
20 |
for alignment in alignments:
|
21 |
+
#f.write(str(alignment))
|
22 |
+
#f.write('\n')
|
23 |
+
#f.write('\n')
|
24 |
alignment = (str(alignment).strip().split('\n'))
|
25 |
alignment = [''.join(['.' if m == ' ' else m for m in x]) for x in alignment]
|
26 |
alignment_list.append(alignment)
|