Skip to content

Commit

Permalink
Remove internal version of LiterateWorkflow (#8)
Browse files Browse the repository at this point in the history
* Replace internal Workflow with niworkflows.

* Run isort.
  • Loading branch information
tsalo authored Aug 12, 2024
1 parent d071473 commit cfd619e
Show file tree
Hide file tree
Showing 35 changed files with 33 additions and 90 deletions.
8 changes: 0 additions & 8 deletions qsirecon/engine/__init__.py

This file was deleted.

49 changes: 0 additions & 49 deletions qsirecon/engine/workflows.py

This file was deleted.

2 changes: 1 addition & 1 deletion qsirecon/workflows/anatomical/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
from nipype.interfaces import io as nio
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from niworkflows.interfaces.freesurfer import RobustRegister
from niworkflows.interfaces.reportlets.segmentation import ReconAllRPT

from ...engine import Workflow
from ...interfaces import DerivativesDataSink as FDerivativesDataSink
from ...interfaces import (
FSDetectInputs,
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/anatomical/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
from nipype.interfaces.ants import BrainExtraction, N4BiasFieldCorrection
from nipype.interfaces.base import traits
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from niworkflows.interfaces.images import TemplateDimensions
from niworkflows.interfaces.reportlets.masks import ROIsPlot
from pkg_resources import resource_filename as pkgr

from ... import config
from ...engine import Workflow
from ...interfaces import Conform
from ...interfaces import DerivativesDataSink as FDerivativesDataSink
from ...interfaces.anatomical import DesaturateSkull, GetTemplate, VoxelSizeChooser
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
from nilearn import __version__ as nilearn_ver
from nipype import __version__ as nipype_ver
from nipype.utils.filemanip import split_filename
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from packaging.version import Version
from pkg_resources import resource_filename as pkgrf

from .. import config
from ..engine import Workflow


def init_qsirecon_wf():
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from nipype.interfaces import utility as niu
from nipype.interfaces.base import isdefined
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces import DerivativesDataSink, DerivativesMaybeDataSink
from ...interfaces.confounds import DMRISummary
from ...interfaces.reports import DiffusionSummary
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from nipype.algorithms import confounds as nac
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ...engine import Workflow
from ...interfaces import AddTSVHeader, GatherConfounds

DEFAULT_MEMORY_MIN_GB = 0.01
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/derivatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from nipype import logging
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces import DerivativesDataSink

DEFAULT_MEMORY_MIN_GB = 0.01
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/distortion_group_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

import nipype.pipeline.engine as pe
from nipype.interfaces import utility as niu
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces import DerivativesDataSink
from ...interfaces.dsi_studio import DSIStudioBTable
from ...interfaces.dwi_merge import AveragePEPairs, MergeDWIs
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/finalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
from nipype.interfaces import utility as niu
from nipype.interfaces.base import isdefined
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from niworkflows.interfaces.reportlets.registration import SimpleBeforeAfterRPT

from ... import config
from ...engine import Workflow
from ...interfaces import DerivativesDataSink
from ...interfaces.dsi_studio import DSIStudioBTable
from ...interfaces.dwi_merge import MergeFinalConfounds, SplitResampledDWIs
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/fsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from nipype.interfaces import fsl
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from pkg_resources import resource_filename as pkgr_fn

from ... import config
from ...engine import Workflow
from ...interfaces import DerivativesDataSink
from ...interfaces.eddy import (
Eddy2SPMMotion,
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/hmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import nipype.pipeline.engine as pe
from nipype.interfaces import afni, ants
from nipype.interfaces import utility as niu
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from pkg_resources import resource_filename as pkgrf

from ... import config
from ...engine import Workflow
from ...interfaces import DerivativesDataSink
from ...interfaces.gradients import CombineMotions, GradientRotation, MatchTransforms
from ...interfaces.shoreline import (
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/hmc_sdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from nipype.interfaces import ants
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.gradients import CombineMotions, GradientRotation, SliceQC
from ...interfaces.images import SplitDWIsBvals, TSplit
from ..fieldmap.base import init_sdc_wf
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/intramodal_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import nipype.pipeline.engine as pe
from nipype.interfaces import ants
from nipype.interfaces import utility as niu
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from pkg_resources import resource_filename as pkgrf

from ... import config
from ...engine import Workflow
from ...interfaces import DerivativesDataSink
from ...interfaces.ants import MultivariateTemplateConstruction2
from .hmc import init_b0_hmc_wf
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from nipype.utils.filemanip import split_filename
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces import ConformDwi, DerivativesDataSink
from ...interfaces.dipy import Patch2Self
from ...interfaces.dwi_merge import MergeDWIs, PhaseToRad, StackConfounds
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/pre_hmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.dwi_merge import MergeDWIs
from ...interfaces.nilearn import Merge

Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from nipype.interfaces import afni
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.anatomical import DiceOverlap
from ...interfaces.dipy import TensorReconstruction
from ...interfaces.dsi_studio import (
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from nipype.interfaces import ants
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from pkg_resources import resource_filename as pkgrf

from ... import config
from ...engine import Workflow
from ...interfaces.itk import ACPCReport, AffineToRigid
from ...interfaces.niworkflows import ANTSRegistrationRPT

Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/resampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from nipype.interfaces import ants
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.ants import GetImageType
from ...interfaces.fmap import ApplyScalingImages
from ...interfaces.gradients import ( # LocalGradientRotation,
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/dwi/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from nipype.utils.filemanip import split_filename
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from niworkflows.interfaces.reportlets.registration import SimpleBeforeAfterRPT

from ...engine import Workflow
from ...interfaces import DerivativesDataSink
from ..anatomical import init_synthstrip_wf

Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/fieldmap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@

from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow

# Fieldmap workflows
from .pepolar import init_pepolar_unwarp_wf
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/fieldmap/drbuddi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.tortoise import (
DRBUDDI,
DRBUDDIAggregateOutputs,
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/fieldmap/pepolar.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
from nipype.interfaces import afni, ants
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from niworkflows.interfaces.header import CopyHeader
from niworkflows.interfaces.reportlets.registration import ANTSApplyTransformsRPT

from ... import config
from ...engine import Workflow
from ...interfaces import StructuralReference
from ...interfaces.fmap import B0RPEFieldmap, PEPOLARReport
from ...interfaces.images import ExtractWM
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/fieldmap/syn.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
from nipype.interfaces.image import Rescale
from nipype.pipeline import engine as pe
from nipype.utils.filemanip import fname_presuffix
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow

DEFAULT_MEMORY_MIN_GB = 0.01

Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/amico.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import nipype.pipeline.engine as pe
from nipype.interfaces import utility as niu
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.amico import NODDI
from ...interfaces.converters import NODDItoFIBGZ
from ...interfaces.interchange import recon_workflow_input_fields
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/anatomical.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
from nipype.interfaces import afni, ants, mrtrix3
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
from niworkflows.interfaces.reportlets.registration import SpatialNormalizationRPT
from pkg_resources import resource_filename as pkgrf

from ... import config
from ...engine import Workflow
from ...interfaces.anatomical import QSIReconAnatomicalIngress, UKBAnatomicalIngress
from ...interfaces.ants import ConvertTransformFile
from ...interfaces.bids import ReconDerivativesDataSink
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/build_workflow.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import nipype.pipeline.engine as pe
from nipype.interfaces import utility as niu
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.interchange import default_input_set, recon_workflow_input_fields
from .amico import init_amico_noddi_fit_wf
from .converters import init_mif_to_fibgz_wf, init_qsirecon_to_fsl_wf
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

import nipype.interfaces.utility as niu
import nipype.pipeline.engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ...engine import Workflow
from ...interfaces.bids import ReconDerivativesDataSink
from ...interfaces.converters import FODtoFIBGZ
from ...interfaces.images import ConformDwi
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/dipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

import nipype.pipeline.engine as pe
from nipype.interfaces import utility as niu
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.dipy import (
BrainSuiteShoreReconstruction,
KurtosisReconstruction,
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/dsi_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

import nipype.pipeline.engine as pe
from nipype.interfaces import utility as niu
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.bids import ReconDerivativesDataSink
from ...interfaces.converters import DSIStudioTrkToTck
from ...interfaces.interchange import recon_workflow_input_fields
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/mrtrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import nipype.interfaces.utility as niu
import nipype.pipeline.engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ... import config
from ...engine import Workflow
from ...interfaces.bids import ReconDerivativesDataSink
from ...interfaces.interchange import recon_workflow_input_fields
from ...interfaces.reports import CLIReconPeaksReport, ConnectivityReport
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/scalar_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import nipype.interfaces.utility as niu
import nipype.pipeline.engine as pe
from niworkflows.engine.workflows import LiterateWorkflow as Workflow

from ...engine import Workflow
from ...interfaces.bids import ReconDerivativesDataSink
from ...interfaces.interchange import recon_workflow_input_fields
from ...interfaces.recon_scalars import (
Expand Down
Loading

0 comments on commit cfd619e

Please sign in to comment.