Skip to content

Commit

Permalink
#230: apply formatting bt pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Jun 17, 2024
1 parent 8f63967 commit d655097
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions alphadia/grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def group_and_parsimony(
----------
precursor_idx : np.array[int]
Array containing unique integer indices corresponding to each peptide precursor
precursor_ids : np.array[str]
precursor_ids : np.array[str]
Array of variable length semicolon separated str belonging to a given peptide precursor id
Returns
Expand Down Expand Up @@ -91,7 +91,7 @@ def group_and_parsimony(
# check that all return_dict keys are unique. Assume same length and unique keys constitutes match to precursor_idx
if len(return_dict) != len(set(return_dict.keys())):
raise ValueError(
"""Not all precursors were found in the output of the grouping function.
"""Not all precursors were found in the output of the grouping function.
Duplicate precursors were found."""
)

Expand Down Expand Up @@ -125,7 +125,7 @@ def perform_grouping(
Returns
-------
pd.DataFrame :
pd.DataFrame :
Precursor table with grouped proteins
"""
Expand All @@ -144,7 +144,7 @@ def perform_grouping(
# TODO: consider removing check for duplicates since duplicate masking is implemented above
if upsm.duplicated(subset=["precursor_idx"]).any():
raise ValueError(
"""The same precursor was found annotated to different proteins.
"""The same precursor was found annotated to different proteins.
Please make sure all precursors were searched with the same library."""
)

Expand Down
4 changes: 3 additions & 1 deletion alphadia/outputaccumulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ def parse_output_folder(

# ----------------- Fragment -----------------
# Filer fragments that are not used in the precursors
frag_df = frag_df[frag_df["precursor_idx"].isin(self._precursor_df["precursor_idx"])]
frag_df = frag_df[
frag_df["precursor_idx"].isin(self._precursor_df["precursor_idx"])
]
self._fragment_df = frag_df[
["mz", "intensity", "precursor_idx", "frag_idx", "correlation"]
].copy()
Expand Down

0 comments on commit d655097

Please sign in to comment.