This repo is based on the Arxiv preprint Computationally replicating the Smith et al. (2015) positive-negative mode linking functional connectivity and subject measures. The authors' github repo is outdated but they provide a link to OSF. This repo is based on the OSF project of this preprint.
The files you need (in data
):
RESTRICTED.csv
: the "restricted data" from ConnectomeDB, originally named likeRESTRICTED_yourname_MM_DD_YY_HH_MM_SS.csv
. Requires signing the restricted data use term.UNRESTRICTED.csv
: the "behavioral data" from ConnectomeDB, originally named likeUNRESTRICTED_yourname_MM_DD_YY_HH_MM_SS.csv
.netmats2.txt
: the connectivity matrix from ConnectomDB. It is in the foldernetmats/3T_HCP1200_MSMALL_d200_ts2
after unzipping the filenetmats_3T_HCP1200_MSMAll_ICAd200_ts2.tar.gz
in theHCP_PTN1200
folder of the downloaded zip fileHCP1200_Parcellation_Timeseries_Netmats.zip
.subject_list.txt
(provided here): ID of the subjects in the netmat file. Originally calledsubjectIDs.txt
. Also in theHCP_PTN1200
folder.column_headers.txt
(provided here): names of the subject measures, obtained from HCP-CCA website but changing the first variable from 'Subject ID' to 'Subject'.
To run the scripts:
- Switch to
scripts
. - Run the matlab script
summarize_movement.m
to generate aHCP1200-Motion-Summaries-rfMRI.csv
under thedata
folder. You'll need to modify the 'HCP_dir' in the first line of code. - Run the python script
NET.py
bypython3 NET.py ../data/netmats2.txt 200 1003
(netmats location, #ICA components, #subjects) to generate aNET.txt
underprocessed_data
. - Run the python script
sm_file_update.py
bypython3 sm_file_update.py ../data/UNRESTRICTED.csv ../data/RESTRICTED.csv ../data/subject_list.txt ../processed_data/
to generateb1200_m.csv
(modified unrestricted "behavioral" data),r1200_m.csv
(modified restricted data),hcp1200_family_data.csv
(family info) underprocessed_data
. - Run the python script
VARS.py
to generateVARS.txt
underprocessed_data
. - Run the matlab script
hcp_1200_cca_final.m
to do the CCA.