Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/check_markdown.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: miss_hit
name: miss_hit_quality

on:
push:
Expand Down Expand Up @@ -29,10 +29,6 @@ jobs:
python -m pip install --upgrade pip setuptools
pip3 install -r requirements.txt

- name: MISS_HIT Code style
run: |
mh_style --process-slx

- name: MISS_HIT Metrics
run: |
mh_metric --ci
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/miss_hit_style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: miss_hit_style

on:
push:
branches:
- master
pull_request:
branches: '*'

jobs:
build:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 1

- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip3 install -r requirements.txt

- name: MISS_HIT Code style
run: |
mh_style

17 changes: 3 additions & 14 deletions .github/workflows/run_system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,9 @@ jobs:
make -C spm12/src PLATFORM=octave install
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'spm12')); savepath();"

- name: Update octave path
run: |
octave $OCTFLAGS --eval "initCppSpm; savepath();"

- name: Prepare data
run: |
inputs_folder='demos/MoAE/inputs/'
mkdir $inputs_folder
curl http://www.fil.ion.ucl.ac.uk/spm/download/data/MoAEpilot/MoAEpilot.bids.zip --output $inputs_folder'MoAEpilot.zip'
unzip $inputs_folder'MoAEpilot.zip' -d $inputs_folder
mv $inputs_folder/MoAEpilot $inputs_folder/raw


- name: Run system tests
run: |
cd demos/MoAE
octave $OCTFLAGS --eval "MoAEpilot_run"
cd manualTests/
octave $OCTFLAGS --eval "systemTestMoAE"

2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

