Skip to content

Commit

Permalink
Saving modified denoiser module
Browse files Browse the repository at this point in the history
  • Loading branch information
mnarayan committed Aug 30, 2019
1 parent 669798a commit 391c6e1
Show file tree
Hide file tree
Showing 9 changed files with 1,199 additions and 0 deletions.
94 changes: 94 additions & 0 deletions src/data/02-denoiser/denoiser/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.6.1

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-


- run:
name: Install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

- restore_cache:
keys:
- test-data

- run:
name: Download test data
command: |
bash .circleci/test_data_downloader.sh
- save_cache:
paths:
- ./test_data
key: test-data

# run tests!
- run:
name: Smoke test - print help
command: |
. venv/bin/activate
./run_denoise.py --help
- run:
name: Smoke test - basic denoising
command: |
. venv/bin/activate
mkdir -p test_outputs/basic
./run_denoise.py test_data/sub-01_task-rhymejudgment_bold_space-MNI152NLin2009cAsym_preproc.nii.gz test_data/sub-01_task-rhymejudgment_bold_confounds.tsv test_outputs/basic
- run:
name: Smoke test - select subsest of columns
command: |
. venv/bin/activate
mkdir -p test_outputs/subset
./run_denoise.py test_data/sub-01_task-rhymejudgment_bold_space-MNI152NLin2009cAsym_preproc.nii.gz test_data/sub-01_task-rhymejudgment_bold_confounds.tsv test_outputs/subset --col_names FramewiseDisplacement GlobalSignal
- run:
name: Smoke test - high pass
command: |
. venv/bin/activate
mkdir -p test_outputs/hp
./run_denoise.py test_data/sub-01_task-rhymejudgment_bold_space-MNI152NLin2009cAsym_preproc.nii.gz test_data/sub-01_task-rhymejudgment_bold_confounds.tsv test_outputs/hp --hp_filter 0.009
- run:
name: Smoke test - low pass
command: |
. venv/bin/activate
mkdir -p test_outputs/lp
./run_denoise.py test_data/sub-01_task-rhymejudgment_bold_space-MNI152NLin2009cAsym_preproc.nii.gz test_data/sub-01_task-rhymejudgment_bold_confounds.tsv test_outputs/lp --lp_filter 0.1
- store_artifacts:
path: test_outputs
destination: test_outputs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -x
set -e
if [ ! -e test_data ]; then
mkdir test_data
wget http://openneuro.outputs.s3.amazonaws.com/091b91a257f6b517790f2fb82a784c8e/3e22d7c1-c7e8-4cc7-bfdd-c89dd6681982/fmriprep/sub-01/func/sub-01_task-rhymejudgment_bold_space-MNI152NLin2009cAsym_preproc.nii.gz -O test_data/sub-01_task-rhymejudgment_bold_space-MNI152NLin2009cAsym_preproc.nii.gz
wget http://openneuro.outputs.s3.amazonaws.com/091b91a257f6b517790f2fb82a784c8e/3e22d7c1-c7e8-4cc7-bfdd-c89dd6681982/fmriprep/sub-01/func/sub-01_task-rhymejudgment_bold_confounds.tsv -O test_data/sub-01_task-rhymejudgment_bold_confounds.tsv
fi
102 changes: 102 additions & 0 deletions src/data/02-denoiser/denoiser/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.idea/
Loading

0 comments on commit 391c6e1

Please sign in to comment.