Skip to content

Commit

Permalink
Fix keep_source
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBeq committed Aug 29, 2023
1 parent 512cf2a commit e93d3b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/papyrus_scripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
from .utils.mol_reader import MolSupplier
from .utils import IO, UniprotMatch

__version__ = '1.0.2'
__version__ = '1.0.3'
3 changes: 2 additions & 1 deletion src/papyrus_scripts/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ def keep_source(data: Union[pd.DataFrame, PandasTextFileReader, Iterator], sourc
return data
# Source not defined
elif set(source).difference(sources):
raise ValueError(f'Source not supported, must be one of {sources}')
# Supplied source not in data sources
return data[data.source == 'SOURCE UNAVAILABLE'] # Ensures an empty dataframe with colnames is returned
# Sources are defined
else:
# Columns with optional multiple values
Expand Down

0 comments on commit e93d3b1

Please sign in to comment.