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

Blobdetect lc #15

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

Blobdetect lc #15

wants to merge 2 commits into from

Conversation

Karl5766
Copy link
Contributor

@Karl5766 Karl5766 commented Oct 3, 2024

Integrating the masked global labeling pipeline into SPIMquant.

(This PR is based on the other PR that hasn't been merged)

A bit unsure what parameters to define for the rule negatively_masked_counting in blobdetect.smk: The mask file is a tiff that may need to be rescaled to fit the size of the image. The tmp_path is a place for storing cached files but in the snakebids file I'm not sure if any folder specified there is used for temporary files.

Probably will make some changes later depending on what need to be done in order for this PR to be suitable for merge.

@Karl5766 Karl5766 force-pushed the blobdetect-lc branch 2 times, most recently from c26f0ac to 2e2e12c Compare October 4, 2024 16:54
"""
input:
zarr='/path_to_bids_root/bids/sub-onuska21/micr/sub-onuska21_sample_brain_acq-prestitched_SPIM.ome.zarr?slices=[1]',
neg_mask='/path_to_bids_root/resources/onuska21_patched.tiff',
Copy link
Member

Choose a reason for hiding this comment

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

I know still a work-in-progress, but we should use a different format for the neg_mask -- either ome.zarr or nifti (and use zarrnii to get in the same space)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the pointer! I was wondering which format would work better in this case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a rescaling component on the original OME ZARR image? Or only neg_mask is scaled but the OME ZARR is kept as scale=diag(1, 1, 1, 1)

Copy link
Member

Choose a reason for hiding this comment

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

Is there a rescaling component on the original OME ZARR image? Or only neg_mask is scaled but the OME ZARR is kept as scale=diag(1, 1, 1, 1)

You're asking about how to go from voxel to physical coordinates? The vox2ras matrix from zarrnii does that for you. Perhaps can go over on a call or when I'm back on Friday.

spimquant bids_dir output_dir {participant} [snakemake_args]
# now since we run spimquant, contents in config/snakebids.yml has changed
# and we can run snakemake with the updated configuration
snakemake result_file_path
Copy link
Member

Choose a reason for hiding this comment

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

not sure why you need this -- the spimquant cli runs snakemake already --

A more concrete example:
```bash
spimquant test_bids_dir test_out participant
snakemake results/result_image.nii -n
Copy link
Member

@akhanf akhanf Oct 8, 2024

Choose a reason for hiding this comment

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

You can specify targets using the spimquant cli too.. e.g. spimquant test_bids_dir test_out participant -n results/result_image.nii

So there isn't a need to instruct the user to run snakemake directly..

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