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

Add automatic FCS file reading from FlowJo WSP files #168

Merged
merged 6 commits into from
Sep 12, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Bug fix in relative path handling for fcs file autofinding
Signed-off-by: Hersh Bhargava <hershkbhargava@gmail.com>
  • Loading branch information
hbhargava7 committed Sep 4, 2023
commit b314cd65c44ea0b99daf4032446ec73b2c04abb6
6 changes: 5 additions & 1 deletion flowkit/_models/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from bokeh.models import Title
from urllib.parse import urlparse, unquote
from urllib.request import url2pathname
from pathlib import Path
from .._conf import debug
from .._models import gates, dimension
from .._utils import plot_utils, wsp_utils, sample_utils, gating_utils
Expand Down Expand Up @@ -81,10 +82,13 @@ def uri_to_path(uri):

path = unquote(parsed.path)

# if the path is relative, join it with the wsp file's directory
if os.path.isabs(path):
return path
else:
return os.path.join(os.getcwd(), path)
# The relative path is relative to the wsp file's directory, so prepend that.
base_path = os.path.dirname(os.path.abspath(Path(wsp_file_path)))
return os.path.join(base_path, path)

if fcs_samples is not None:
warnings.warn("When `find_fcs_files_from_wsp` is True, `fcs_samples` will be ignored.")
Expand Down