This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usage() { echo "Usage: $0 [-i <mris_anatomical_stats output>]" 1>&2; exit 1; } | |
while getopts ":i:" o; do | |
case "${o}" in | |
i) | |
i=${OPTARG} | |
;; | |
*) | |
usage | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage() { echo "Usage: $0 [-s <subject>]" 1>&2; exit 1; } | |
while getopts ":s:" o; do | |
case "${o}" in | |
s) | |
s=${OPTARG} | |
;; | |
*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# execute one directory above labeldir and volumedir | |
# usage: ./volumes_from_labels.sh | |
volumedir='volumedir' | |
if [ ! -d $volumedir ]; then | |
mkdir volumedir | |
fi | |
for lab in `ls labeldir/l*.label`; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: make_design.sh -s subjects.txt -b behavior.txt -f 5 -n workingmemory | |
# behavior file should be space delimited with subject in first field | |
usage() { echo "Usage: $0 [-s <subject list>] [-b <behavior file>] [-f <behavior field>] [-n <behavior name>]" 1>&2; exit 1; } | |
while getopts ":s:b:f:n:" o; do | |
case "${o}" in | |
s) | |
s=${OPTARG} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
overlay = MRIread('lh.thickness.fsaverage.mgh'); | |
asc = load('lh_thickness_data.asc'); | |
asc_reshaped = reshape(asc(:,5), overlay.volsize) | |
overlay.vol = fast_mat2vol(asc_reshaped, overlay.volsize); | |
MRIwrite(overlay, 'lh_thickness_data.mgh'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Use fslmaths with -thr and -uthr options to extract | |
# each individual network value and save in net/value. | |
# Concatenate networks temporally. | |
# | |
# 2016-02-20 | |
# Banich Lab | |
# University of Colorado Boulder | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Convert Yeo's 7 network liberal parcellation from FreeSurfer space to FSL MNI 2mm space. | |
# Reference network source: | |
# https://surfer.nmr.mgh.harvard.edu/fswiki/CorticalParcellation_Yeo2011 | |
# | |
# 2016-02-20 | |
# Banich Lab | |
# University of Colorado Boulder | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from bokeh.plotting import * | |
from bokeh.objects import HoverTool, ColumnDataSource | |
# | |
########## Load data ########## | |
# | |
data_path = '/path/to/data/' | |
node_file = data_path + '/nodes.csv' # 1 column of node names - header = "name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% requires brain connectivity toolbox in path | |
files = dir('*.csv'); | |
n = size(files, 1); | |
% | |
modules = csvread('modules.txt'); | |
mods_of_interest = [1, 4, 6, 7, 8, 10, 11, 14]; | |
keep_list = find(ismember(modules, mods_of_interest)); | |
mods_short = modules(keep_list); |