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

Update batch_single_subject.sh and process_data.sh to match changes to 2024 SCT Course Slides #25

Merged
merged 41 commits into from
Dec 9, 2024

Conversation

joshuacwnewton
Copy link
Member

@joshuacwnewton joshuacwnewton commented Nov 26, 2024

Please review this PR by going to the "Commits" view and looking at each change one-by-one.

Fixes spinalcordtoolbox/spinalcordtoolbox#4729.
Fixes spinalcordtoolbox/spinalcordtoolbox#4727.
Fixes #24.

@joshuacwnewton joshuacwnewton self-assigned this Nov 26, 2024
@joshuacwnewton joshuacwnewton force-pushed the jn/update-to-match-2024-course-slides branch from fa9319c to bb812ed Compare November 28, 2024 17:53
@jcohenadad

This comment was marked as resolved.

@joshuacwnewton joshuacwnewton force-pushed the jn/update-to-match-2024-course-slides branch from 3c5d111 to ee5d8dd Compare November 29, 2024 19:03
@joshuacwnewton joshuacwnewton changed the title Update batch_single_subject.sh to match changes to 2024 SCT Course Slides Update batch_single_subject.sh and process_data.sh to match changes to 2024 SCT Course Slides Nov 29, 2024
@jcohenadad

This comment was marked as resolved.

@jcohenadad

This comment was marked as resolved.

Showing users that they can specify an output folder is important!
Now they are more in line with the sections in the slides
This is the preferred syntax for the script, rather than using `\` to split the command over
multiple lines.
We don't have time to debug "RuntimeWarning: invalid value encountered in scalar divide" before
SCT course.
This will improve debugging, so that we can see what step actually fails. Also, by splitting
up the steps, we can continue to the next step on failure of an earlier step thanks to
"if: always()".
`grep` returns 0 if found, and 1 if not found. But we want the opposite: 1 if warning/error
is present, and 0 if there are no warnings/errors. So, we need to invert the output code.

I have no idea why these checks lasted as long as they did without this `!` inversion. The
`grep` commands only used options `-iF`, meaning (case-insensitive) and (non-regex
strings), so the options don't have anything to do with it.

Hopefully this will fix the erroneous failures?
@joshuacwnewton
Copy link
Member Author

joshuacwnewton commented Dec 7, 2024

OK, I think this is ready to be merged. I did one more once-over and updated the commands to match the slides once again (there were some discrepancies in the "new features" section, along with some updates to various slides since our last meetings).

I'm happy at any point this weekend to merge + remake the sct_tutorial_data release so that it's ready for Monday. :)

@jcohenadad
Copy link
Member

all right let’s merge! thank you so much for your outstanding dedication @joshuacwnewton !

@mguaypaq
Copy link
Member

mguaypaq commented Dec 8, 2024

In the course slides, this line has an additional -qc ~/qc_singleSubj, which is missing in batch_single_subject.sh:

sct_deepseg -i t2_lumbar.nii.gz -task seg_lumbar_sc_t2w

(But it's on a "red" slide, so maybe this is intentional?)

Same thing with this line (also on a "red" slide):

sct_label_utils -i t2_lumbar.nii.gz -create 27,76,187,17:27,79,80,60 -o t2_lumbar_labels.nii.gz

The next (and last) command in this section does have the QC report:

sct_register_to_template -i t2_lumbar.nii.gz -s t2_lumbar_seg.nii.gz -ldisc t2_lumbar_labels.nii.gz -c t2 -qc ~/qc_singleSubj -param step=1,type=seg,algo=centermassrot:step=2,type=seg,algo=bsplinesyn,metric=MeanSquares,iter=3,slicewise=0:step=3,type=im,algo=syn,metric=CC,iter=3,slicewise=0

@joshuacwnewton joshuacwnewton merged commit e349507 into master Dec 9, 2024
2 checks passed
@joshuacwnewton joshuacwnewton deleted the jn/update-to-match-2024-course-slides branch December 9, 2024 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants