Skip to content

Commit

Permalink
Update feat_extractor.py
Browse files Browse the repository at this point in the history
More try except.
  • Loading branch information
RobbinBouwmeester authored Sep 22, 2023
1 parent 8ba1097 commit cd0d275
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deeplc/feat_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@ def rolling_sum(a, n=2):
logger.warning(
f"Skipping the following (not in library): {peptide_position[1]}")
continue
except:
logger.warning(
f"Skipping the following (not in library): {peptide_position[1]}")
continue

for atom_position_composition,atom_change in modification_composition.items():
try:
Expand All @@ -524,8 +528,14 @@ def rolling_sum(a, n=2):
except KeyError:
logger.warning(f"Could not add the following atom: {atom_position_composition}, second attempt, now ignored")
continue
except:
logger.warning(f"Could not add the following atom: {atom_position_composition}, second attempt, now ignored")
continue
except IndexError:
logger.warning(f"Could not add the following atom: {i} {atom_position_composition} {atom_change}")
except:
logger.warning(f"Could not add the following atom: {atom_position_composition}, second attempt, now ignored")
continue


matrix_all = np.sum(matrix, axis=0)
Expand Down

0 comments on commit cd0d275

Please sign in to comment.