-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor ic #20
base: main
Are you sure you want to change the base?
refactor ic #20
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉 I had a few questions and comments, but feel free to merge when ready!
# In[1]: | ||
# In[ ]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend double checking this.
# In[2]: | ||
# In[ ]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment.
# get the list of dirs in the raw_data_path | ||
dirs = [x for x in preprocessed_data_path.iterdir() if x.is_dir()] | ||
# get the list of all dirs in the dir | ||
for dir in dirs: | ||
# get the list of all dirs in the dir | ||
subdirs = [x for x in dir.iterdir() if x.is_dir()] | ||
for subdir in subdirs: | ||
run_name = f"{dir.name}_{subdir.name}" | ||
if "4ch" in dir.name: | ||
dict_of_inputs[run_name] = { | ||
"path_to_images": pathlib.Path(subdir).resolve(strict=True), | ||
"path_to_output": pathlib.Path(illum_directory / run_name).resolve(), | ||
"path_to_pipeline": pathlib.Path( | ||
"../pipelines/illum_4ch.cppipe" | ||
).resolve(), | ||
} | ||
elif "2ch" in dir.name: | ||
dict_of_inputs[run_name] = { | ||
"path_to_images": pathlib.Path(subdir).resolve(strict=True), | ||
"path_to_output": pathlib.Path(illum_directory / run_name).resolve(), | ||
"path_to_pipeline": pathlib.Path( | ||
"../pipelines/illum_2ch.cppipe" | ||
).resolve(), | ||
} | ||
else: | ||
ValueError("The directory name does not contain 2ch or 4ch") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love seeing this more automated!
# ## Run `illum.cppipe` pipeline and calculate + save IC images | ||
# This last cell does not get run as we run this pipeline in the command line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend confirming if the IC images are saved or the npy function, just in case.
# In[1]: | ||
# In[ ]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment
# There are two channels in the terminal dataset: | ||
# Channel 1: DAPI | ||
# Channel 5: Annexin V | ||
# | ||
# Note that Channel 5 does not exists in the main dataset (13 time points), only the terminal timepoints. | ||
# Note that Channel 5 does not exists in the first 13 time points only the terminal timepoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Note that Channel 5 does not exists in the first 13 time points only the terminal timepoints. | |
# Note that Channel 5 does not exist in the first 13 time points, only the terminal time points. |
@@ -0,0 +1 @@ | |||
{"data_config": {"n_workers": 1, "working_dir": ".", "database": "sqlite", "address": null}, "segmentation_config": {"min_area": 30, "max_area": 1250, "n_workers": 8, "min_frontier": 0.0, "threshold": 0.5, "max_noise": 0.0, "ws_hierarchy": "area", "anisotropy_penalization": 0.0}, "linking_config": {"max_distance": 45, "n_workers": 8, "max_neighbors": 5, "distance_weight": 0.0, "z_score_threshold": 5.0}, "tracking_config": {"solver_name": "CBC", "appear_weight": -1, "disappear_weight": -1, "division_weight": -0.1, "n_threads": -1, "window_size": null, "overlap_size": 1, "solution_gap": 0.0, "time_limit": 36000, "method": 0, "link_function": "power", "power": 4, "bias": -0.001, "dismiss_weight_guess": null, "include_weight_guess": null}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there is a no new endline error here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are tracks files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this file?
This PR refactors the IC module to be more parallelized across well-FOV