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

New participant_create_template analysis_level #365

Merged
merged 11 commits into from
Feb 12, 2025
Merged

Conversation

akhanf
Copy link
Member

@akhanf akhanf commented Feb 6, 2025

Adds a target rule for generating the files for using a subject as a surface template, i.e. just generating the native and unfold surfs, and metrics and subfields (i.e. everything required for an atlas: entry in the config file)..

This is set-up as a new analysis-level, participant_create_template, which we would run for our multihist7 subjects. Could also use this in the future to make templates from MRI data, so one could get e.g. myelin maps or rsfmri connectivity as metrics (which could then be used in unfoldreg when a subject has that data)..

TODO: add sampling of manual volumetric segmentation into surface metric

Note: this includes commits from #364

was having memory issues with the large 100um datasets, and probably a
good idea to add some more regularization implicitly..
@akhanf akhanf changed the title WIP - Create template New participant_create_template analysis_level Feb 7, 2025
@akhanf
Copy link
Member Author

akhanf commented Feb 7, 2025

@jordandekraker you can use this branch for your multihist7 tests, just run participant_create_template instead of participant, and it will automatically skip template injection and only generate the files needed to create a template (e.g. will skip unfoldreg)..

I still need to add the rules to load and resample manual volumetric subfield labels with the native surfaces, but otherwise is functional.

@jordandekraker
Copy link
Collaborator

I'm having an issue which I believe comes from #364

Traceback (most recent call last):
  File "/export03/data/opt/hippunfold-dev/multihist7_hippunfold/.snakemake/scripts/tmpc8fix6to.gen_isosurface.py", line 11, in <module>
    from lib.utils import setup_logger
ModuleNotFoundError: No module named 'lib'

I suspect I need to add this new directory to my path (maybe in the top level Snakefile?)

@akhanf
Copy link
Member Author

akhanf commented Feb 7, 2025

You should have hippunfold/workflow/lib/utils.py in this branch too, does it not exist for you? even after pull?
It seems to be there for me.. (and snakemake should find it this way)..

@jordandekraker
Copy link
Collaborator

yes its there, just not being seen by python scripts

@jordandekraker
Copy link
Collaborator

solved by using conda install (pip and poetry are currently broken):

conda create -c conda-forge -c bioconda -n snakemake snakemake
conda activate snakemake
conda install -c conda-forge -c bioconda snakebids
./hippunfold/run.py

@akhanf akhanf marked this pull request as ready for review February 12, 2025 00:59
@akhanf
Copy link
Member Author

akhanf commented Feb 12, 2025

This is good to merge from my end, later I'd like to add in some logic to prepare the manifest and data files for registering a new template (ie commit to a repository, which could be your own repo, or the centralized one), but details of that in a future PR..

@akhanf akhanf merged commit 3b6f5db into dev-v2.0.0 Feb 12, 2025
6 checks passed
@akhanf akhanf deleted the create-template branch February 12, 2025 01:21
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