Skip to content

Commit

Permalink
FIX name the data properly
Browse files Browse the repository at this point in the history
Accept the weird loacal configuration and embrace neurolibre competible
set up.

- update repo2data requirements
- Makefile to grab data with repo2data
- update all the relevant path
  • Loading branch information
htwangtw committed May 16, 2023
1 parent 26e5cfe commit 9b1bd92
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
.PHONY: help atlas data book all
.PHONY: help data book all

PYTHON ?= python

all: atlas data book figures
all: data book figures

help:
@echo "Please use 'make <target>' where <target> is one of:"
@echo " atlas to download atlases for analysis"
@echo " data to download data needed for jupyter book"
@echo " data to download data needed for jupyter book with repo2data"
@echo " book to compile the jupyter book"
@echo " figures to make all manuscript figures"
@echo " all to run 'atlas', templateflow, and 'book'"

atlas:
@echo "Download the original atlases..."
if [ ! -d inputs/custome_templateflow ]; then wget -c -O custome_templateflow.tar.gz "https://zenodo.org/record/7362211/files/custome_templateflow.tar.gz?download=1" && mkdir -p inputs && tar xf custome_templateflow.tar.gz -C inputs && rm custome_templateflow.tar.gz; fi

data:
@echo "Download input data to build the report"
if [ ! -d inputs/denoise-metrics ]; then wget -c -O denoise-metrics.tar.gz "https://zenodo.org/record/7764979/files/denoise-metrics.tar.gz?download=1" && mkdir -p inputs && tar xf denoise-metrics.tar.gz -C inputs && rm denoise-metrics.tar.gz; fi
cd content/notebooks && repo2data -r ../../binder/data_requirement.json && cd ../..

book:
jb build content --all

figures: inputs/denoise-metrics
figures: inputs/fmriprep-denoise-benchmark/denoise-metrics
$(PYTHON) scripts/make_manuscript_figures.py
8 changes: 5 additions & 3 deletions binder/data_requirement.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{ "src": "10.5281/zenodo.7764979",
"dst": "..",
"projectName": "inputs"}
{
"src": "10.5281/zenodo.7764979",
"dst": "../inputs",
"projectName": "fmriprep-denoise-benchmark"
}
3 changes: 2 additions & 1 deletion fmriprep_denoise/visualization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def repo2data_path():

def get_data_root():
"""Get motion metric data path root."""
default_path = Path(__file__).parents[2] / "inputs"
default_path = Path(__file__).parents[2] / \
"inputs" / "fmriprep-denoise-benchmark"
if not (default_path / "data_requirement.json").exists():
default_path = repo2data_path()
return default_path
Expand Down
3 changes: 2 additions & 1 deletion scripts/make_manuscript_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@


if __name__ == "__main__":
path_root = Path(__file__).parents[1] / "inputs" / "denoise-metrics"
path_root = Path(__file__).parents[1] / "inputs" / \
"fmriprep-denoise-benchmark" / "denoise-metrics"
strategy_order = list(utils.GRID_LOCATION.values())

# mean fd
Expand Down

0 comments on commit 9b1bd92

Please sign in to comment.