Skip to content

Commit

Permalink
remove unneeded imports
Browse files Browse the repository at this point in the history
  • Loading branch information
berombau committed May 6, 2024
1 parent 666ec31 commit a08d510
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
26 changes: 17 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,40 @@ requires = ["hatchling"]
[project]
name = "flowsom"
version = "0.0.1"
description = "The complete FlowSOM package known from R, now available in Python"
description = "The complete FlowSOM package known from R, now available in Python!"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
authors = [{ name = "Artuur Couckuyt" }]
maintainers = [{ name = "Artuur Couckuyt", email = "[email protected]" }]
urls.Documentation = "https://FlowSOM.readthedocs.io/"
urls.Source = "https://github.com/artuurC/FlowSOM"
urls.Home-page = "https://github.com/artuurC/FlowSOM"
authors = [
{ name = "Artuur Couckuyt", email = "[email protected]" },
{ name = "Benjamin Rombaut", email = "[email protected]" },
{ name = "Yvan Saeys", email = "[email protected]" },
{ name = "Sofie Van Gassen", email = "[email protected]" },
]
maintainers = [
{ name = "Artuur Couckuyt", email = "[email protected]" },
{ name = "Benjamin Rombaut", email = "[email protected]" },
{ name = "Yvan Saeys", email = "[email protected]" },
{ name = "Sofie Van Gassen", email = "[email protected]" },
]
urls.Documentation = "https://flowsom.readthedocs.io/en/latest/"
urls.Source = "https://github.com/saeyslab/FlowSOM_Python"
urls.Home-page = "https://github.com/saeyslab/FlowSOM_Python"
dependencies = [
"mudata",
"numpy",
"matplotlib",
"pandas",
"scipy",
"pytometry",
"readfcs",
"scikit-learn",
"python-igraph",
"pytest",
"session-info",
"numba",
"scanpy",
"seaborn",
"readfcs",
"anndata",
"dask[dataframe]",
"loguru",
]

Expand Down
7 changes: 3 additions & 4 deletions src/flowsom/io/read_fcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import anndata as ad
import pandas as pd
import readfcs


def read_FCS(filepath):
Expand All @@ -12,16 +13,14 @@ def read_FCS(filepath):
:param filepath: An array containing a full path to the FCS file
:type filepath: str
"""
import pytometry as pm

try:
f = pm.io.read_fcs(filepath)
f = readfcs.read(filepath, reindex=True)
f.var.n = f.var.n.astype(int)
f.var = f.var.sort_values(by="n")
f.uns["meta"]["channels"].index = f.uns["meta"]["channels"].index.astype(int)
f.uns["meta"]["channels"] = f.uns["meta"]["channels"].sort_index()
except ValueError:
f = pm.io.read_fcs(filepath, reindex=False)
f = readfcs.read(filepath, reindex=False)
markers = {
str(re.sub("S$", "", re.sub("^P", "", string))): f.uns["meta"][string]
for string in f.uns["meta"].keys()
Expand Down

0 comments on commit a08d510

Please sign in to comment.