Skip to content

Commit

Permalink
💚 Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun committed Jan 22, 2025
1 parent 23bc8c3 commit 9a99967
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions readfcs/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ class ReadFCS:
Index of retrieved data set in the fcs file.
"""

def __init__(self, filepath: Union[str, Path], data_set: int | None = None) -> None:
def __init__(
self, filepath: Union[str, Path], data_set: Union[int, None] = None
) -> None:
# FlowIO makes all keys lowercase in .text
if data_set is not None:
self._flow_data = flowio.read_multiple_data_sets()[data_set]

Check warning on line 101 in readfcs/_core.py

View check run for this annotation

Codecov / codecov/patch

readfcs/_core.py#L101

Added line #L101 was not covered by tests
Expand Down Expand Up @@ -128,7 +130,7 @@ def __init__(self, filepath: Union[str, Path], data_set: int | None = None) -> N
@property
def header(self) -> dict:
"""Header."""
return self._meta["header"]
return self._header

@property
def channels(self) -> pd.DataFrame:
Expand Down Expand Up @@ -254,7 +256,7 @@ def read(filepath, reindex=True) -> ad.AnnData:
return fcsfile.to_anndata(reindex=reindex)


def view(filepath: Union[str, Path], data_set: int | None = None) -> tuple:
def view(filepath: Union[str, Path], data_set: Union[int, None] = None) -> tuple:
"""Read in file content without preprocessing for debugging.
Args:
Expand Down

0 comments on commit 9a99967

Please sign in to comment.