Skip to content

Freesurfer longitudinal pipeline - ReconAll flags #3345

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

Open
0rC0 opened this issue Jun 18, 2021 · 7 comments
Open

Freesurfer longitudinal pipeline - ReconAll flags #3345

0rC0 opened this issue Jun 18, 2021 · 7 comments

Comments

@0rC0
Copy link
Contributor

0rC0 commented Jun 18, 2021

Summary

Hello everybody,

I'm going to implement the flags for the Freesurfer longitudinal pipeline in ReconAll.

I would like to ask if there is interest in a pull request about that.

Actual behavior

The Freesurfer longitudinal pipeline needs recon-all flags like -base -tp -long, whose are not implemented yet.

@effigies
Copy link
Member

Hi, yes, these would be a great addition.

@ghisvail
Copy link
Contributor

We are also interested by this interface. Is it still in the works?

Otherwise, we would be keen in giving it a go to replace our custom subprocess calls in Clinica.

@0rC0
Copy link
Contributor Author

0rC0 commented May 19, 2022

We are also interested by this interface. Is it still in the works? Otherwise, we would be keen in giving it a go to replace our custom subprocess calls in Clinica.

Hello,

I'm not working any more on this addition.

Freesurfer uses and wants a somehow fixed directory structure.
For example, the command worked if the structure was:

subjects_dir
|
|-sub1-timepoint1
|-| -mri
  |-stats
  |-....
|- sub1-timepoint2
|-| -mri
  |-stats
  |-....

but not for other structures, and I didn't manage to write something enough flexible to be integrated in a nipype workflow or the directory structure of the temp files of a workflow.

@l-espana
Copy link
Contributor

Hello,
I've also been interested in working on this for a while and have some basic code going that creates a separate "base" and "longitudinal" interface specification. FreeSurfer does generate specific output directory structures but I'm not entirely sure what other folder structures would cause this to not work.
At any rate, would be happy to discuss if this issue is still of interest to others.

@ghisvail
Copy link
Contributor

I've also been interested in working on this for a while and have some basic code going that creates a separate "base" and "longitudinal" interface specification. FreeSurfer does generate specific output directory structures but I'm not entirely sure what other folder structures would cause this to not work.

@l-espana if you have already got code that works, that would be a great starting point for a PR to iterate upon.

I have been focusing on pydra-freesurfer with plans to backport the longitudinal interface back to Nipype eventually, if no one beats me to it before. Feel free to have a go 👍

@0rC0 0rC0 closed this as completed Nov 28, 2022
@0rC0
Copy link
Contributor Author

0rC0 commented Nov 28, 2022

Sorry, I have pressed close for a mistake :P. I reopen it

If someone is still working or want to work to this issue and have some code to share to start with, I would be happy to give my contribution :-).

Anyway, my main problem was the following. Let's imagine we have a workflow that runs the single-subject recon-all, so, we have the two recon-all directories in paths like:

/workflow_temp/some1/path1/reconall/sid.baseline (1)
/workflow_temp/some2/path2/reconall/sid.followup (2)

The longitudinal pipeline of Freesurfer uses commands like:

  recon-all -base sid_templace -tp sid.baseline -tp sid.followup  -all
  recon-all -long sid.baseline sid_template -all
  recon-all -long sid.followup sid_template -all

and needs that the folders sid.baseline, sid.followup, sid.template are subfolders of $SUBJECTS_DIR, that should be the workflow temp directory of our longitudinal recon-all node

@0rC0 0rC0 reopened this Nov 28, 2022
@l-espana
Copy link
Contributor

I guess I would question leaving recon-all outputs in a temporary workflow directory rather than using, say, a freesurfer derivatives directory and just referencing that as the $SUBJECTS_DIR. (Unless I'm completely misunderstanding...) Working with FreeSurfer data in the past, we usually have to make sure all of the original recons pass inspection before running the rest of the longitudinal pipeline anyways, so it makes sense to me to keep things separated.
I'm close to opening a PR I think, so maybe we can continue discussing. :)

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

No branches or pull requests

4 participants