update check_and_log_sequence_issues
This commit is contained in:
@@ -168,18 +168,6 @@ class PDBAnalyzer:
|
||||
except KeyError:
|
||||
# 如果没有CA原子,返回一个很大的值表示距离无穷大
|
||||
return float('inf')
|
||||
|
||||
def judge_missing_or_error(self,structure, chain_id, detailed_seq):
|
||||
# 这里的detailed_seq是从extract_sequences(detailed=True)获取的
|
||||
for i in range(len(detailed_seq)-1):
|
||||
current_res, next_res = detailed_seq[i][0], detailed_seq[i+1][0]
|
||||
distance = self.calculate_distance(structure, chain_id, current_res, next_res)
|
||||
# 根据距离判断和逻辑处理
|
||||
|
||||
def renumber_based_on_judgement(self, chain_id, detailed_seq):
|
||||
# 实现基于前面的判断逻辑来重新编号的代码
|
||||
...
|
||||
|
||||
|
||||
@classmethod
|
||||
def cleanATOM(cls, input_file: Path, out_file: Path = None, ext: str = ".clean.pdb") -> 'PDBAnalyzer':
|
||||
@@ -234,7 +222,8 @@ class PDBAnalyzer:
|
||||
if (min_expected_dist <= distance <= max_expected_dist):
|
||||
self.logger.info(f"Potential missing residue in chain {chain_id} between residues {prev_res[0]} and {next_res[0]}")
|
||||
else:
|
||||
self.logger.warning(f"Wrong sequence numbering in chain {chain_id} between residues {prev_res[0]} and {next_res[0]}")
|
||||
missing_number = int(np.round(distance / 3.8 ) - 1)
|
||||
self.logger.warning(f"Wrong sequence numbering in chain {chain_id} between residues {prev_res[0]} and {next_res[0]}, distance: {distance:.2f} Å, missing residue number: {missing_number}")
|
||||
|
||||
@classmethod
|
||||
def renumber_residues_based_on_issues_and_clean(cls, input_file: Path, out_ext: str = ".renumbered.pdb", chains: Union[List[str], str, None] = None) -> 'PDBAnalyzer':
|
||||
|
||||
Reference in New Issue
Block a user