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 aim1 and aim2 modeling #6

Open
wants to merge 231 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
ec08d37
add script to create fsl ppi events
mckenziephagen Dec 5, 2019
e29dae3
update event regressor modeling
henrymj Jan 21, 2020
1218a54
convert 1stlevel_analysis.ipynb to .py
henrymj Jan 24, 2020
0f40874
singularitize
henrymj Jan 24, 2020
cc912aa
reverting to old commit that was overwritten
mckenziephagen Jan 24, 2020
5f0f61f
Merge branch 'master' of https://github.com/mckenziephagen/Self_Regul…
mckenziephagen Jan 24, 2020
4d8466b
removed stray lines
mckenziephagen Jan 24, 2020
c87d591
Merge branch 'master' into master
henrymj Jan 24, 2020
42fce9a
add back a_comp_cor flag
henrymj Jan 24, 2020
e653738
Merge pull request #2 from mckenziephagen/master
henrymj Jan 24, 2020
4ad6f4c
merging henry with master
mckenziephagen Jan 24, 2020
00d2510
a_comp_cor 1st_level notebook
henrymj Jan 24, 2020
46d8ce3
still fixing merge
mckenziephagen Jan 24, 2020
6225d9a
fix merge conflict?
henrymj Jan 24, 2020
3ad7ac2
a_comp_cor notebook
henrymj Jan 24, 2020
6d54b79
Merge branch 'master' of https://github.com/henrymj/Self_Regulation_O…
mckenziephagen Jan 24, 2020
ff6d1cb
create design_matrix scripts
henrymj Feb 4, 2020
2d817d3
add repo to sherlock, improve visuals
Feb 7, 2020
b78cc10
remove trial regressor, add parametrics
henrymj Feb 7, 2020
594fc95
fix gitignore issue
henrymj Feb 7, 2020
a4319f8
scale timeseries plotting
henrymj Feb 7, 2020
e4a283b
plot truncated timeseries
henrymj Feb 7, 2020
ce463c1
streamline slurm visualization files
henrymj Feb 7, 2020
c55c93a
add WATT practice regressor
henrymj Feb 7, 2020
75b5b99
correct discountFix junk modeling
henrymj Feb 7, 2020
ae9fecd
update regressors, 1st level contrasts
Feb 13, 2020
2881cbe
updated 2ndlevel fmriprep path
henrymj Feb 13, 2020
ee34185
update 2ndlevel mask paths
henrymj Feb 13, 2020
3b0cc3b
demean parametric regressors
henrymj Feb 18, 2020
ec90e9d
add interaction example
henrymj Feb 19, 2020
f24670e
old analysis
Feb 19, 2020
e3acbc4
fix first level conflict
Feb 19, 2020
0eb11fe
add time series parcellation
Feb 19, 2020
c8292d7
add WATT trial regressor
Feb 19, 2020
de020cb
create simple&readable event files
henrymj Feb 21, 2020
379ec4c
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
henrymj Feb 21, 2020
ad78fa5
drop index on simplified_events.csv
henrymj Feb 21, 2020
097742d
organize for 2ndlevel group contrasts
Mar 2, 2020
4ae009b
add code that creates simplified event files
mckenziephagen Mar 6, 2020
495a95d
Merge branch 'master' of https://github.com/henrymj/Self_Regulation_O…
mckenziephagen Mar 11, 2020
34f049f
comment 2ndlevel design matrix
henrymj Mar 12, 2020
569566c
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
henrymj Mar 12, 2020
13996c4
update parcelation and alaysis
Mar 12, 2020
587556f
separate parcellation, improve Group 2ndLevels
Mar 13, 2020
8b7873e
update 2ndlevel ctask visualizations
henrymj Mar 13, 2020
5c35d76
add 2ndlevel vis batch files
Mar 13, 2020
8171c88
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Mar 13, 2020
eb72dcc
correct 2ndlevel vis task array
Mar 13, 2020
a56b0ab
allow nonuse of a_comp_cor flag
henrymj Mar 16, 2020
7dadb0b
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
henrymj Mar 16, 2020
2df01ad
create noaCompCorr batch files
Mar 16, 2020
779da8a
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Mar 16, 2020
7730d32
fix 2ndlevel visualization slices
henrymj Mar 17, 2020
8033803
use fd_stats.ipynb
henrymj Mar 18, 2020
730b58f
prepare for new demeaning paradigm
henrymj Mar 19, 2020
948c649
use multiple sherlock partitions
Mar 19, 2020
91c64fa
merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Mar 19, 2020
186c5e5
prepare for group visualizations
henrymj Mar 20, 2020
91497f5
use new demeaning
Mar 20, 2020
c9dadc5
return demeaned list not array
Mar 25, 2020
9f7e4c2
try new CCTHot regressors
Mar 25, 2020
961ae55
start with impoverished models
Apr 14, 2020
4c283b5
update group_RTs via ipnb
henrymj Apr 14, 2020
3488ee2
fix impoverished models
Apr 21, 2020
48eeffe
fsl BET batchfile-ation
henrymj Apr 21, 2020
d834228
setup fsl DPX template eg
Apr 21, 2020
6a817e1
practice DPX fsl batch files
henrymj Apr 21, 2020
f38c163
reorganize fsl dirs
Apr 22, 2020
495251e
test run_DPX_FEAT.sh
henrymj Apr 22, 2020
13cec12
update DPX bash
henrymj Apr 22, 2020
83cee69
reorganize fsl dirs
Apr 22, 2020
22bb1f6
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Apr 22, 2020
bed9d37
run DPX FEAT
Apr 22, 2020
3e9552d
create aim1 task FEAT.sh files
henrymj Apr 22, 2020
6400e99
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
henrymj Apr 22, 2020
c3edde3
add TOT_VOX, declutter
henrymj Apr 22, 2020
a1e8a4e
corrct FSL run shs
henrymj Apr 23, 2020
88889de
add time to batch files
henrymj Apr 23, 2020
975db79
boolify fsl RT regressor
henrymj Apr 23, 2020
00b5785
update fsl run scripts for RT
henrymj Apr 23, 2020
f876fe7
stash template batch change
Apr 23, 2020
dbe196e
stash
Apr 23, 2020
bf5fb97
make task first level FEAT fsf'f
henrymj Apr 23, 2020
9942178
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Apr 23, 2020
2fec31c
fixes correct column for stop/motor stop on stop trials
mckenziephagen Apr 30, 2020
2b3ffcc
Merge pull request #3 from mckenziephagen/master
henrymj Apr 30, 2020
e8a38b3
exclude nodes 1&2
May 29, 2020
8556935
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
May 29, 2020
3975fbc
add do over DPX subjects
henrymj May 29, 2020
07c8e47
increase time limit
henrymj May 29, 2020
2c2c622
add fsl 2ndlevel scripts
Jun 12, 2020
214eaf1
add DPX RT-True 2ndlvl
henrymj Jun 12, 2020
5cd8b14
add RT-True and negative contrasts
Jun 15, 2020
256e2ff
task timelocked resps
Jun 17, 2020
bc05b4f
organize aim1 network qc
henrymj Jun 17, 2020
7c22ad4
run network notebook
Jun 17, 2020
b4dff32
batch running of timelock
henrymj Jun 17, 2020
9743f29
work on timelock
Jun 18, 2020
938bd7d
allow for trials w/ <num_TRs to be timelocked
henrymj Jun 18, 2020
4bba036
DPX timelocked responses
Jun 18, 2020
bf164fd
correct network analyses
Jun 18, 2020
fc3756f
prepare for all task timelock
Jun 18, 2020
b53f1c8
run timelocking analysis
Jun 18, 2020
71d87b6
comment timelocking script
henrymj Jun 19, 2020
33c4fec
add aim1 EFA notebooks
henrymj Jul 17, 2020
c2aec46
try EFA params
henrymj Jul 28, 2020
5ee60ed
prepare 2ndlevel design matrix
henrymj Jul 28, 2020
de1bd76
remove failed timeseries analysis
Jul 28, 2020
64db1ca
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Jul 28, 2020
fb6de3a
add 2ndlevel confounds
henrymj Jul 29, 2020
b67d1ca
fix 2ndlevel confound path issues
Jul 29, 2020
b1892a1
drop NaNs from 2ndlevel desMat, maps
henrymj Jul 29, 2020
bd3cad4
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
henrymj Jul 29, 2020
a0a78f6
attempt noFD 2ndlevel design matrix
Aug 7, 2020
8fa62e8
use tensorflow for parcellations
henrymj Sep 1, 2020
f897f46
clean util files, simplify WATT events
henrymj Sep 1, 2020
18e90c5
flake analysis scripts
henrymj Sep 1, 2020
9110ed7
compute accuracy scores for mac and friends
henrymj Sep 1, 2020
a6810e9
resolve conflicts in analysis scripts
henrymj Sep 1, 2020
99b8b1b
fix typo
Sep 1, 2020
833793b
accept incoming changes
Sep 1, 2020
14ac7e3
drop pickle import
henrymj Sep 1, 2020
f43ed5e
flake firstlevel_utils.py
henrymj Sep 1, 2020
5f2db8d
flake 2ndlevel_utils
henrymj Sep 1, 2020
4a4ad14
add AROMA functionality?
henrymj Sep 2, 2020
8a570ff
disable 2ndlevel DMs
henrymj Sep 3, 2020
c2ff34d
add informative print statements
henrymj Sep 3, 2020
9a1e2d0
attempt quick fix of mask issue
henrymj Sep 3, 2020
ac1969f
investigate group mask with prints
henrymj Sep 4, 2020
0653b52
implement rastko's mean mask fix
henrymj Sep 14, 2020
0692776
prepare to run all tasks
henrymj Sep 15, 2020
8babfd4
w fmriprep20.2, change confounds_regressors to confounds_timeseries
henrymj Oct 1, 2020
f09cb76
drop owners nodes for vis
henrymj Oct 7, 2020
c099117
prepare to rerun second levels with age and sex regressors
henrymj Oct 9, 2020
5db62d9
update visualizer to save THE CORRECT PLOTS
henrymj Oct 12, 2020
8a43274
update naming for visualization plots
henrymj Oct 12, 2020
bb144d5
fix plotting typo
henrymj Oct 12, 2020
1b0df6a
add ability to plot pvals through neg log10 transform
henrymj Oct 13, 2020
db3e0fa
add p-masked masked visualizations
henrymj Oct 13, 2020
bb33d96
accept rasko's nuisance regressors, change randomise call (tfce, c_th…
henrymj Oct 23, 2020
e553685
attempt turning off demeaning of randomise
henrymj Oct 27, 2020
622a596
start a useful README for rerunning analyses
henrymj Oct 27, 2020
1b87235
invert p files (1 - p) to fix fsl disp kink
henrymj Oct 28, 2020
ba62992
rename plot utils, include VIF plot, symlink notebook utils for synch…
henrymj Oct 29, 2020
2118a2f
add simulation notebooks, update WATT events
henrymj Nov 24, 2020
01cd559
fix watt event subset strs?
henrymj Nov 24, 2020
c0a961c
flake event_utils.py
henrymj Nov 25, 2020
42af32a
add junk conversion for WATT
henrymj Nov 25, 2020
cb11174
add time for WATT visualizations
henrymj Nov 30, 2020
7a56180
update CCTHot to appropriately capture trial-length regressors
henrymj Nov 30, 2020
d6aa6f1
improve get_ev_vars data type handling
Nov 30, 2020
0f40c9e
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Nov 30, 2020
c2d2dc9
update durations to meanRT within run for regressors
henrymj Nov 30, 2020
3d13786
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
henrymj Nov 30, 2020
b013b94
update event utils to use meanRT
henrymj Nov 30, 2020
bc3522c
first attempt at adding 2ndlevel meta json
henrymj Jan 20, 2021
e329f86
add RT to 2ndlvl DMs
henrymj Jan 31, 2021
3d644a1
change rstrip to replace to fix contrast names
henrymj Feb 1, 2021
26ba10e
prepare new CCTHot regressors along with minor sourcery cleanup
henrymj Mar 2, 2021
38bd988
disable CCTHot Button Press regressors
henrymj Mar 3, 2021
a8995c7
drop button press regressors from CCTHot contrast
henrymj Mar 4, 2021
9bb421b
save out new firstlevel maps
henrymj Mar 4, 2021
08754d2
update second levels for proper randomise call, RT contrasts
henrymj Mar 18, 2021
33bcc58
flatten assignment then use of rt_cols in randomise
henrymj Mar 18, 2021
a8d1f56
update singluarity path to version with updated nipype for multiple f…
henrymj Mar 18, 2021
ab67f81
import first_level_metas for 2ndlevel DM
Mar 18, 2021
6a87cbc
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Mar 18, 2021
837109b
streamline 2ndlevel demeaning
henrymj Mar 18, 2021
de74b23
fix contrast list of tuples parens issue
henrymj Mar 18, 2021
e4d1e30
use columns.get_loc to confirm contrast location in list
henrymj Mar 19, 2021
102131c
add des_mat in call to randomise, simplify desMat building function
henrymj Mar 19, 2021
9907ec4
change des_contrasts from tuple to list for appending in randomise, f…
henrymj Mar 19, 2021
bfcc0f4
lengthen 2ndlevel jobs for more permutations moving forward
Mar 19, 2021
48c07da
sourcery refactor file context in firstlevel_utils
henrymj Mar 19, 2021
4f32a57
standardize RT capitalization for meta dicts
henrymj Mar 19, 2021
b9ed2d8
support >1 digits in randomise outputs for name mapping
henrymj Mar 19, 2021
5d7d951
separate singularity configs for 1st and 2nd levels
henrymj Mar 19, 2021
13f4725
fix 2ndlevel singularity paths to new nipype image
Mar 20, 2021
698a7be
update parcellation script and job file for easier reading, editing
henrymj Mar 22, 2021
b360dca
modify beta parcellation scripts to work with new py3-env
Mar 22, 2021
cc4e4d5
streamline visualizations for new 2ndlevels with f-tests
henrymj Mar 24, 2021
7b600e5
update visualization scripts to run on sherlock, threshold p-files
Mar 24, 2021
620a832
remove RT+cti from two_by_two metadata, simplify its second levels
henrymj Mar 24, 2021
bb38d39
update visualizations to standardize names, include neg t-tests
henrymj Mar 30, 2021
91abab4
switch to tfce randomise call, change randomise output sctructure to …
henrymj Mar 30, 2021
4c81115
update visualizations to handle new randomise output structure
henrymj Mar 31, 2021
ae88d58
fix vis script to work on sherlock
Mar 31, 2021
2381751
save out randomise call for the future
henrymj Mar 31, 2021
a9fa83a
update visualizations to ignore f-files, use t-pvals as thresh
henrymj Mar 31, 2021
b61a553
fix nipype --fonly flag, prepare for f-tests for 2ndlevels
henrymj Apr 2, 2021
c368557
scale up to 10k perms and separate out intercept and RT models
henrymj Apr 3, 2021
85d8be2
include scnd_lvl flag in job,file titles for clarity
henrymj Apr 3, 2021
43fade8
try to parallelize scnd_lvl RT analyses
henrymj Apr 5, 2021
2bb1d2c
update vis script for intercept results, separate randomise outputs
henrymj Apr 5, 2021
d2ef254
add time for perms for 2ndlevels, fix path issue for RT 2ndlevels
henrymj Apr 6, 2021
508093a
add SUIT atlas for Mac Et Amis
henrymj Apr 9, 2021
d81d9eb
for parcels,fix contrast naming, add SUIT call
henrymj Apr 9, 2021
feb7f7d
drop parcel_loc command, deprecated
henrymj Apr 9, 2021
594fe56
drop parcel loc arg. focus on SUIT parcel for beta_parcel
Apr 9, 2021
1c90f68
change SUIT atlas path for parcel script
henrymj Apr 9, 2021
fc3a9e4
make atlas path absolute for parcellation
Apr 9, 2021
8475d63
introduce atlas_dir path for local atlases
henrymj Apr 9, 2021
8d27b4f
allow 2ndlevels to continue where they left off if incomplete
henrymj Apr 12, 2021
1d5d321
fix up beta_parcellation script to work on sherlock, change batch to …
Apr 12, 2021
b24b0e8
separate DPX RT regressors to capture unique variance
henrymj Apr 15, 2021
539c900
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Apr 19, 2021
bacc3a3
add RT contrasts to DPX
henrymj Apr 22, 2021
4e0bc26
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Apr 22, 2021
232ced1
update WATT contrast list for maps
henrymj Apr 27, 2021
8cd94aa
add motorStop RT contrasts for maps
henrymj Apr 27, 2021
5048969
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Apr 27, 2021
4bd2310
add code for regressing physio from rest
henrymj May 6, 2021
adbc931
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
May 6, 2021
b556b4c
fix paths to physio files, print statements
henrymj May 6, 2021
81e9c5f
specify fw_dir from args in physios script
May 6, 2021
0d3be2a
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
May 6, 2021
2c20201
update flywheel data path for physio regression
May 7, 2021
cac8b12
change common slice onset for aim1 physio regression
henrymj May 7, 2021
26d8861
fix argparse typo
May 7, 2021
d38ccb7
add rest timeseries parcellation, tweak beta parcellation script
henrymj May 10, 2021
7d9ce8b
setup scripts to make 4d images
henrymj May 11, 2021
0d5bf37
use AROMA denoised images for physio regression
henrymj May 14, 2021
ca51bb0
add newest notebooks for prereg analyses
henrymj Jun 1, 2021
a396910
Created a requirements.txt to create a conda env for EFA
Rios-Jaime Jun 25, 2021
4974db0
update README to provde clarity on replication
henrymj Aug 23, 2021
833b1d8
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
henrymj Aug 23, 2021
953a32f
remove Ian's notes on env/img in root README
henrymj Aug 23, 2021
910c79a
Update firstlevel_utils.py
bissettp Aug 25, 2021
c5515ff
Update 1stlevel_analysis.batch
bissettp Aug 25, 2021
2e5f2e8
update mode for repo
Aug 25, 2021
c766e8e
Merge branch 'master' of github.com:henrymj/Self_Regulation_Ontology_…
Aug 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified .dockerignore
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ nilearn_data*
nipype_mem*
.spyproject
dockerfile_old
.vscode/
behavioral_data_prep/Untitled.ipynb
docker_path.txt
fmri_analysis/scripts/Untitled.ipynb
*Untitled*.ipynb
*/*Untitled*.ipynb
*/*/*Untitled*.ipynb
*.err*
*.out*
fmri_analysis/fsl/tmp_batch/*
fmri_data_prep/scitran/
Empty file modified Dockerfile
100644 → 100755
Empty file.
41 changes: 25 additions & 16 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
# Self_Regulation_Ontology - fMRI analysis
# Navigating and Using the Repo

### Setting up the docker image
This is the recommended way to use the repo
The following is a list of directories and their contents, in order of importance

Run:
```
docker build --rm -t fmri_env .
```
That's it!
## `fmri_analysis`: Aim1 fMRI Analysis (TODO: include aim2, aim4)

In docker\_files/run_docker.txt you can find example docker commands.
If you start the notebook version,
you can access it at the following url:
http://127.0.0.1:8888/lab?
`fmri_analysis` contains the main scripts of the repo for running standard contrast analyses.
The main files are all in `scripts` and the `utils` dir within.
To run these scripts using Sherlock or other computing clusters, view the README located in `Self_Regulation_Ontology_fMRI/fmri_analysis/batch_files/aim1`.

### Setting up python environment
1. `1stlevel_analysis.py` runs 1stlevels with the help of` utils/firstlevel_utils.py`
2. `2ndlevel_analysis.py` runs 2ndlevels with the help of `utils/firstlevel_utils.py`, `utils.secondlevel_utils.py` and `utils/utils.py`
3. `Visualizations.py` can be used to run 1st and 2nd level visualizations based on flags passed to it.

conda create -n SRO python=3.5.3
source activate SRO
pip install -r requirements.txt
4. Once these analyses are complete, navigate to `Self_Regulation_Onotology_fMRI/fmri_analysis/scripts/notebooks/` and run 2 notebooks (currently run locally with data mounted; see the first cells): 1) `0_2ndlevel_EFA.ipynb` performs exploratory factor analysis on the 2ndlevel contrasts and examines how parcels fall in factor space, and 2) `1_label_and_functional_distances.ipynb` compares the distances between 2ndlevel contrasts in functional and theory-driven spaces against null models.

## `behavioral_data_prep`
Contains code for generating events files from task data and transfering them to the BIDS directory containing the scan data.

## `docker_files` and `singularity_images`
The former contains requirement files which help create the docker image. The latter contains the singularity image(s) built out of the docker image, which can be used to run the environment on Sherlock, Stanford HPCC.

## `fmri_experiments`
Contains the code to run the experiments used in aim1 and aim2 of the project.

5. `fmri_data_prep`
Contains scripts and atlases to parcellate the data, used with collaborator Mac Shine.

6. `fmri_prepoc`
Legacy code.
Empty file modified behavioral_data_prep/DV_out/.gitignore
100644 → 100755
Empty file.
Empty file modified behavioral_data_prep/DV_out/__init__.py
100644 → 100755
Empty file.
Loading