Skip to content
Open
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
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ requires = [ "hatchling" ]

[project]
name = "flowsom"
version = "0.2.2"
version = "0.2.3"
description = "The complete FlowSOM package known from R, now available in Python!"
readme = "README.md"
license = { file = "LICENSE" }
maintainers = [
{ name = "Artuur Couckuyt", email = "Artuur.Couckuyt@ugent.be" },
{ name = "Benjamin Rombaut", email = "Benjamin.Rombaut@ugent.be" },
{ name = "Robbe Fonteyn", email = "Robbe.Fonteyn@ugent.be" },
{ name = "Yvan Saeys", email = "Yvan.Saeys@UGent.be" },
{ name = "Sofie Van Gassen", email = "Sofie.VanGassen@UGent.be" },
]
Expand Down
14 changes: 8 additions & 6 deletions src/flowsom/pp/fcs_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
from flowsom.tl import get_markers


def aggregate_flowframes(filenames, c_total, channels=None, keep_order=False):
def aggregate_flowframes(files, c_total, channels=None, keep_order=False):
"""Aggregate multiple FCS files together.

:param filenames: An array containing full paths to the FCS files
:type filenames: np.array
:param files: An array/list containing full paths to the FCS files or fcs files as anndata objects
:type files: np.array
:param c_total: Total number of cells to write to the output file
:type c_total: int
:param channels: Channels/markers to keep in the aggregate. Default None
Expand All @@ -26,12 +26,14 @@ def aggregate_flowframes(filenames, c_total, channels=None, keep_order=False):
new file. Default = False.
:type silent: boolean.
"""
nFiles = len(filenames)
nFiles = len(files)
cFile = int(np.ceil(c_total / nFiles))

flow_frame = []
for i, file_path in enumerate(filenames):
f = read_FCS(file_path)
for i, f in enumerate(files):
if not isinstance(f, ad.AnnData):
f = read_FCS(f)

if channels is not None:
f = f[:, list(get_markers(f, channels).keys())]
cPerFile = min([f.X.shape[0], cFile])
Expand Down
Loading