Skip to content

Commit

Permalink
Keep working.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Sep 3, 2024
1 parent 8ddc181 commit 2734f06
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 39 deletions.
6 changes: 3 additions & 3 deletions env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ dependencies:
- graphviz=9.0
- pandoc=3.1
# Workflow dependencies: FSL (versions pinned in 6.0.7.7)
# We need SUSAN and MELODIC for Rapidtide
- fsl-bet2=2111.4
- fsl-melodic=2111.3
- fsl-miscmaths=2203.2
- fsl-susan=2111.0
# Workflow dependencies: ANTs
- ants=2.5
# Other dependencies
- pip
- pip:
- templateflow==24.0
Expand Down
4 changes: 2 additions & 2 deletions src/fmripost_rapidtide/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = '0.1.dev73+g29d61b9'
__version_tuple__ = version_tuple = (0, 1, 'dev73', 'g29d61b9')
__version__ = version = '0.1.dev21+g8ddc181.d20240903'
__version_tuple__ = version_tuple = (0, 1, 'dev21', 'g8ddc181.d20240903')
13 changes: 0 additions & 13 deletions src/fmripost_rapidtide/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
# SPDX-FileCopyrightText: 2023-present Chris Markiewicz <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
import click

from .. import __version__


@click.group(context_settings={'help_option_names': ['-h', '--help']}, invoke_without_command=True)
@click.version_option(version=__version__, prog_name='fmripost-rapidtide')
@click.pass_context
def fmripost_rapidtide(ctx: click.Context):
click.echo('Hello world!')
2 changes: 1 addition & 1 deletion src/fmripost_rapidtide/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ class workflow(_Config):
convergencethresh = None
"""Continue refinement until the MSE between regressors becomes <= THRESH."""
maxpasses = None
"""Terminate refinement after MAXPASSES passes, whether or not convergence has occured."""
"""Terminate refinement after MAXPASSES passes, whether or not convergence has occurred."""
glmsourcefile = None
"""Regress delayed regressors out of FILE instead of the initial fmri file used to estimate
delays."""
Expand Down
8 changes: 4 additions & 4 deletions src/fmripost_rapidtide/interfaces/rapidtide.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ class _RapidtideInputSpec(CommandLineInputSpec):
argstr='--globalsignalmethod %s',
mandatory=False,
)
globalpcacomponents = traits.Int(
argstr='--globalpcacomponents %d',
globalpcacomponents = traits.Float(
argstr='--globalpcacomponents %f',
mandatory=False,
)
numskip = traits.Int(
Expand Down Expand Up @@ -207,8 +207,8 @@ class _RapidtideInputSpec(CommandLineInputSpec):
argstr='--sigmathresh %f',
mandatory=False,
)
pcacomponents = traits.Int(
argstr='--pcacomponents %d',
pcacomponents = traits.Float(
argstr='--pcacomponents %f',
mandatory=False,
)
convergencethresh = traits.Float(
Expand Down
35 changes: 19 additions & 16 deletions src/fmripost_rapidtide/workflows/rapidtide.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def init_rapidtide_wf(
*,
bold_file: str,
metadata: dict,
mem_gb: dict,
):
"""Build a workflow that runs `Rapidtide`_.
Expand Down Expand Up @@ -87,6 +88,7 @@ def init_rapidtide_wf(
confounds_file
"""

from nipype.interfaces.base import Undefined
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from fmripost_rapidtide.interfaces.nilearn import SplitDseg
Expand Down Expand Up @@ -146,45 +148,46 @@ def init_rapidtide_wf(
datatstep=metadata['RepetitionTime'],
autosync=config.workflow.autosync,
filterband=config.workflow.filterband,
passvec=config.workflow.passvec,
stopvec=config.workflow.stopvec,
numestreps=config.workflow.numestreps,
filterfreqs=config.workflow.passvec or Undefined,
filterstopfreqs=config.workflow.stopvec or Undefined,
numnull=config.workflow.numestreps,
detrendorder=config.workflow.detrendorder,
gausssigma=config.workflow.gausssigma,
confoundfilespec=config.workflow.confoundfilespec,
confound_power=config.workflow.confound_power,
confound_deriv=config.workflow.confound_deriv,
spatialfilt=config.workflow.gausssigma,
confoundfile=config.workflow.confoundfilespec or Undefined,
confoundpowers=config.workflow.confound_power,
confoundderiv=config.workflow.confound_deriv,
globalsignalmethod=config.workflow.globalsignalmethod,
globalpcacomponents=config.workflow.globalpcacomponents,
numtozero=config.workflow.numtozero,
timerange=config.workflow.timerange,
corrweighting=config.workflow.corrweighting,
simcalcrange=config.workflow.simcalcrange,
fixeddelayvalue=config.workflow.fixeddelayvalue,
lag_extrema=config.workflow.lag_extrema,
widthmax=config.workflow.widthmax,
fixdelay=config.workflow.fixeddelayvalue or Undefined,
searchrange=config.workflow.lag_extrema,
sigmalimit=config.workflow.widthmax,
bipolar=config.workflow.bipolar,
lagminthresh=config.workflow.lagminthresh,
lagmaxthresh=config.workflow.lagmaxthresh,
ampthresh=config.workflow.ampthresh,
sigmathresh=config.workflow.sigmathresh,
pcacomponents=config.workflow.pcacomponents,
convergencethresh=config.workflow.convergencethresh,
convergencethresh=config.workflow.convergencethresh or Undefined,
maxpasses=config.workflow.maxpasses,
glmsourcefile=config.workflow.glmsourcefile,
glmsourcefile=config.workflow.glmsourcefile or Undefined,
glmderivs=config.workflow.glmderivs,
outputlevel=config.workflow.outputlevel,
territorymap=config.workflow.territorymap,
respdelete=config.workflow.respdelete,
territorymap=config.workflow.territorymap or Undefined,
autorespdelete=config.workflow.respdelete,
),
name='rapidtide',
mem_gb=mem_gb['resampled'],
)
workflow.connect([
(inputnode, rapidtide, [
('bold_std', 'in_file'),
('brain_mask_std', 'brainmask'),
('confounds', 'motpars'),
('skip_vols', 'skip_vols'),
('confounds', 'motionfile'),
('skip_vols', 'numskip'),
]),
(split_tissues, rapidtide, [
('gm', 'graymattermask'),
Expand Down

0 comments on commit 2734f06

Please sign in to comment.