Skip to content

Commit

Permalink
Merge pull request #66 from compomics/psm_reading_error
Browse files Browse the repository at this point in the history
remove error from parsing
  • Loading branch information
RalfG authored Mar 4, 2024
2 parents 3d88c2f + 0622a60 commit 329b1e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion psm_utils/io/tsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

import ast
import csv
import logging
from pathlib import Path
from typing import Optional

Expand All @@ -59,6 +60,8 @@
from psm_utils.psm import PSM
from psm_utils.psm_list import PSMList

logger = logging.getLogger(__name__)


class TSVReader(ReaderBase):
"""Reader for psm_utils TSV format."""
Expand All @@ -71,7 +74,8 @@ def __iter__(self):
try:
yield PSM(**self._parse_entry(row))
except ValidationError as e:
raise PSMUtilsIOException(f"Could not parse PSM from row: `{row}`") from e
logger.warning("Could not parse PSM from row: `{row}`")
continue

@staticmethod
def _parse_entry(entry: dict) -> dict:
Expand Down

0 comments on commit 329b1e3

Please sign in to comment.