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

refactor ic #20

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

MikeLippincott
Copy link
Member

This PR refactors the IC module to be more parallelized across well-FOV

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Member

@jenna-tomkinson jenna-tomkinson left a 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[ ]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend double checking this.

Comment on lines -24 to +32
# In[2]:
# In[ ]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment.

Comment on lines +76 to +101
# 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")
Copy link
Member

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!

Comment on lines 104 to 105
# ## 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.
Copy link
Member

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[ ]:
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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}}
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are tracks files?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants