Skip to content

ENH: Updates interface for FSL's eddy command #3008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 87 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
ca19b09
add mrresize and update mrtrix3 tests
josephmje Aug 19, 2019
862f9d6
Fix #2995
Aug 20, 2019
6f71654
Fix documentation
vferat Aug 20, 2019
01fa94e
Add index_mask_file input to ImageStats
pndni-builder Aug 20, 2019
ac54739
add new autogenerated test file
pndni-builder Aug 21, 2019
22efaf7
add index_mask_file desc
stilley2 Aug 22, 2019
8129ff4
run make check-before-commit without error
vferat Aug 23, 2019
1f92bd5
Merge pull request #1 from vferat/fix/mne_watershed_bem
vferat Aug 23, 2019
35c0337
update eddy outputs
josephmje Aug 28, 2019
2c53a90
update eddy outputspec
josephmje Aug 28, 2019
699f8d1
fix doctests and ensure fieldmap path includes directory path
josephmje Aug 29, 2019
bdd554e
correct stop criterion flag
bilgelm Aug 29, 2019
d18b159
update PETPVC tests
bilgelm Aug 29, 2019
7d8fdfe
ENH: Add ``--rescale-intensities`` and name_source to N4BiasFieldCorr…
oesteban Aug 29, 2019
9235266
Merge pull request #3010 from bilgelm/master
effigies Aug 30, 2019
beefe81
Merge pull request #3005 from stilley2/feature/index_mask_file
effigies Aug 30, 2019
355965d
fix: add _out_bias_file as a member, following @effigies' suggestion
oesteban Aug 30, 2019
834df60
Revert "Merge pull request #1 from vferat/fix/mne_watershed_bem"
vferat Aug 30, 2019
183ab88
Revert "run make check-before-commit without error"
vferat Aug 30, 2019
fc221f8
FIX command
vferat Aug 30, 2019
0b695ae
fix: make sure returned paths are absolute
oesteban Aug 30, 2019
4af4c07
enh: note that new ``-r`` option works only with ants>=2.1.0 [skip ci]
oesteban Aug 30, 2019
2820411
fix: address @effigies' comments
oesteban Aug 30, 2019
6818e97
fix: add ELLIPSIS to doctest
oesteban Aug 30, 2019
f37b65e
fix: roll back ELLIPSIS, calculate abspath in _list_outputs()
oesteban Aug 30, 2019
216db0d
Merge pull request #3011 from oesteban/fix/N4-updates
oesteban Aug 31, 2019
cd227a2
(enh) additional arguments to ANTs N4BiasFieldCorrection
rciric Aug 12, 2019
ff66eae
Merge pull request #3012 from nipy/enh/n4_args
effigies Sep 3, 2019
2642799
Merge pull request #3007 from vferat/master
effigies Sep 5, 2019
508df5e
TEST: make specs
effigies Sep 5, 2019
52818ea
FIX: loadpkl failed when pklz file contained versioning info
pndni-builder Sep 5, 2019
c6047de
parametrize test (suggested by @effigies)
pndni-builder Sep 5, 2019
56ab01e
remove versioning option from loadpkl
pndni-builder Sep 5, 2019
a86d140
Revert "remove versioning option from loadpkl"
pndni-builder Sep 5, 2019
d3a15e9
test versioning in loadpkl
pndni-builder Sep 5, 2019
bbc696f
move loadpkl tests to proper location
pndni-builder Sep 5, 2019
64c7b24
Merge pull request #3017 from stilley2/fix/loadpkl
effigies Sep 6, 2019
11d3422
added simple version of 3dTsmooth
gpiantoni Jun 25, 2019
f341089
add all options for 3dTsmooth
gpiantoni Jun 26, 2019
0a05ce9
added autotest for TSmooth
gpiantoni Jun 26, 2019
8d76fd2
remove genfile from out_file of TSmooth and fix order of arguments in…
gpiantoni Sep 5, 2019
0fc9b88
Remove versioning from loadpkl
pndni-builder Sep 6, 2019
56e5715
added auto test for 3dTsmooth (without removing other files)
gpiantoni Sep 6, 2019
001a56a
Merge pull request #3019 from stilley2/remove_versioning
effigies Sep 6, 2019
09d55ec
Merge pull request #2948 from gpiantoni/3dTsmooth
effigies Sep 6, 2019
19ce2c1
fix(loadpkl): ensure a value is returned and it is not None
oesteban Sep 5, 2019
13a7556
Merge pull request #3020 from oesteban/maint/3014-related
effigies Sep 6, 2019
6b996c0
rel(1.2.2): Update changelog
oesteban Sep 5, 2019
5f028b3
rel(1.2.2): Update .mailmap
oesteban Sep 5, 2019
3428c8a
rel(1.2.2): Update ``.zenodo.json``
oesteban Sep 5, 2019
968a76f
rel(1.2.2): Update version in ``nipype/info.py`` and ``doc/conf.py``
oesteban Sep 5, 2019
7df091d
rel(1.2.2): revise problems spotted by @effigies'
oesteban Sep 5, 2019
4ac9ecd
rel(1.2.2): Add @bilgelm to ``.zenodo.json``, cherry-picking e520a8832
bilgelm Sep 5, 2019
875c75c
rel(1.2.2): update .zenodo.json
oesteban Sep 6, 2019
b61585f
rel(1.2.2): Update changelog
oesteban Sep 6, 2019
5f8be53
rel(1.2.2): Update changelog
oesteban Sep 6, 2019
c54c744
Merge pull request #3015 from nipy/rel/1.2.2
oesteban Sep 7, 2019
4b69cfc
DOC: Update changelog
effigies Sep 7, 2019
1faaa3f
MAINT: Bump dev version
effigies Sep 7, 2019
9cf7622
rel(1.2.2): Update changelog
oesteban Sep 7, 2019
51fb423
rel(1.2.2): Update .zenodo.json [skip ci]
oesteban Sep 7, 2019
0470641
Merge pull request #3021 from nipy/rel/1.2.2-b
oesteban Sep 7, 2019
651a042
enh: replace portalocker with filelock and use locking for reading/wr…
satra Sep 10, 2019
e1c792b
fix: add filelock to packages
satra Sep 10, 2019
26b0eb6
Apply suggestions from code review
satra Sep 10, 2019
fdf12b7
fix: address review comments
satra Sep 11, 2019
2162c84
Merge pull request #3025 from satra/enh/filelock
oesteban Sep 11, 2019
c510d5e
FIX: Disallow returning ``None`` in ``pipeline.utils.load_resultfile``
oesteban Sep 10, 2019
63d5b68
fix: revise ``report_crash`` to get along with the changes
oesteban Sep 10, 2019
be60243
tst: adding first test
oesteban Sep 10, 2019
49ada18
fix: amend tests to work on py35 and add mobility test
oesteban Sep 10, 2019
0b510ed
fix: address @satra's comment
oesteban Sep 11, 2019
a200bc5
fix: rebase arg not honored + improved tests (add xfail mark for pyth…
oesteban Sep 11, 2019
01de656
Merge pull request #3023 from oesteban/fix/revise-load_resultfile
oesteban Sep 11, 2019
686aef9
ENH: Lightweight node cache checking
oesteban Sep 11, 2019
57a8db2
maint: add relevant code comment + minimal stylistic changes [skip ci]
oesteban Sep 11, 2019
dd29031
ENH: Avoid loading result from file when writing reports
oesteban Sep 10, 2019
8bfef03
fix: address failing tests, add tests for patched Path
oesteban Sep 11, 2019
a62a369
Update nipype/utils/filemanip.py [skip ci]
oesteban Sep 11, 2019
c120ee5
fix: address @effigies' review comments
oesteban Sep 11, 2019
e7a6200
Update nipype/pipeline/engine/nodes.py
oesteban Sep 11, 2019
4c414b8
Merge pull request #3024 from oesteban/enh/robuster-write-report
oesteban Sep 11, 2019
c69d4ad
Merge pull request #3026 from oesteban/fix/3014
oesteban Sep 11, 2019
3e75851
eddy updates
josephmje Sep 16, 2019
6fd6c5a
Merge branch 'mrresize' of https://github.com/josephmje/nipype into m…
josephmje Sep 16, 2019
e39eba0
Merge branch 'mrresize' of https://github.com/josephmje/nipype into m…
josephmje Sep 16, 2019
74ffec7
Merge branch 'mrresize' of https://github.com/josephmje/nipype into m…
josephmje Sep 16, 2019
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
6 changes: 6 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Michael Waskom <michael.l.waskom@gmail.com> mwaskom <mwaskom@mit.edu>
Michael Waskom <michael.l.waskom@gmail.com> mwaskom <mwaskom@nyu.edu>
Michael Waskom <michael.l.waskom@gmail.com> mwaskom <mwaskom@stanford.edu>
Miguel Molina-Romero <miguel.molina.romero@gmail.com> Miguel Molina <miguel.molina.romero@gmail.com>
Murat Bilgel <bilgelm@gmail.com> Murat Bilgel <murat.bilgel@nih.gov>
Oliver Contier <o.contier@gmail.com> oliver-contier <oliver.contier@ovgu.de>
Oscar Esteban <code@oscaresteban.es> Oscar Esteban <code@oscaresteban>
Oscar Esteban <code@oscaresteban.es> oesteban <code@oscaresteban.es>
Expand All @@ -160,6 +161,7 @@ Paul Sharp <psharp1289@gmail.com> psharp1289 <psharp1289@gmail.com>
Ranjit Khanuja <ranjit.jhu@gmail.com> RanjitK <ranjit.jhu@gmail.com>
Rastko Ćirić <rc042010@mymail.pomona.edu> rciric <rc042010@mymail.pomona.edu>
Rastko Ćirić <rc042010@mymail.pomona.edu> Rastko Ćirić <rciric@users.noreply.github.com>
Rastko Ćirić <rc042010@mymail.pomona.edu> rciric <rastko@stanford.edu>
Ross Markello <rossmarkello@gmail.com> Ross Markello <rdm222@cornell.edu>
Russell Poldrack <poldrack@gmail.com> Russ Poldrack <poldrack@gmail.com>
Russell Poldrack <poldrack@gmail.com> poldrack <poldrack@gmail.com>
Expand All @@ -182,7 +184,11 @@ Siqi Liu <lsqshr@gmail.com> sql <lsqshr@gmail.com>
Steven Giavasis <sgiava77@gmail.com> Steven Giavasis <steven.giavasis@cmi-rsch-li001.childmind.org>
Steven Giavasis <sgiava77@gmail.com> sgiavasis <sgiava77@gmail.com>
Steven Giavasis <sgiava77@gmail.com> sgiavasis <sgiavasis@ieee.org>
Steven Tilley <stilley@hollandbloorview.ca> Steven Tilley <steve@steventilley.com>
Tristan Glatard <tristan.glatard@mcgill.ca> Tristan Glatard <tristan.glatard@creatis.insa-lyon.fr>
Victor Férat <victor.ferat@live.fr> Victor <victor.ferat@live.fr>
Victor Férat <victor.ferat@live.fr> Victor Ferat <vferat@fcbg.ch>
Victor Férat <victor.ferat@live.fr> Victor Férat <victor.ferat@live.Fr>
Victor Saase <victor@saase.net> vsaase <victor@saase.net>
Weijie Huang <hwjbupt@gmail.com> forwho <hwjbupt@gmail.com>
William Triplett <wtriplett@gmail.com> William Triplett <wtriplett@ufl.edu>
Expand Down
80 changes: 45 additions & 35 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@
"affiliation": "Shattuck Lab, UCLA Brain Mapping Center",
"name": "Wong, Jason"
},
{
"affiliation": "Concordia University",
"name": "Benderoff, Erin"
},
{
"name": "Modat, Marc"
},
Expand Down Expand Up @@ -150,6 +146,10 @@
{
"name": "Berleant, Shoshana"
},
{
"affiliation": "Concordia University",
"name": "Benderoff, Erin"
},
{
"affiliation": "Institute for Biomedical Engineering, ETH and University of Zurich",
"name": "Christian, Horea",
Expand Down Expand Up @@ -293,11 +293,11 @@
"orcid": "0000-0002-7796-8795"
},
{
"name": "Heinsfeld, Anibal S\u00f3lon",
"orcid": "0000-0002-2050-0614"
"name": "Kent, James"
},
{
"name": "Kent, James"
"name": "Heinsfeld, Anibal S\u00f3lon",
"orcid": "0000-0002-2050-0614"
},
{
"name": "Watanabe, Aimi"
Expand Down Expand Up @@ -355,15 +355,15 @@
{
"name": "Erickson, Drew"
},
{
"affiliation": "Child Mind Institute",
"name": "Giavasis, Steven"
},
{
"affiliation": "NIMH IRP",
"name": "Lee, John A.",
"orcid": "0000-0001-5884-4247"
},
{
"affiliation": "Child Mind Institute",
"name": "Giavasis, Steven"
},
{
"name": "Correa, Carlos"
},
Expand All @@ -381,9 +381,6 @@
{
"name": "Millman, Jarrod"
},
{
"name": "Lai, Jeff"
},
{
"name": "Zhou, Dale"
},
Expand All @@ -393,23 +390,28 @@
{
"name": "Haselgrove, Christian"
},
{
"affiliation": "Holland Bloorview Kids Rehabilitation Hospital",
"name": "Tilley II, Steven",
"orcid": "0000-0003-4853-5082"
},
{
"name": "Renfro, Mandy"
},
{
"affiliation": "The University of Sydney",
"name": "Liu, Siqi"
},
{
"affiliation": "Leibniz Institute for Neurobiology",
"name": "Stadler, J\u00f6rg",
"orcid": "0000-0003-4313-129X"
},
{
"affiliation": "University of Pennsylvania",
"name": "Kahn, Ari E.",
"orcid": "0000-0002-2127-0507"
},
{
"affiliation": "Leibniz Institute for Neurobiology",
"name": "Stadler, J\u00f6rg",
"orcid": "0000-0003-4313-129X"
},
{
"affiliation": "University College London",
"name": "P\u00e9rez-Garc\u00eda, Fernando",
Expand Down Expand Up @@ -502,31 +504,26 @@
"name": "Perkins, L. Nathan"
},
{
"affiliation": "University of Amsterdam",
"name": "Lukas Snoek",
"orcid": "0000-0001-8972-204X"
"name": "Marina, Ana"
},
{
"affiliation": "Institute of Imaging & Computer Vision, RWTH Aachen University, Germany",
"name": "Weninger, Leon"
"name": "Mattfeld, Aaron"
},
{
"affiliation": "Stanford University",
"name": "Lerma-Usabiaga, Garikoitz",
"orcid": "0000-0001-9800-4816"
"name": "Noel, Maxime"
},
{
"name": "Marina, Ana"
"affiliation": "University of Amsterdam",
"name": "Lukas Snoek",
"orcid": "0000-0001-8972-204X"
},
{
"name": "Mattfeld, Aaron"
"affiliation": "Institute of Imaging & Computer Vision, RWTH Aachen University, Germany",
"name": "Weninger, Leon"
},
{
"name": "Matsubara, K"
},
{
"name": "Noel, Maxime"
},
{
"name": "Cheung, Brian"
},
Expand Down Expand Up @@ -573,9 +570,6 @@
{
"name": "Weinstein, Alejandro"
},
{
"name": "Tambini, Arielle"
},
{
"affiliation": "Duke University",
"name": "Broderick, William",
Expand All @@ -598,6 +592,11 @@
{
"name": "Khanuja, Ranjeet"
},
{
"affiliation": "National Institute on Aging, Baltimore, MD, USA",
"name": "Bilgel, Murat",
"orcid": "0000-0001-5042-7422"
},
{
"name": "Schlamp, Kai"
},
Expand All @@ -612,6 +611,9 @@
{
"name": "Tarbert, Claire"
},
{
"name": "Tambini, Arielle"
},
{
"name": "Nickson, Thomas"
},
Expand All @@ -636,6 +638,11 @@
{
"name": "Flandin, Guillaume"
},
{
"affiliation": "Stanford University",
"name": "Lerma-Usabiaga, Garikoitz",
"orcid": "0000-0001-9800-4816"
},
{
"affiliation": "Vrije Universiteit Amsterdam",
"name": "Ort, Eduard"
Expand Down Expand Up @@ -691,6 +698,9 @@
"name": "Mihai, Paul Glad",
"orcid": "0000-0001-5715-6442"
},
{
"name": "Lai, Jeff"
},
{
"affiliation": "MIT, HMS",
"name": "Ghosh, Satrajit",
Expand Down
16 changes: 16 additions & 0 deletions doc/changelog/1.X.X-changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
1.2.2 (September 07, 2019)
==========================

##### [Full changelog](https://github.com/nipy/nipype/milestone/33?closed=1)

* FIX: Ensure ``loadpkl`` returns a not None value (https://github.com/nipy/nipype/pull/3020)
* FIX: ``loadpkl`` failed when pklz file contained versioning info (https://github.com/nipy/nipype/pull/3017)
* FIX: Update mne.WatershedBEM command line (https://github.com/nipy/nipype/pull/3007)
* FIX: Specify correct stop criterion flag in PETPVC (https://github.com/nipy/nipype/pull/3010)
* ENH: Add interface for AFNI ``3dTsmooth`` (https://github.com/nipy/nipype/pull/2948)
* ENH: Additional arguments to ANTs N4BiasFieldCorrection (https://github.com/nipy/nipype/pull/3012)
* ENH: Add ``--rescale-intensities`` and name_source to N4BiasFieldCorrection (https://github.com/nipy/nipype/pull/3011)
* ENH: Add index_mask_file input to ImageStats (https://github.com/nipy/nipype/pull/3005)
* RF: Remove versioning from ``loadpkl`` (https://github.com/nipy/nipype/pull/3019)
* MAINT: Add ``python_requires`` to package metadata (https://github.com/nipy/nipype/pull/3006)

1.2.1 (August 19, 2019)
=======================

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
# The short X.Y version.
version = nipype.__version__
# The full version, including alpha/beta/rc tags.
release = "1.2.1"
release = "1.2.2"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion doc/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Documentation
:Release: |version|
:Date: |today|

Previous versions: `1.2.1 <http://nipype.readthedocs.io/en/1.2.1/>`_ `1.2.0 <http://nipype.readthedocs.io/en/1.2.0/>`_
Previous versions: `1.2.2 <http://nipype.readthedocs.io/en/1.2.2/>`_ `1.2.1 <http://nipype.readthedocs.io/en/1.2.1/>`_


.. container:: doc2
Expand Down
13 changes: 3 additions & 10 deletions nipype/algorithms/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,11 +799,11 @@ def _run_interface(self, runtime):
'(http://pandas.pydata.org/) to run.'), e)

try:
import lockfile as pl
from filelock import SoftFileLock
self._have_lock = True
except ImportError:
from warnings import warn
warn(('Python module lockfile was not found: AddCSVRow will not be'
warn(('Python module filelock was not found: AddCSVRow will not be'
' thread-safe in multi-processor execution'))

input_dict = {}
Expand All @@ -822,7 +822,7 @@ def _run_interface(self, runtime):
df = pd.DataFrame([input_dict])

if self._have_lock:
self._lock = pl.FileLock(self.inputs.in_file)
self._lock = SoftFileLock('%s.lock' % self.inputs.in_file)

# Acquire lock
self._lock.acquire()
Expand All @@ -837,13 +837,6 @@ def _run_interface(self, runtime):
if self._have_lock:
self._lock.release()

# Using nipype.external.portalocker this might be something like:
# with pl.Lock(self.inputs.in_file, timeout=1) as fh:
# if op.exists(fh):
# formerdf = pd.read_csv(fh, index_col=0)
# df = pd.concat([formerdf, df], ignore_index=True)
# df.to_csv(fh)

return runtime

def _list_outputs(self):
Expand Down
5 changes: 4 additions & 1 deletion nipype/algorithms/tests/test_auto_AddCSVRow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
def test_AddCSVRow_inputs():
input_map = dict(
_outputs=dict(usedefault=True, ),
in_file=dict(mandatory=True, ),
in_file=dict(
extensions=None,
mandatory=True,
),
)
inputs = AddCSVRow.input_spec()

Expand Down
9 changes: 4 additions & 5 deletions nipype/algorithms/tests/test_auto_Gunzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@


def test_Gunzip_inputs():
input_map = dict(
in_file=dict(
extensions=None,
mandatory=True,
), )
input_map = dict(in_file=dict(
extensions=None,
mandatory=True,
), )
inputs = Gunzip.input_spec()

for key, metadata in list(input_map.items()):
Expand Down
9 changes: 4 additions & 5 deletions nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@


def test_NonSteadyStateDetector_inputs():
input_map = dict(
in_file=dict(
extensions=None,
mandatory=True,
), )
input_map = dict(in_file=dict(
extensions=None,
mandatory=True,
), )
inputs = NonSteadyStateDetector.input_spec()

for key, metadata in list(input_map.items()):
Expand Down
23 changes: 5 additions & 18 deletions nipype/external/cloghandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
testing, performance was more than adequate, but if you need a high-volume or
low-latency solution, I suggest you look elsewhere.

This module currently only support the 'nt' and 'posix' platforms due to the
usage of the portalocker module. I do not have access to any other platforms
for testing, patches are welcome.

See the README file for an example usage of this module.

"""
Expand All @@ -63,13 +59,7 @@
except ImportError:
codecs = None

# Question/TODO: Should we have a fallback mode if we can't load portalocker /
# we should still be better off than with the standard RotattingFileHandler
# class, right? We do some rename checking... that should prevent some file
# clobbering that the builtin class allows.

# sibling module than handles all the ugly platform-specific details of file locking
from .portalocker import lock, unlock, LOCK_EX, LOCK_NB, LockException
from filelock import SoftFileLock

# A client can set this to true to automatically convert relative paths to
# absolute paths (which will also hide the absolute path warnings)
Expand Down Expand Up @@ -168,11 +158,8 @@ def __init__(self,
self.maxBytes = maxBytes
self.backupCount = backupCount
# Prevent multiple extensions on the lock file (Only handles the normal "*.log" case.)
if filename.endswith(".log"):
lock_file = filename[:-4]
else:
lock_file = filename
self.stream_lock = open(lock_file + ".lock", "w")
self.lock_file = '%s.lock' % filename
self.stream_lock = SoftFileLock(self.lock_file)

# For debug mode, swap out the "_degrade()" method with a more a verbose one.
if debug:
Expand All @@ -189,7 +176,7 @@ def acquire(self):
in 'degraded' mode. """
# handle thread lock
Handler.acquire(self)
lock(self.stream_lock, LOCK_EX)
self.stream_lock.acquire()
if self.stream.closed:
self._openFile(self.mode)

Expand All @@ -206,7 +193,7 @@ def release(self):
self.stream.close()
finally:
try:
unlock(self.stream_lock)
self.stream_lock.release()
finally:
# release thread lock
Handler.release(self)
Expand Down
Loading