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

Stand Alone MSMSulc.sh script #290

Merged
merged 23 commits into from
May 6, 2024
Merged

Conversation

nagedem
Copy link
Contributor

@nagedem nagedem commented Apr 10, 2024

No description provided.

@coalsont
Copy link
Member

coalsont commented Apr 10, 2024

You didn't need to close the other PR, it will automatically update whenever you push. You have also added the merge commit and msmsulc.sh back into this PR.

Edit: but I have found that if you push upstream's master to the PR branch, github will close the PR on its own, unfortunately.

@glasserm
Copy link
Contributor

The if conditional for computing the rotated sphere needs to be there or the entire block pulled out of MSMSulc and left in PostFreeSurfer. We should not be overwriting files that we make available in package downloads necessarily.

@coalsont
Copy link
Member

I thought the idea was to replace the MSMSulc section of PostFS with a call to this script. Only a patch script should need a conditional for whether to generate a file, and patch scripts don't need to be in the repo.

@glasserm
Copy link
Contributor

The purpose of this script is either to replace MSMSulc in the pipelines or to allow different MSMSulc to be run after the fact. The same script can do both.

@coalsont
Copy link
Member

coalsont commented Apr 10, 2024

Putting the sphere.rot generation into PostFS outside of the MSMSulc script is a way to avoid overwriting, without using a conditional, but at the same time, the main reason we need the rotation is for MSM. While it appears to be used in MSMAll (side note, our "rotation" doesn't currently decompose the affine to a pure rotation, so theoretically it would be better and not exactly equivalent to provide the unrotated native sphere for cumulative distortion measurement in MSMAll, and we could even do this for MSMSulc too), since MSMAll is initialized by MSMSulc anyway, sphere.rot can be said to be purely an MSMSulc requirement, with MSMAll depending on MSMSulc, which would make the MSMSulc script/section the obvious place to generate it. I think I somewhat prefer this option (generate sphere.rot in PostFS immediately before calling MSMSulc.sh), not having conditional behavior on the filesystem state at all.

Alternatively, having the condition instead test "if the file doesn't exist, or the regname is MSMSulc, then generate it" may better emulate the expected/current behavior of rerunning PostFS/"MSMSulc" after something like faulty memory problems. Presumably the "after the fact" additional usage would generally be set to "MSMSulcStrain", and so "MSMSulc" can overwrite every time without issue (removing the surprise behavior change for at least the main pipeline). Presumably it doesn't matter whether a "longitudinal combined subject" folder overwrites this internally prior to release of longitudinal results (I don't know the longitudinal expected flow well enough to say whether it isn't even an issue).

If we don't expect people to want to manually run it "after the fact" with the MSMSulc name (which would overwrite downloaded things), then maybe the default should be MSMSulcStrain, and PostFS should provide the "magic" MSMSulc name when it calls it.

@glasserm
Copy link
Contributor

We are using the rotated sphere for other things too. Let's just always run it in PostFreeSurfer so that we have it even if MSMSulc is not the registration we use.

global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
nagedem and others added 2 commits April 11, 2024 18:16
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
@nagedem
Copy link
Contributor Author

nagedem commented Apr 22, 2024

Just committed and pushed the relevant changes for your review.

global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
nagedem and others added 3 commits April 25, 2024 19:53
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
nagedem and others added 2 commits April 25, 2024 19:54
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
@nagedem
Copy link
Contributor Author

nagedem commented Apr 26, 2024 via email

@coalsont
Copy link
Member

Looks like you didn't update your local clone after accepting my suggested edits on github, and then you made the same edits again manually. The merge seems to have figured out what you meant, so the current version is okay, but in the future, if you ever have to commit the same edits twice, something has gone wrong.

@nagedem
Copy link
Contributor Author

nagedem commented Apr 26, 2024 via email

@coalsont
Copy link
Member

coalsont commented Apr 26, 2024

This commit appears to have several of the suggestions I made, which also have commits that look github-generated from accepting suggestions:

240e677

After accepting suggestions on github, you should git pull --ff-only in your local clone before making more commits. Any edits made using github end up as new commits that are only on github, and you have to tell your local clone to go look for updates.

global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@glasserm glasserm left a comment

Choose a reason for hiding this comment

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

There are several issues that I identified. Please fix.

@nagedem
Copy link
Contributor Author

nagedem commented Apr 29, 2024 via email

global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
global/scripts/MSMSulc.sh Outdated Show resolved Hide resolved
@coalsont coalsont merged commit 7a2da9c into Washington-University:master May 6, 2024
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.

3 participants