Skip to content

Commit

Permalink
[NEW 🗽] sctx-sctx connectivity and fc/sc matrix as one
Browse files Browse the repository at this point in the history
  • Loading branch information
saratheriver committed Nov 13, 2020
1 parent 703e5a4 commit 74fbf9e
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 9 deletions.
6 changes: 4 additions & 2 deletions enigmatoolbox/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .base import (load_conte69, load_sc, load_fc,
load_fsa5, load_subcortical, structural_covariance,
fetch_ahba, risk_genes, load_example_data,
load_summary_stats)
load_summary_stats, load_fc_as_one, load_sc_as_one)

__all__ = ['load_conte69',
'load_fsa5',
Expand All @@ -12,4 +12,6 @@
'fetch_ahba',
'risk_genes',
'load_example_data',
'load_summary_stats']
'load_summary_stats',
'load_fc_as_one',
'load_sc_as_one']
Binary file modified enigmatoolbox/datasets/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file modified enigmatoolbox/datasets/__pycache__/base.cpython-37.pyc
Binary file not shown.
46 changes: 46 additions & 0 deletions enigmatoolbox/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,52 @@ def load_fc():
np.loadtxt(sctxL_ipth, dtype='str', delimiter=',')


def load_sc_as_one():
""" Load structural connectivity data (cortical + subcortical in one matrix) parcellated
using Desikan Killiany (author: @saratheriver)
Returns
-------
strucMatrix_ctx : 2D ndarray
Structural connectivity, shape = (82, 82)
strucLabels_ctx : 1D ndarray
Region labels, shape = (82,)
"""
root_pth = os.path.dirname(__file__)

ctx = 'strucMatrix_with_sctx.csv'
ctx_ipth = os.path.join(root_pth, 'matrices', 'hcp_connectivity', ctx)

ctxL = 'strucLabels_with_sctx.csv'
ctxL_ipth = os.path.join(root_pth, 'matrices', 'hcp_connectivity', ctxL)

return np.loadtxt(ctx_ipth, dtype=np.float, delimiter=','), \
np.loadtxt(ctxL_ipth, dtype='str', delimiter=','), \


def load_fc_as_one():
""" Load functional connectivity data (cortical + subcortical in one matrix) parcellated
using Desikan Killiany (author: @saratheriver)
Returns
-------
funcMatrix_ctx : 2D ndarray
Functional connectivity, shape = (82, 82)
funcLabels_ctx : 1D ndarray
Region labels, shape = (82,)
"""
root_pth = os.path.dirname(__file__)

ctx = 'funcMatrix_with_sctx.csv'
ctx_ipth = os.path.join(root_pth, 'matrices', 'hcp_connectivity', ctx)

ctxL = 'funcLabels_with_sctx.csv'
ctxL_ipth = os.path.join(root_pth, 'matrices', 'hcp_connectivity', ctxL)

return np.loadtxt(ctx_ipth, dtype=np.float, delimiter=','), \
np.loadtxt(ctxL_ipth, dtype='str', delimiter=','), \


