Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error with multiline formatted warnings #44

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Changelog

## Version 0.2.4
## Version 0.2.4 - 0.2.5

- Provide options to consistently extract cell metadata columns across datasets.
- Provide options to extract an expected set of cell metadata columns across datasets.
- Update documentation and tests.

## Version 0.2.1 - 0.2.3
Expand Down
11 changes: 2 additions & 9 deletions src/cellarr/build_cellarrdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,7 @@ def build_cellarrdataset(
####
if gene_annotation is None:
warnings.warn(
(
"Scanning all files for feature ids (e.g. gene symbols) and cell annotations, this may take long, ",
"Please also make sure you have enough memory.",
),
"Scanning all files for feature ids (e.g. gene symbols) and cell annotations, this may take long, Please also make sure you have enough memory.",
UserWarning,
)

Expand Down Expand Up @@ -384,11 +381,7 @@ def build_cellarrdataset(
)

warnings.warn(
(
"'cell_metadata' csv file is expected to contain mapping between cells and samples",
"especially 'cellarr_sample' (which sample the cell comes from) and ",
"'cellarr_cell_index_in_sample' (index of the cell within the sample) columns.",
),
"'cell_metadata' csv file is expected to contain mapping between cells and samples especially 'cellarr_sample' (which sample the cell comes from) and 'cellarr_cell_index_in_sample' (index of the cell within the sample) columns.",
UserWarning,
)
elif isinstance(cell_metadata, pd.DataFrame):
Expand Down