From c0674548355eea5beb08c634541db53d0ff5f8f3 Mon Sep 17 00:00:00 2001 From: Golia Shafiei Date: Mon, 23 Jan 2023 17:30:03 -0500 Subject: [PATCH] minor changes --- code/.DS_Store | Bin 6148 -> 6148 bytes code/analysis/.DS_Store | Bin 6148 -> 6148 bytes code/analysis/scpt_pca.py | 6 +++--- code/analysis/scpt_pls.py | 3 +-- code/preprocessing/scpt_runBrainstorm.m | 6 ++++-- data/.DS_Store | Bin 10244 -> 10244 bytes data/SchaeferParcellation/.DS_Store | Bin 8196 -> 14340 bytes .../FreeSurfer5.3/.DS_Store | Bin 6148 -> 6148 bytes .../FreeSurfer5.3/fsaverage/.DS_Store | Bin 10244 -> 10244 bytes 9 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/.DS_Store b/code/.DS_Store index 666544032f2dc2686958d3e591061bbb07311a98..7cb93e2c1eeaeffa57060c262cf0e8efac9db66f 100644 GIT binary patch delta 37 mcmZoMXffDuk%isFP)EVo%xLl&Hv7%utbL3yfz4~!A_M`?-U>tj delta 37 mcmZoMXffDuk%isZKu5vI!esIqHv7%utbL3yfz4~!A_M`?koLJVinVsV=KL8^| B4VnM| delta 56 zcmZoMXffE}%F1qRprc@9VZ7Ogbt>cJTy}xUAK6ryn9?Upu!rz4I5IFW%=-@p6ASw{ Jvvd6A2LRo~6UzVq diff --git a/code/analysis/scpt_pca.py b/code/analysis/scpt_pca.py index 1cb7b23..7a80f74 100755 --- a/code/analysis/scpt_pca.py +++ b/code/analysis/scpt_pca.py @@ -213,7 +213,7 @@ Y = avg_snr rho = np.zeros((X.shape[1], 1)) for i in range(X.shape[1]): - tmpcorr = scipy.stats.pearsonr(X[:, i], Y) # or pearsonr + tmpcorr = scipy.stats.pearsonr(X[:, i], Y) rho[i, 0] = tmpcorr[0] surf_path = (gitrepo_dir + 'data/surfaces/') @@ -344,7 +344,7 @@ rho = np.zeros((X.shape[1], Y.shape[1])) for i in range(X.shape[1]): for j in range(Y.shape[1]): - tmpcorr = scipy.stats.pearsonr(X[:, i], Y[:, j]) # or pearsonr + tmpcorr = scipy.stats.pearsonr(X[:, i], Y[:, j]) rho[i, j] = tmpcorr[0] surf_path = (gitrepo_dir + 'data/surfaces/') @@ -590,7 +590,7 @@ rho = np.zeros((X.shape[1], Y.shape[1])) for i in range(X.shape[1]): for j in range(Y.shape[1]): - tmpcorr = scipy.stats.pearsonr(X[:, i], Y[:, j]) # or pearsonr + tmpcorr = scipy.stats.pearsonr(X[:, i], Y[:, j]) rho[i, j] = tmpcorr[0] # save to csv diff --git a/code/analysis/scpt_pls.py b/code/analysis/scpt_pls.py index c1c5643..c2cc4ab 100755 --- a/code/analysis/scpt_pls.py +++ b/code/analysis/scpt_pls.py @@ -199,7 +199,6 @@ def pls_cv_distance_dependent_par(X, Y, coords, trainpct=0.75, lv=0, pyls.save_results(outpath + 'pls/plsresults_schaefer100.hdf5', results) train, test = pls_cv_distance_dependent_par(X, Y, coords=coor) -lv = 0 # latent variable np.save(outpath + 'pls/pls_train_schaefer100.npy', train) np.save(outpath + 'pls/pls_test_schaefer100.npy', test) @@ -214,10 +213,10 @@ def pls_cv_distance_dependent_par(X, Y, coords, trainpct=0.75, lv=0, # visualize pls results # covariance explained +lv = 0 # latent variable cv = results['singvals']**2 / np.sum(results['singvals']**2) null_singvals = results['permres']['permsingvals'] cv_spins = null_singvals**2 / sum(null_singvals**2) -p = (1+sum(null_singvals[lv, :] > results['singvals'][lv]))/(1+nspinsall) myplot = sns.scatterplot(np.arange(len(cv[:10])), cv[:10]*100, facecolors='darkslategrey', s=70) diff --git a/code/preprocessing/scpt_runBrainstorm.m b/code/preprocessing/scpt_runBrainstorm.m index e44981a..0305e14 100755 --- a/code/preprocessing/scpt_runBrainstorm.m +++ b/code/preprocessing/scpt_runBrainstorm.m @@ -12,10 +12,12 @@ addpath(genpath('/usr/local/brainstorm3/')); % Run Brainstorm -hcp_meg_process_connectivity(hcp_dir, subjList, badChannels, reports_dir) +fcn_hcp_meg_process_rest(hcp_dir, subjList, badChannels, reports_dir) %% hctsa on MEG: parcellate -% addpath(genpath('/home/gshafiei/data1/Projects/HCP_Reinder/matlabcode')); +% requires cifti-matlab +% (https://github.com/Washington-University/cifti-matlab) +% addpath(genpath('/home/gshafiei/data1/Projects/packages/cifti-matlab')); hcp_dir = '/path/to/megdata/and/results/'; datapath = strcat(hcp_dir, 'brainstormResults/vertexTimeSeries'); tspath = strcat(hcp_dir, 'parcellated/HCP_MEG_TimeSeries/Schaefer100/'); diff --git a/data/.DS_Store b/data/.DS_Store index b00bd21fadf7f15ee9c94385046946d904f4cd45..40d6ebeb078782434d05ab944635e44fab834741 100644 GIT binary patch delta 166 zcmZn(XbIThATarjnBe3<0evQ>^vOE})F!VG;AeCMvX--(80sh(n;A_G5DuKoFT^@| zkKmKZ+XR#+9~NqZ$!!i0_GM(0ojgxu2Zy1F0ZhI9=DDH)jFabz2u%JfHW5|ks(2$W Nst8WCldp>F0|29vG7ta& delta 177 zcmZn(XbIThAi%_wKG{jYj*amr0|Udn$$JEpCa)0SpS(~=X)?bM>*RX^jqJt-ItoS> z#*+ht1Hoc@1fNWvBO*BYxPZ{)!$NKBMkYE6#>S?b1B87UC%+XFn7meGC5N%4xsHON pr3p}%{pPu%0gQ}4C%+S0z+q%+1XOKd1{S|6-pEUo%E?#7^#RtCHbwvd diff --git a/data/SchaeferParcellation/.DS_Store b/data/SchaeferParcellation/.DS_Store index 7c310c46a693a771d2a285d07a3f76dc10f75013..a66dae74ccb84e06db2f8a48cb6d24d6f4bf67c7 100644 GIT binary patch literal 14340 zcmeHNYit}x9iRW&j`udNapKqca^VuwyzIK?M;s?CS-XrV&9!+&P>?7Ov7 z5fs`g>`1fo{Lk+E_BW5;>=HsCnoGA55+;Pm=vhct;pG8BLM$wDtep8Jt_*VkeI0s? zQ$lo-CGDh*Oy^@uYA?-@FpJrjqpu_r#45JW8oFsrvKmRu#XJNz%FN%;)9e80|cvjA~@Z4b> zH|jhur3kRKf5n3K?jY0sx|v#3+@u@Jixq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QJ?084ZRQUCw| diff --git a/data/SchaeferParcellation/FreeSurfer5.3/fsaverage/.DS_Store b/data/SchaeferParcellation/FreeSurfer5.3/fsaverage/.DS_Store index 7d0e5f4fd426fe6fb8c3ab537c76b4a9aa897cde..2731688005ec85ef57ec470b830bdfae02770364 100644 GIT binary patch delta 21 ccmZn(XbISGM1aH4#6U;E*vx42837A%08d^9j{pDw delta 21 ccmZn(XbISGM1aHC(p*Qu(9&e{837A%08kPJpa1{>