def structural_covariance(zdata):
""" Construction of intra-individual brain structural covariance networks
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
L,_,b,a,n,k,s,s,t,s,L,_,c,a,u,d,a,l,a,n,t,e,r,i,o,r,c,i,n,g,u,l,a,t,e,L,_,c,a,u,d,a,l,m,i,d,d,l,e,f,r,o,n,t,a,l,L,_,c,u,n,e,u,s,L,_,e,n,t,o,r,h,i,n,a,l,L,_,f,u,s,i,f,o,r,m,L,_,i,n,f,e,r,i,o,r,p,a,r,i,e,t,a,l,L,_,i,n,f,e,r,i,o,r,t,e,m,p,o,r,a,l,L,_,i,s,t,h,m,u,s,c,i,n,g,u,l,a,t,e,L,_,l,a,t,e,r,a,l,o,c,c,i,p,i,t,a,l,L,_,l,a,t,e,r,a,l,o,r,b,i,t,o,f,r,o,n,t,a,l,L,_,l,i,n,g,u,a,l,L,_,m,e,d,i,a,l,o,r,b,i,t,o,f,r,o,n,t,a,l,L,_,m,i,d,d,l,e,t,e,m,p,o,r,a,l,L,_,p,a,r,a,h,i,p,p,o,c,a,m,p,a,l,L,_,p,a,r,a,c,e,n,t,r,a,l,L,_,p,a,r,s,o,p,e,r,c,u,l,a,r,i,s,L,_,p,a,r,s,o,r,b,i,t,a,l,i,s,L,_,p,a,r,s,t,r,i,a,n,g,u,l,a,r,i,s,L,_,p,e,r,i,c,a,l,c,a,r,i,n,e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,l,i,s,R,_,p,a,r,s,t,r,i,a,n,g,u,l,a,r,i,s,R,_,p,e,r,i,c,a,l,c,a,r,i,n,e,R,_,p,o,s,t,c,e,n,t,r,a,l,R,_,p,o,s,t,e,r,i,o,r,c,i,n,g,u,l,a,t,e,R,_,p,r,e,c,e,n,t,r,a,l,R,_,p,r,e,c,u,n,e,u,s,R,_,r,o,s,t,r,a,l,a,n,t,e,r,i,o,r,c,i,n,g,u,l,a,t,e,R,_,r,o,s,t,r,a,l,m,i,d,d,l,e,f,r,o,n,t,a,l,R,_,s,u,p,e,r,i,o,r,f,r,o,n,t,a,l,R,_,s,u,p,e,r,i,o,r,p,a,r,i,e,t,a,l,R,_,s,u,p,e,r,i,o,r,t,e,m,p,o,r,a,l,R,_,s,u,p,r,a,m,a,r,g,i,n,a,l,R,_,f,r,o,n,t,a,l,p,o,l,e,R,_,t,e,m,p,o,r,a,l,p,o,l,e,R,_,t,r,a,n,s,v,e,r,s,e,t,e,m,p,o,r,a,l,R,_,i,n,s,u,l,a,L,a,c,c,u,m,b,L,a,m,y,g,L,c,a,u,d,L,h,i,p,p,o,L,p,a,l,L,p,u,t,L,t,h,a,l,R,a,c,c,u,m,b,R,a,m,y,g,R,c,a,u,d,R,h,i,p,p,o,R,p,a,l,R,p,u,t,R,t,h,a,l
L_bankssts,L_caudalanteriorcingulate,L_caudalmiddlefrontal,L_cuneus,L_entorhinal,L_fusiform,L_inferiorparietal,L_inferiortemporal,L_isthmuscingulate,L_lateraloccipital,L_lateralorbitofrontal,L_lingual,L_medialorbitofrontal,L_middletemporal,L_parahippocampal,L_paracentral,L_parsopercularis,L_parsorbitalis,L_parstriangularis,L_pericalcarine,L_postcentral,L_posteriorcingulate,L_precentral,L_precuneus,L_rostralanteriorcingulate,L_rostralmiddlefrontal,L_superiorfrontal,L_superiorparietal,L_superiortemporal,L_supramarginal,L_frontalpole,L_temporalpole,L_transversetemporal,L_insula,R_bankssts,R_caudalanteriorcingulate,R_caudalmiddlefrontal,R_cuneus,R_entorhinal,R_fusiform,R_inferiorparietal,R_inferiortemporal,R_isthmuscingulate,R_lateraloccipital,R_lateralorbitofrontal,R_lingual,R_medialorbitofrontal,R_middletemporal,R_parahippocampal,R_paracentral,R_parsopercularis,R_parsorbitalis,R_parstriangularis,R_pericalcarine,R_postcentral,R_posteriorcingulate,R_precentral,R_precuneus,R_rostralanteriorcingulate,R_rostralmiddlefrontal,R_superiorfrontal,R_superiorparietal,R_superiortemporal,R_supramarginal,R_frontalpole,R_temporalpole,R_transversetemporal,R_insula,Laccumb,Lamyg,Lcaud,Lhippo,Lpal,Lput,Lthal,Raccumb,Ramyg,Rcaud,Rhippo,Rpal,Rput,Rthal
Original file line number Diff line number Diff line change
@@ -1 +1 @@
L,_,b,a,n,k,s,s,t,s,L,_,c,a,u,d,a,l,a,n,t,e,r,i,o,r,c,i,n,g,u,l,a,t,e,L,_,c,a,u,d,a,l,m,i,d,d,l,e,f,r,o,n,t,a,l,L,_,c,u,n,e,u,s,L,_,e,n,t,o,r,h,i,n,a,l,L,_,f,u,s,i,f,o,r,m,L,_,i,n,f,e,r,i,o,r,p,a,r,i,e,t,a,l,L,_,i,n,f,e,r,i,o,r,t,e,m,p,o,r,a,l,L,_,i,s,t,h,m,u,s,c,i,n,g,u,l,a,t,e,L,_,l,a,t,e,r,a,l,o,c,c,i,p,i,t,a,l,L,_,l,a,t,e,r,a,l,o,r,b,i,t,o,f,r,o,n,t,a,l,L,_,l,i,n,g,u,a,l,L,_,m,e,d,i,a,l,o,r,b,i,t,o,f,r,o,n,t,a,l,L,_,m,i,d,d,l,e,t,e,m,p,o,r,a,l,L,_,p,a,r,a,h,i,p,p,o,c,a,m,p,a,l,L,_,p,a,r,a,c,e,n,t,r,a,l,L,_,p,a,r,s,o,p,e,r,c,u,l,a,r,i,s,L,_,p,a,r,s,o,r,b,i,t,a,l,i,s,L,_,p,a,r,s,t,r,i,a,n,g,u,l,a,r,i,s,L,_,p,e,r,i,c,a,l,c,a,r,i,n,e,L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,i,s,R,_,p,a,r,s,t,r,i,a,n,g,u,l,a,r,i,s,R,_,p,e,r,i,c,a,l,c,a,r,i,n,e,R,_,p,o,s,t,c,e,n,t,r,a,l,R,_,p,o,s,t,e,r,i,o,r,c,i,n,g,u,l,a,t,e,R,_,p,r,e,c,e,n,t,r,a,l,R,_,p,r,e,c,u,n,e,u,s,R,_,r,o,s,t,r,a,l,a,n,t,e,r,i,o,r,c,i,n,g,u,l,a,t,e,R,_,r,o,s,t,r,a,l,m,i,d,d,l,e,f,r,o,n,t,a,l,R,_,s,u,p,e,r,i,o,r,f,r,o,n,t,a,l,R,_,s,u,p,e,r,i,o,r,p,a,r,i,e,t,a,l,R,_,s,u,p,e,r,i,o,r,t,e,m,p,o,r,a,l,R,_,s,u,p,r,a,m,a,r,g,i,n,a,l,R,_,f,r,o,n,t,a,l,p,o,l,e,R,_,t,e,m,p,o,r,a,l,p,o,l,e,R,_,t,r,a,n,s,v,e,r,s,e,t,e,m,p,o,r,a,l,R,_,i,n,s,u,l,a,L,a,c,c,u,m,b,L,a,m,y,g,L,c,a,u,d,L,h,i,p,p,o,L,p,a,l,L,p,u,t,L,t,h,a,l,R,a,c,c,u,m,b,R,a,m,y,g,R,c,a,u,d,R,h,i,p,p,o,R,p,a,l,R,p,u,t,R,t,h,a,l
L_bankssts,L_caudalanteriorcingulate,L_caudalmiddlefrontal,L_cuneus,L_entorhinal,L_fusiform,L_inferiorparietal,L_inferiortemporal,L_isthmuscingulate,L_lateraloccipital,L_lateralorbitofrontal,L_lingual,L_medialorbitofrontal,L_middletemporal,L_parahippocampal,L_paracentral,L_parsopercularis,L_parsorbitalis,L_parstriangularis,L_pericalcarine,L_postcentral,L_posteriorcingulate,L_precentral,L_precuneus,L_rostralanteriorcingulate,L_rostralmiddlefrontal,L_superiorfrontal,L_superiorparietal,L_superiortemporal,L_supramarginal,L_frontalpole,L_temporalpole,L_transversetemporal,L_insula,R_bankssts,R_caudalanteriorcingulate,R_caudalmiddlefrontal,R_cuneus,R_entorhinal,R_fusiform,R_inferiorparietal,R_inferiortemporal,R_isthmuscingulate,R_lateraloccipital,R_lateralorbitofrontal,R_lingual,R_medialorbitofrontal,R_middletemporal,R_parahippocampal,R_paracentral,R_parsopercularis,R_parsorbitalis,R_parstriangularis,R_pericalcarine,R_postcentral,R_posteriorcingulate,R_precentral,R_precuneus,R_rostralanteriorcingulate,R_rostralmiddlefrontal,R_superiorfrontal,R_superiorparietal,R_superiortemporal,R_supramarginal,R_frontalpole,R_temporalpole,R_transversetemporal,R_insula,Laccumb,Lamyg,Lcaud,Lhippo,Lpal,Lput,Lthal,Raccumb,Ramyg,Rcaud,Rhippo,Rpal,Rput,Rthal
2 changes: 1 addition & 1 deletion matlab/scripts/load_connectivity/load_fc.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% [funcMatrix_ctx, funcLabels_ctx, funcMatrix_sctx, funcLabels_sctx] = load_fc()
%
% Description:
% Load structural connectivity data parcellated using Desikan Killiany (author: @saratheriver)
% Load functional connectivity data parcellated using Desikan Killiany (author: @saratheriver)
%
% Outputs:
% funcMatrix_ctx (double array) - Cortico-cortical connectivity, size = [68 x 68]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function [funcMatrix, funcLabels] = load_fc_with_stcx()
function [funcMatrix, funcLabels] = load_fc_as_one()
%
% Usage:
% [funcMatrix_ctx, funcLabels_ctx] = load_fc_with_stcx()
% [funcMatrix_ctx, funcLabels_ctx] = load_fc_as_one()
%
% Description:
% Load functional connectivity data (cortical + subcortical in one matrix)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function [strucMatrix, strucLabels] = load_sc_with_stcx()
function [strucMatrix, strucLabels] = load_sc_as_one()
%
% Usage:
% [strucMatrix_ctx, strucLabels_ctx] = load_sc_with_stcx()
% [strucMatrix_ctx, strucLabels_ctx] = load_sc_as_one()
%
% Description:
% Load structural connectivity data (cortical + subcortical in one matrix)
Expand Down

0 comments on commit 74fbf9e

Please sign in to comment.