This repository has been archived by the owner on Sep 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
setup_workshop
executable file
·53 lines (40 loc) · 2 KB
/
setup_workshop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# First step is to determine whether the system is on SciNet or not
# Check current path
SCINET_REPO=/scinet/course/ss2019/3/6_mripython/
#If Scinet then enter first name to create Repo
if [ -d "$SCINET_REPO" ]; then
echo "Please enter your first name (no spaces or special characters!)"
read first_name
mkdir -p $HOME/$first_name/
git clone https://github.com/jerdra/scwg2018_python_neuroimaging.git $HOME/$first_name
rm -rf "$HOME/$first_name/data"
ln -s "$SCINET_REPO"/data $HOME/$first_name/data
echo "Workshop at $HOME/$first_name"
#Otherwise we use a Binder instance
else
echo "Assuming that you're using a Binder instance, downloading data!"
# download fmriprep preprocessed anat data
cat download_list | head -3 | \
xargs -I '{}' aws s3 sync --no-sign-request \
s3://openneuro/ds000030/ds000030_R1.0.5/uncompressed/derivatives/fmriprep/{}/anat \
./data/ds000030/derivatives/fmriprep/{}/anat --exclude "*" --include "*preproc.nii.gz" --include "*mask.nii.gz"
# download fmriprep preprocessed func data
cat download_list | head -3 | \
xargs -I '{}' aws s3 sync --no-sign-request \
s3://openneuro/ds000030/ds000030_R1.0.5/uncompressed/derivatives/fmriprep/{}/func \
./data/ds000030/derivatives/fmriprep/{}/func \
--exclude '*' \
--include '*task-rest_bold*'
cat download_list | \
xargs -I '{}' aws s3 sync --no-sign-request \
s3://openneuro/ds000030/ds000030_R1.0.5/uncompressed/derivatives/fmriprep/{}/anat \
./data/ds000030/derivatives/fmriprep/{}/anat --exclude "*" --include "*preproc.nii.gz" --include "*mask.nii.gz"
# download fmriprep preprocessed func data
cat download_list | \
xargs -I '{}' aws s3 sync --no-sign-request \
s3://openneuro/ds000030/ds000030_R1.0.5/uncompressed/derivatives/fmriprep/{}/func \
./data/ds000030/derivatives/fmriprep/{}/func \
--exclude '*' \
--include '*task-rest_bold*'
fi