Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
15f646a
Update DCE.yml
lsaca05 Oct 13, 2022
6c3cfbd
use MPRAGE images to generate matter masks (#3)
lsaca05 Oct 19, 2022
d4a977d
force zip masked VFAs, exlude jsons from rm
lsaca05 Oct 20, 2022
5446d74
name changes (t1w -> T1)
lsaca05 Oct 20, 2022
b2de7e5
add site name to report title
lsaca05 Oct 21, 2022
d477b51
added a sort function to get data in BIDS compliant structure
ironictoo Oct 26, 2022
29c05dc
added missing task name to rest
ironictoo Oct 26, 2022
bacc5c7
Merge branch 'run-all-script' into freesurfer
lsaca05 Oct 27, 2022
5aedc05
Use ANTS for registration, displacement/corrcoef graphs, some renamin…
lsaca05 Nov 15, 2022
399b053
change disp graph colors, mix ANTs with Freesurfer, re-register (prot…
lsaca05 Nov 23, 2022
aa5d1af
Update DCE.yml
lsaca05 Nov 23, 2022
ae6d490
gm reg QC, reiterate reg based on weighted average zeros, disp params…
lsaca05 Nov 29, 2022
79caf2a
added log files, bit of cleanup
lsaca05 Nov 30, 2022
0b3c1a2
add basic logging and primitive progress bar
lsaca05 Dec 8, 2022
faa3097
BIDS script tailored towards GRASP DICOMs
lsaca05 Dec 9, 2022
897462b
remove fail fast option, force it now
lsaca05 Dec 9, 2022
d82eb3c
condense rm chains with a bit of regex
lsaca05 Dec 9, 2022
8b8527f
WIP: ETA scaling adjustments (3min@end)
lsaca05 Dec 12, 2022
5caa8eb
TemporalResolution calculated + added to config.json as part of BIDS …
lsaca05 Dec 13, 2022
85c11e1
start tailoring BIDS script toward our data, add aif mean script
lsaca05 Dec 14, 2022
506dc67
refactoring
lsaca05 Dec 15, 2022
4c8f645
rename a variable
lsaca05 Dec 15, 2022
c142047
refactoring, larger time scale factor if no GPUFIT detected
lsaca05 Dec 15, 2022
a609a46
Merge branch 'progbar' into dev
lsaca05 Dec 15, 2022
8f49266
force ff in DCE script, update DCE.yml
lsaca05 Dec 15, 2022
0132eb5
long have we waited, AFNI dependency eliminated
lsaca05 Jan 6, 2023
42c583e
Update DCE.yml
lsaca05 Jan 6, 2023
727bfaa
increased time estimation factor
lsaca05 Jan 10, 2023
a76fb8f
Merge branch 'main' into dev
lsaca05 Jan 11, 2023
5d5150e
Update DCE.yml
lsaca05 Jan 11, 2023
dc78d95
Update DCE.yml
lsaca05 Jan 11, 2023
55b2182
clean up old dce_all opts, fix GPUFIT_PATH + add to T1 cmd
lsaca05 Jan 12, 2023
cdaab33
update reqs and runtime, add dockerfile (WIP)
lsaca05 Jan 26, 2023
d90fc60
fix GPU detection condition, fix missing endquot in T1 mapping matlab…
lsaca05 Jan 31, 2023
b821f3a
trim down docker image size to 7-8 gigs
lsaca05 Feb 6, 2023
80f7810
docker working up to T1 mapping (matlab time), trim image, pre-load b…
lsaca05 Feb 9, 2023
b58a2db
just upload hd-bet params instead of making user slowly download
lsaca05 Feb 9, 2023
39d47c5
resolve freesurfer license + hd-bet param pre-load issues
lsaca05 Feb 11, 2023
e1ee4cd
complete dockerfile, some fixes for docker compatibility, add docker …
lsaca05 Mar 2, 2023
f82edb9
increase matlab & freesurfer license path agnosticism in docker wrapper
lsaca05 Mar 8, 2023
07ebc71
change GPUFIT_PATH search target
lsaca05 Mar 7, 2023
a606a3b
misc changes, add(?) docker build action
lsaca05 Mar 8, 2023
af572ae
checkout action, add branch to auto-build tag
lsaca05 Mar 8, 2023
d1aee68
fix DCE action run cmd, update tag name
lsaca05 Mar 13, 2023
b0077db
merge docker workflow into DCE workflow, just build lol
lsaca05 Mar 13, 2023
bc87cb6
docker build for MATLAB releases R2020a-R2022b
lsaca05 Mar 14, 2023
3f7ec9d
make normalization scripts more agnostic to dimension order (xyz vs xzy)
lsaca05 Mar 15, 2023
c29eef7
add rocketship preference file to docker, add branch to matlab detect…
lsaca05 Mar 15, 2023
d387e44
update README, i forgor DCE_norm had 4th dimension so fix that for di…
lsaca05 Mar 15, 2023
71a2d84
cd out 1 folder further if error
lsaca05 Mar 31, 2023
7a4934c
checkout action in pipeline, since the runner's version of this repo …
lsaca05 May 30, 2023
424e8d6
HTML QC report + Double Gaussian Fit Normalization + No correction ru…
lsaca05 Jul 21, 2023
2ea0bbb
try exception for git (get latest hash) not working in docker container
lsaca05 Jul 26, 2023
0346701
add latest MATLAB release to actions matrix
lsaca05 Jul 26, 2023
02c23ed
dims and voxel_size now exist outside of reorient loop, fix commit ex…
lsaca05 Jul 28, 2023
0672304
fix get git commit alt cmd
lsaca05 Jul 28, 2023
4cfc87f
fix alt get git commit cmd (check_output, __file__)
lsaca05 Jul 31, 2023
2ff6b00
check if DCE and AIF have same dims for plot
lsaca05 Jul 31, 2023
381e97c
Z-norm dimension detection fixes + account for blank wm slice case, p…
lsaca05 Oct 20, 2023
bd17a84
fix case report curve & ktrans plotting, add ktrans wm/gm stats, dyna…
lsaca05 Oct 20, 2023
6226960
add population report - hist of wm/gm means and population wm/gm mean…
lsaca05 Oct 20, 2023
8c10265
add T1_only option + AUTO_AIF, autodetect VFAs, detect gpu & file exi…
lsaca05 Oct 20, 2023
18ffd82
update report filename in DCE.yml
lsaca05 Oct 20, 2023
85d5b63
ensure Z-norm indices are correct for transpose both to and from std
lsaca05 Oct 27, 2023
74f8718
revamp registration -- everything is registered to ref_rep at beginni…
lsaca05 Oct 27, 2023
9e1c4e1
back to ROCKETSHIP-dev in github actions yml
lsaca05 Oct 30, 2023
2ee1c6a
correctly show nilearn ktrans z-slices from header coords, include on…
lsaca05 Nov 2, 2023
d72627d
add # of MRIs, subjects, and successes in pop report, try-catch for m…
lsaca05 Nov 2, 2023
783192e
add skip if success flag to DCE_all, clean up preprocess_all & implem…
lsaca05 Nov 2, 2023
02496e8
changed alt text for autoAIF images to be more accurate
lsaca05 Nov 2, 2023
3b9767e
add T1, T1 blood, AIF stats to report. add support for run comparison…
lsaca05 Nov 16, 2023
13d129e
eliminate freesurfer dependency
lsaca05 Nov 16, 2023
1a5b9b2
try newer nvidida/cuda image w/ cudnn8, wipe out fraudsurfer from doc…
lsaca05 Nov 17, 2023
431bf4f
1 more double gaussian fit mu check (mu2 if mu1 is stupid high)
lsaca05 Nov 23, 2023
85e905c
preserve ROCKETSHIP logs in file purges, list wm/gm outliers in repor…
lsaca05 Nov 23, 2023
65c2576
t1w to MNI with ANTS instead of FLIRT, fix making list of outliers
lsaca05 Dec 1, 2023
773f4e0
improved log file and figure organization, rename auto_analysis to kt…
lsaca05 Jan 23, 2024
29dd33f
update README to reflect updated registration and AutoAIF
lsaca05 Feb 21, 2024
d149fdf
forgor wm segmentation in README preprocessing step summary
lsaca05 Feb 21, 2024
d8c831c
update README DCE inputs/outputs
lsaca05 Feb 21, 2024
8e11d14
add freesurfer wm parc option, many misc fixes, add wmparc subregions…
lsaca05 Feb 23, 2024
2fe7331
model weight path to repo
lsaca05 Feb 26, 2024
7331675
oop wrong model weight path, fixed
lsaca05 Feb 26, 2024
245e4e8
add proper config.json for dcm2bids purposes
lsaca05 Mar 19, 2024
2fb6ff2
make pipeline BIDS compliant, make spreadsheet from population data, …
lsaca05 Apr 19, 2024
a38d41a
Update DCE.yml
lsaca05 Apr 19, 2024
9948b80
Update DCE.yml
lsaca05 Apr 22, 2024
a53f6f0
pull some spreadsheet values from log files instead of jsons, misc fixes
lsaca05 Apr 26, 2024
77f9261
update DCE.yml action versions
lsaca05 Apr 30, 2024
bc79252
fraudsurfer returns to docker, update ROCKETSHIP func names and args
lsaca05 Apr 30, 2024
9c5447b
fix cat target filename in DCE.yml, remove unused imports, update req…
lsaca05 Apr 30, 2024
39983b9
forgor to specify log folder dirs in output logs step
lsaca05 Apr 30, 2024
32367cf
update other paths of runner steps
lsaca05 Apr 30, 2024
591e619
fix runner step paths again
lsaca05 Apr 30, 2024
a23d1e7
missed one path
lsaca05 Apr 30, 2024
90092f6
oops i did it again
lsaca05 Apr 30, 2024
ebef15b
fix docker tag name
lsaca05 Apr 30, 2024
ce64783
split successful cases into include and exclude in spreadsheet and EZ…
lsaca05 May 18, 2024
f2647c1
truncated 1 char too much from wm/gm median
lsaca05 May 28, 2024
6a56df0
skip to DCE if new variant (inherit inputs from base variant), fix ma…
lsaca05 Jun 5, 2024
289592c
fix case/ktrans report args in DCE_all, recognize when imported AIF i…
lsaca05 Jun 7, 2024
b70e8de
DCEref img plot fix for cases with different coords + use 95th %tile …
lsaca05 Jun 14, 2024
95a4df7
add threading + more checks + r squared to pop report
lsaca05 Jun 21, 2024
dfd68b9
misc fixes and renames, case report support for no -f (freesurfer) fl…
lsaca05 Jun 25, 2024
d2a0edc
dynamically list FAs in report, fix EZQC imgs list, init log command var
lsaca05 Jul 2, 2024
138e68d
idk why i moved these mkdirs
lsaca05 Jul 3, 2024
9f5e346
now I remember
lsaca05 Jul 3, 2024
9d30a12
fix dynamic listing of FAs in caes report
lsaca05 Jul 3, 2024
6e873d7
check if source spreadsheet exists before pulling from it
lsaca05 Jul 3, 2024
7529b8d
new iNESMA filter, paper implementation, not tested
lsaca05 Jul 11, 2024
96cfeff
increase array size for similarity/indices arrays
lsaca05 Jul 11, 2024
d26dbf9
refactor: update AIF quality metrics and fix link formatting in pop r…
lsaca05 Oct 30, 2024
ab76bec
moved aifitness calc to seperate file
ironictoo Nov 5, 2024
bc8f64d
rescale AIFitness based on new test splits stats
lsaca05 Nov 5, 2024
5360ad8
rename DCE.yml target subject
lsaca05 Nov 6, 2024
bc6daec
revert previous commit
lsaca05 Nov 6, 2024
0a50084
add new mean baseline func
lsaca05 Nov 13, 2024
f46fb38
fix DCE_all -S target, put pop reports/spreadsheets into respective -…
lsaca05 Nov 12, 2024
2159d04
use new mean baseline func in case_report
lsaca05 Nov 13, 2024
b47b2ac
made AIFitness invariant to scaling
ironictoo Nov 13, 2024
daf139c
rescale AIFitness tail metric, use mean baseline in base_to_mean metric
lsaca05 Nov 15, 2024
e42bef0
update DCE processing scripts: add smoothing and target args, add che…
lsaca05 Dec 19, 2024
13c51d0
update preprocessing and DCE scripts: change AutoAIF model to 'best',…
lsaca05 Dec 21, 2024
fb784e9
update DCE_all.sh: modify help message to clarify smoothing option an…
lsaca05 Dec 21, 2024
6c022ea
remove unused scripts: delete obsolete AFNI registration and comparis…
lsaca05 Jan 2, 2025
1913860
update scripts: add __pycache__ to .gitignore, improve DCE processing…
lsaca05 Jan 8, 2025
ed7794d
update config.json for BIDS/NIFTI conversion
lsaca05 Jan 15, 2025
16dba64
update DCE processing scripts: replace hardcoded DCE reference file p…
lsaca05 Jan 15, 2025
35d7bc8
fix exception memory leak, fix entry move to exclude dict
lsaca05 Jan 23, 2025
40679a7
misc changes/fixes, add ktrans matter masks for ktrans stats, condens…
lsaca05 Feb 18, 2025
ca210fc
update DCE_all.sh: add check for existence of Ktrans file before proc…
lsaca05 Feb 18, 2025
0eb076d
if comparison folder doesn't exist, copy from standard run
lsaca05 Feb 18, 2025
04c5327
update README for new input/output specifications and options, enhanc…
lsaca05 Feb 19, 2025
1c49b42
refactor GitHub Actions workflow to set branch name in environment va…
lsaca05 Feb 19, 2025
33b54dc
idk why i commented out docker push step
lsaca05 Feb 20, 2025
9b978cb
refactor scripts to improve MATLAB path retrieval, update option flag…
lsaca05 Feb 24, 2025
7f5d708
now I remember, because I need secrets for personal account but can o…
lsaca05 Feb 25, 2025
e5baf21
skip hd-bet if T2w structural image (assuming mouse for now)
lsaca05 Mar 5, 2025
130a18d
update README install instructions
lsaca05 May 21, 2025
9314f45
fix: correct neighborhood spelling in smoothing function, add inferio…
lsaca05 May 20, 2025
e906b72
attempt to implement locking for distributed processing
lsaca05 May 23, 2025
d663ee2
Improves population reporting and concurrency controls
lsaca05 Jul 2, 2025
02967d8
feat: add ROCKETSHIP commit hash retrieval and display in reports
lsaca05 Jul 3, 2025
6bbfe60
update docker freesurfer version 7.3.2->7.4.1
lsaca05 Jul 21, 2025
97f458b
update mcflirt in README, file existence checks in reports, AIF plot …
lsaca05 Oct 8, 2025
00f6103
update docker base to cuda13, update freesurfer/FSL/hd-bet, reorder l…
lsaca05 Oct 8, 2025
388a8c0
update checkout action, ensure hd-bet is latest version
lsaca05 Oct 9, 2025
553a0e1
cannot push autoAIF weights, so that should be -v'd. Adjusted file st…
lsaca05 Oct 9, 2025
6487ec3
rename freesurfer exclude file
lsaca05 Oct 9, 2025
01f26de
move matlab docker portion below most package installations for cachi…
lsaca05 Oct 11, 2025
6231719
re-add freesurfer dependencies for some reason, make deb frontend non…
lsaca05 Oct 15, 2025
1b29853
main run path update, a bit of cleanup, make constants file for one r…
lsaca05 Dec 3, 2025
d3cc6ca
forgor to add constants file to go with previous commit
lsaca05 Dec 3, 2025
047cfb6
Readme updates
ironictoo Feb 11, 2026
4b9d168
Citation tweak
ironictoo Feb 11, 2026
4259a79
Merge branch 'main' into dev
ironictoo Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 66 additions & 18 deletions .github/workflows/DCE.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
name: Bash script
name: Run DCE then build docker

on:
push:
branches: [ "freesurfer", "main" ]
branches: [ "dev", "main" ]
pull_request:
branches: [ "freesurfer", "main" ]
branches: [ "dev", "main" ]

permissions:
contents: read

jobs:
build:
run:

runs-on: self-hosted

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v5

- name: Checkout ROCKETSHIP repo
uses: actions/checkout@v5
with:
repository: petmri/ROCKETSHIP
ref: dev
path: ROCKETSHIP

#- name: Set up Python 3.10
# uses: actions/setup-python@v3
# with:
# python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install --upgrade hd-bet
# pip install flake8 pytest


Expand All @@ -38,29 +44,71 @@ jobs:
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

#- name: Test with pytest
# run: |
# pytest

#- name: Set up MATLAB
# uses: matlab-actions/setup-matlab@v1
- name: Clean the runner subject data
run: |
cd /media/network_mriphysics/USC-PPG/RUNNER_DATA/1101743_runner/1st_timepoint
shopt -s extglob
rm -f !(2.nii|5.nii|10.nii|12.nii|15.nii|DCE.nii|aif.nii)
cd /home/mrispec/actions-runner/_work/in-house_toolbox/in-house_toolbox

- name: Preprocess the data
run: ./preprocess_all.sh -d /media/network_mriphysics/USC-PPG/RUNNER_DATA -b -Z
run: ./preprocess_all.sh -d /media/network_mriphysics/USC-PPG/RUNNER_DATA/rawdata -b -Z -m -c

- name: Run DCE
run: ./DCE_all.sh -d /media/network_mriphysics/USC-PPG/RUNNER_DATA -b -Z
run: ./DCE_all.sh -d /media/network_mriphysics/USC-PPG/RUNNER_DATA/rawdata -f

- name: Output logs
run: |
date=$(date +"%Y-%m-%d")
cat /media/network_mriphysics/USC-PPG/RUNNER_DATA/derivatives/logs/preprocessing_log_${date}.txt
cat /media/network_mriphysics/USC-PPG/RUNNER_DATA/derivatives/logs/dce_log_${date}.txt

- name: Convert HTML to PDF
run: wkhtmltopdf --enable-local-file-access /media/network_mriphysics/USC-PPG/RUNNER_DATA/derivatives/sub-1101743/ses-01/reports/sub-1101743_ses-01_desc-casereport.html /media/network_mriphysics/USC-PPG/RUNNER_DATA/sub-1101743/ses-01/reports/sub-1101743_ses-01_desc-casereport.pdf
continue-on-error: true

- name: Upload analysis results
uses: actions/upload-artifact@v3.1.0
uses: actions/upload-artifact@v4
with:
name: T1_Ktrans_graphs
path: /media/network_mriphysics/USC-PPG/RUNNER_DATA/1101743_runner/1st_timepoint/report.png
retention-days: 5
name: HTML_report
path: |
/media/network_mriphysics/USC-PPG/RUNNER_DATA/derivatives/dceprep/sub-1101743/ses-01/reports/sub-1101743_ses-01_desc-casereport.html
/media/network_mriphysics/USC-PPG/RUNNER_DATA/derivatives/dceprep/sub-1101743/ses-01/reports/sub-1101743_ses-01_desc-casereport.pdf
/media/network_mriphysics/USC-PPG/RUNNER_DATA/derivatives/dceprep/sub-1101743/ses-01/figures/
retention-days: 7
if-no-files-found: error

docker:
needs: run
strategy:
fail-fast: false
matrix:
release: [R2020a, R2020b, R2021a, R2021b, R2022a, R2022b, R2023a]

runs-on: self-hosted

steps:
- uses: actions/checkout@v4

- name: Extract branch name
id: extract_branch
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"

- name: Build Dockerfile
id: docker_build
run: |
docker image prune -f
docker build --build-arg MATLAB_RELEASE=${{ matrix.release }} . -t lsaca05/dce:${{ matrix.release }}-$branch

# - name: Run Docker
# if: ${{ matrix.release }} == "R2020a"
# run: |
# ./run_docker.sh
# exit

# - name: Push to Docker Hub
# if: steps.docker_build.outcome == 'success'
# run: |
# docker push lsaca05/dce:${{ matrix.release }}-$branch
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.project
.pydevproject
docker/files/license.txt
__pycache__
Loading
Loading