Skip to content
Snippets Groups Projects
Commit 222bf918 authored by Fidel Alfaro Almagro's avatar Fidel Alfaro Almagro :speech_balloon:
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
export FSLDIR="$HOME/fsl" # Change according to the user's FSL installation
export BB_BIN_DIR="$HOME/BIP/" # Change according to the present folder
export PATH="$BB_BIN_DIR:$BB_BIN_DIR/data:$BB_BIN_DIR/bb_pipeline:$PATH"
export PYTHONPATH="$BB_BIN_DIR:$PYTHONPATH"
.DS_Store
list_*.txt
File added
# Installing FSL (with its own miniconda)
curl https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py > fslinstaller.py
python ./fslinstaller.py --no_env --dest $HOME/fsl/
export FSLDIR="$HOME/fsl"
export PATH="$FSLDIR/bin/:$PATH"
pushd $FSLDIR
git clone https://git.fmrib.ox.ac.uk/fsl/fslpy
cd fslpy
$FSLDIR/bin/pip install -e .
popd
rm -f ./fslinstaller.py
# Creating a new python environment
$FSLDIR/bin/conda create -n ukb python=3.10
source $FSLDIR/bin/activate ukb
pip install file-tree file-tree-fsl
pip install git+https://git.fmrib.ox.ac.uk/ndcn0236/pipe-tree.git
pip install -r $BB_BIN_DIR/install_dir/requirements.txt
pip list &> $BB_BIN_DIR/install_dir/list_`date +%Y_%m_%d`.txt
# Install gradunwarp
tar -zxvf gradunwarp_FMRIB.tar.gz
cd gradunwarp_FMRIB
python setup.py install
cd ..
rm -rf gradunwarp_FMRIB
oxasl
oxasl-deblur
pickle-mixin
Babel
Jinja2
MarkupSafe
Pillow
PyWavelets
Sphinx
Theano
bottom
deprecation
jupyter-core
niicat
nose
pygam
retrying
simplegeneric
graphviz
pickleshare
ipython
seaborn
jsonschema
python-utils
zipp
urllib3
scikit-image
scikit-learn
from setuptools import setup,find_packages
with open('requirements.txt', 'rt') as f:
install_requires = [l.strip() for l in f.readlines()]
setup(name='BIP',
version='1.0.0',
description='Brain Imaging Pipeline',
author='Fidel Alfaro Almagro',
install_requires=install_requires,
scripts=['BIP/general/BIP'],
packages=find_packages(),
include_package_data=True)
.DS_Store
#!/usr/bin/env python
#
# standard_space_roi.py - Wrapper for the standard_space_roi command.
#
# Author: Fidel Alfaro Almagro
#
"""This module provides the :func:`standard_space_roi` function, a wrapper for
the FSL `standard_space_roi`_ command.
"""
import fsl.utils.assertions as asrt
from fsl.wrappers import wrapperutils as wutils
@wutils.fileOrImage('input', 'maskMASK', 'roiMASK', 'ssref', 'altinput',outprefix='output')
@wutils.fslwrapper
def standard_space_roi(input, output, **kwargs):
"""Wrapper for the ``standard_space_roi`` command.
:arg maskFOV: Mask output using transformed standard space FOV (default)
:arg maskMASK: Mask output using transformed standard space mask
:arg maskNONE: Do not mask output
:arg roiFOV: Cut down input FOV using bounding box of the transformed standard space FOV (default)
:arg roiMASK: Cut down input FOV using nonbackground bounding box of the transformed standard space mask
:arg roiNONE: Co not cut down input FOV
:arg ssref Standard space reference image to use (default $FSLDIR/data/standard/MNI152_T1)
:arg altinput Alternative input image to apply the ROI to (instead of the one used to register to the reference)
:arg d Debug (don't delete intermediate files)
:arg b Betpremask, equivalent to: -maskMASK $FSLDIR/data/standard/MNI152_T1_2mm_brain_mask_dil -roiNONE
Refer to the ``standard_space_roi`` command-line help for details on all arguments.
"""
asrt.assertIsNifti(input)
valmap = {
'maskFOV' : wutils.SHOW_IF_TRUE,
'maskNONE' : wutils.SHOW_IF_TRUE,
'roiFOV' : wutils.SHOW_IF_TRUE,
'roiNONE' : wutils.SHOW_IF_TRUE,
'd' : wutils.SHOW_IF_TRUE,
'b' : wutils.SHOW_IF_TRUE,
}
cmd = ['standard_space_roi', input, output]
cmd += wutils.applyArgStyle('-', valmap=valmap, **kwargs)
return cmd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment