Skip to content

Commit 5896ab5

Browse files
committed
fixed indentation
1 parent a26c039 commit 5896ab5

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

biopandas/align/tmalign.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -189,30 +189,30 @@ def run_tmalign(self, target: str, mobile: str, matrix_file_path: str=None) -> (
189189

190190

191191
def tmalign_in_stack(self, stack: PandasPdbStack, mobile_chains: dict, target: str=None) -> (PandasPdbStack, dict):
192-
"""For doing TMalign inside a stack, with one of its entries
193-
:param stack: PandasPdbStack with the structures to align. All of them must have only one chain!
194-
:param target: the target structure to align to. If not provided, the first structure in the stack will be used.
192+
"""For doing TMalign inside a stack, with one of its entries
193+
:param stack: PandasPdbStack with the structures to align. All of them must have only one chain!
194+
:param target: the target structure to align to. If not provided, the first structure in the stack will be used.
195195
196-
:return: matrix_file_path, tm_score
197-
"""
196+
:return: matrix_file_path, tm_score
197+
"""
198198

199-
# if target is provided, check if it is in the stack and use it as the target
200-
if target:
201-
if target not in stack.pdbs:
202-
raise ValueError("Target not found in the stack!")
203-
else:
204-
target_pdb_id = target
205-
else:
206-
# get one structure from the stack - this will be the target. sort by alphabet
207-
target_pdb_id = sorted(stack.pdbs.keys())[0]
199+
# if target is provided, check if it is in the stack and use it as the target
200+
if target:
201+
if target not in stack.pdbs:
202+
raise ValueError("Target not found in the stack!")
203+
else:
204+
target_pdb_id = target
205+
else:
206+
# get one structure from the stack - this will be the target. sort by alphabet
207+
target_pdb_id = sorted(stack.pdbs.keys())[0]
208208

209-
target_pdb = stack.pdbs[target_pdb_id]
210-
target_chain_id = target_pdb.df['ATOM']['chain_id'].unique()[0]
209+
target_pdb = stack.pdbs[target_pdb_id]
210+
target_chain_id = target_pdb.df['ATOM']['chain_id'].unique()[0]
211211

212-
mobile_pdbs = PandasPdbStack()
213-
mobile_pdbs.pdbs = {pdb_id: pdb for pdb_id, pdb in stack.pdbs.items() if pdb_id != target_pdb_id}
212+
mobile_pdbs = PandasPdbStack()
213+
mobile_pdbs.pdbs = {pdb_id: pdb for pdb_id, pdb in stack.pdbs.items() if pdb_id != target_pdb_id}
214214

215-
# align the structures
216-
transformed_structures, tm_scores = self.tmalign_to(target_pdb, mobile_pdbs, target_chain_id, mobile_chains)
215+
# align the structures
216+
transformed_structures, tm_scores = self.tmalign_to(target_pdb, mobile_pdbs, target_chain_id, mobile_chains)
217217

218-
return target_pdb_id, transformed_structures, tm_scores
218+
return target_pdb_id, transformed_structures, tm_scores

0 commit comments

Comments
 (0)