- name: Run tests
run: |
octave $OCTFLAGS --eval "runTests"
octave $OCTFLAGS --eval "run_tests"
cat test_report.log | grep 0
bash <(curl -s https://codecov.io/bash)

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ docs/build/*

# ignore virtual env
cpp_spm/*
env/*

# visual studio code stuff
.vscode
Expand Down
11 changes: 0 additions & 11 deletions .remarkrc

This file was deleted.

346 changes: 0 additions & 346 deletions CONTRIBUTING.md

This file was deleted.

22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This is a set of functions to MRI analysis on a

## Installation

TODO
<!-- TODO -->

We strongly recommend using the CPP fMRI analysis template repository (INSERT
URL) to use CPP_SPM.
Expand Down Expand Up @@ -114,6 +114,14 @@ Please see our
[documentation](https://cpp-bids-spm.readthedocs.io/en/latest/index.html) for
more info.

## Octave compatibility

The following features do not yet work with Octave:

- anatomicalQA
- functionalQA
- slice_display toolbox

## Contributing

Feel free to open issues to report a bug and ask for improvements.
Expand All @@ -125,6 +133,18 @@ or you get stuck: it is more likely we did not do good enough a job at
explaining things. So do not hesitate to open an issue, just to ask for
clarification.

### Style guidelines

These are some of the guidelines we try to follow.

We use `camelCase` to name functions and variables for the vast majority of the
code in this repository.

Scripts names in general and as well functions related to the demos use a
`snake_case`.

Constant are written in `UPPERCASE`.

## Contributors

Thanks goes to these wonderful people
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% (C) Copyright 2021 Remi Gau

function dowload_MoAE_ds(downloadData)
function download_moae_ds(downloadData)
%
% (C) Copyright 2021 Remi Gau

if downloadData

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
% we are going to extract the value from.
%

run MoAE_run.m;
run moae_run.m;

subLabel = '01';

Expand Down
7 changes: 4 additions & 3 deletions demos/MoAE/MoAE_getOption.m → demos/MoAE/moae_get_option.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
% (C) Copyright 2019 Remi Gau

function opt = MoAE_getOption()
function opt = moae_get_option()
%
% returns a structure that contains the options chosen by the user to run
% slice timing correction, pre-processing, FFX, RFX.
%
% (C) Copyright 2019 Remi Gau

opt = [];

Expand Down
21 changes: 12 additions & 9 deletions demos/MoAE/MoAE_run.m → demos/MoAE/moae_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,35 @@
run ../../initCppSpm.m;

%% Set options
opt = MoAE_getOption();
opt = moae_get_option();

dowload_MoAE_ds(downloadData);
download_moae_ds(downloadData);

%% Run batches
reportBIDS(opt);
bidsCopyRawFolder(opt, 1);

% In case you just want to run segmentation and skull stripping

bidsSegmentSkullStrip(opt);

% bidsSegmentSkullStrip(opt);
%
% NOTE: skull stripping is also included in 'bidsSpatialPrepro'

bidsSTC(opt);

bidsSpatialPrepro(opt);

% The following do not run on octave for now (because of spmup)
% anatomicalQA(opt);
% bidsResliceTpmToFunc(opt);
% functionalQA(opt);
anatomicalQA(opt);
bidsResliceTpmToFunc(opt);
functionalQA(opt);

bidsSmoothing(FWHM, opt);

% The following crash on Travis CI
% The following crash on CI
WD = pwd;
bidsFFX('specifyAndEstimate', opt, FWHM);
cd(WD);
bidsFFX('contrasts', opt, FWHM);
cd(WD);
bidsResults(opt, FWHM);
cd(WD);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
% (C) Copyright 2021 Remi Gau

run MoAE_run.m;
run MoAE_create_roi_extract_data.m;
run moae_create_roi_extract_data.m;

close all;

Expand Down
17 changes: 4 additions & 13 deletions demos/MoAE/options/options_task-auditory.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
"session": 1
"session": ""
},
"contrastList": [],
"dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
"derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/default",
"funcVoxelDims": [],
"groups": [""],
"dataDir": "./inputs/raw",
"derivativesDir": "./outputs/",
"model": {
"file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
},
"realign": {
"useUnwarp": true
"file": "./models/model-MoAE_smdl.json"
},
"result": {
"Steps": {
Expand Down Expand Up @@ -41,9 +34,7 @@
"skullstrip": {
"threshold": 0.75
},
"sliceOrder": [],
"space": "MNI",
"subjects": [[]],
"taskName": "auditory",
"useFieldmaps": true,
"zeropad": 2
Expand Down
12 changes: 4 additions & 8 deletions demos/MoAE/options/options_task-auditory_space-individual.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
"session": 1
"session": ""
},
"contrastList": [],
"dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
"derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/native",
"funcVoxelDims": [],
"dataDir": "./inputs/raw",
"derivativesDir": "./outputs/",
"model": {
"file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
"file": "./models/model-MoAE_smdl.json"
},
"realign": {
"useUnwarp": true
Expand Down Expand Up @@ -40,7 +37,6 @@
"skullstrip": {
"threshold": 0.75
},
"sliceOrder": [],
"space": "individual",
"taskName": "auditory",
"useFieldmaps": true,
Expand Down
12 changes: 4 additions & 8 deletions demos/MoAE/options/options_task-auditory_unwarp-0.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
"session": 1
"session": ""
},
"contrastList": [],
"dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
"derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/unwarp-0",
"funcVoxelDims": [],
"dataDir": "./inputs/raw",
"derivativesDir": "./outputs/",
"model": {
"file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
"file": "./models/model-MoAE_smdl.json"
},
"realign": {
"useUnwarp": false
Expand Down Expand Up @@ -40,7 +37,6 @@
"skullstrip": {
"threshold": 0.75
},
"sliceOrder": [],
"space": "MNI",
"taskName": "auditory",
"useFieldmaps": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"STC_referenceSlice": [],
"anatReference": {
"type": "T1w",
"session": 1
"session": ""
},
"contrastList": [],
"dataDir": "/home/remi/github/CPP_SPM/demos/MoAE/output/MoAEpilot",
"derivativesDir": "/home/remi/github/CPP_SPM/demos/MoAE/derivatives/unwarp-0_native",
"funcVoxelDims": [],
"dataDir": "./inputs/raw",
"derivativesDir": "./outputs/",
"model": {
"file": "/home/remi/github/CPP_SPM/demos/MoAE/models/model-MoAE_smdl.json"
"file": "./models/model-MoAE_smdl.json"
},
"realign": {
"useUnwarp": false
Expand Down Expand Up @@ -40,7 +37,6 @@
"skullstrip": {
"threshold": 0.75
},
"sliceOrder": [],
"space": "individual",
"taskName": "auditory",
"useFieldmaps": true,
Expand Down
4 changes: 2 additions & 2 deletions demos/MoAE/return_normalized_anat_file.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% (C) Copyright 2021 Remi Gau

function [anat_normalized_file, anatRange] = return_normalized_anat_file(opt, subLabel)
%
% (C) Copyright 2021 Remi Gau

[BIDS, opt] = getData(opt);
[~, anatDataDir] = getAnatFilename(BIDS, subLabel, opt);
Expand Down
Loading