Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 15:48
    lamaresh edited #3499
  • Aug 13 15:48
    lamaresh edited #3499
  • Aug 13 15:47
    lamaresh opened #3499
  • Aug 05 10:22
    fladd opened #3498
  • Aug 02 21:08
    roya2022 opened #3497
  • Aug 01 20:01
    codecov[bot] commented #3495
  • Aug 01 20:00
    codecov[bot] commented #3495
  • Aug 01 20:00
    codecov[bot] commented #3495
  • Aug 01 18:00
    codecov[bot] commented #3495
  • Aug 01 17:46
    codecov[bot] commented #3495
  • Aug 01 17:46
    codecov[bot] commented #3495
  • Aug 01 17:45
    prioux synchronize #3495
  • Aug 01 11:58
    TamerGezici commented #3494
  • Aug 01 11:58
    TamerGezici closed #3494
  • Aug 01 11:58
    TamerGezici commented #3494
  • Jul 26 21:25
    codecov[bot] commented #3495
  • Jul 26 21:11
    codecov[bot] commented #3495
  • Jul 26 21:11
    codecov[bot] commented #3495
  • Jul 26 21:11
    prioux synchronize #3495
  • Jul 23 02:03

    effigies on master

    fixed some bugs in the interfac… updated my ORCID in zenodo reformatted to pass pre-commit … and 8 more (compare)

Thanh-HN
@Thanh-HN
hi everyone
i have some problem when i'm trying to import N4BiasFieldCorrection
i run this command on gg colab: from nipype.interfaces.ants import N4BiasFieldCorrection
and have the error: No module named 'nipype'
Any help pls? Thank you!
Rinat Mukhometzianov
@rmukh
@Thanh-HN Well, you need to install it first on google colab. Run a cell with !pip install nipype
@Thanh-HN And to be honest, I am not sure if colab supports ANTS software. It might be hard to install it on colab
Zhengchen Cai
@zhengchencai

Hi there, I got the following 4 fails after running python -c "import nipype; nipype.test()". I installed Nipype using pip install nipype[all]

================================================== short test summary info ==================================================FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/registration.py::nipype.interfaces.ants.registration.Registration FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/segmentation.py::nipype.interfaces.ants.segmentation.N4BiasFieldCorrection FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/utils.py::nipype.interfaces.ants.utils.AI FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/base/tests/test_core.py::test_BaseInterface_load_save_inputs ====================== 4 failed, 2704 passed, 211 skipped, 5 xfailed, 37 warnings in 439.88s (0:07:19) =================

Chris Markiewicz
@markiewicz:matrix.org
[m]
Looks like some issues in the doctests not normalizing whitespace. I can reproduce with `python -m pytest -sv --pyargs --doctest-modules nipype.interfaces.ants
Zhengchen Cai
@zhengchencai
Thanks, does this mean I have no problem for installation?
Chris Markiewicz
@markiewicz:matrix.org
[m]
It seems fine. I would use my command to see if the failures are just docstring formatting or if there's something more significant. We should fix it in the next release in any case.
Zhengchen Cai
@zhengchencai
Thanks a lot. I tried python -m pytest -sv --pyargs --doctest-modules nipype.interfaces.ants
and got -- Docs: https://docs.pytest.org/en/stable/warnings.html ================================================== short test summary info ================================================== FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/registration.py::nipype.interfaces.ants.registration.Registration FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/segmentation.py::nipype.interfaces.ants.segmentation.Atropos FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/segmentation.py::nipype.interfaces.ants.segmentation.BrainExtraction FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/segmentation.py::nipype.interfaces.ants.segmentation.CorticalThickness FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/segmentation.py::nipype.interfaces.ants.segmentation.JointFusion FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/segmentation.py::nipype.interfaces.ants.segmentation.KellyKapowski FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/segmentation.py::nipype.interfaces.ants.segmentation.N4BiasFieldCorrection FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/utils.py::nipype.interfaces.ants.utils.AI FAILED anaconda3/lib/python3.8/site-packages/nipype/interfaces/ants/utils.py::nipype.interfaces.ants.utils.ComposeMultiTransform ========================================= 9 failed, 100 passed, 1 warning in 12.81s =========================================
Chris Markiewicz
@markiewicz:matrix.org
[m]
That's what I got. If you scroll up, you should see details of each failure, and all of them are things like
Expected:
    'Atropos --image-dimensionality 3 --icm [1,1]
    --initialization Random[2] --intensity-image structural.nii
    --likelihood-model Gaussian --mask-image mask.nii --mrf [0.2,1x1x1] --convergence [5,1e-06]
    --output [structural_labeled.nii,POSTERIOR_%02d.nii.gz] --posterior-formulation Socrates[1]
    --use-random-seed 1'
Got:
    'Atropos --image-dimensionality 3 --icm [1,1] --initialization Random[2] --intensity-image structural.nii --likelihood-model Gaussian --mask-image mask.nii --mrf [0.2,1x1x1] --convergence [5,1e-06] --output [structural_labeled.nii,POSTERIOR_%02d.nii.gz] --posterior-formulation Socrates[1] --use-random-seed 1'
I would say that's fine.
Zhengchen Cai
@zhengchencai
Thanks!
johnatl
@johnatl:matrix.org
[m]

Working through miykael's nipype tutorial. Using the Docker image and /data and other folders are mapped to local folders. In the introduction_showcase notebook, I can ls the file being passed to slicetimer.inputs.in_file, yet receive an error when running the cell.

TraitError: The 'in_file' trait of a SliceTimerInputSpec instance must be a pathlike object or string representing an existing file, but a value of '/data/ds000114/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz' <class 'str'> was specified.

johnatl
@johnatl:matrix.org
[m]
Turns out I needed to use datalad's get to get the actual data.
Does anyone use this chat service? lol
Chris Markiewicz
@markiewicz:matrix.org
[m]
Not really. Neurostars is more common these days.
ConnorBehnen
@ConnorBehnen
Can someone help me with clarification on the different Segment options from SPM (via Nipype). The Nipype documentation links to the SPM manual seem off (sometimes its halfway through a chapter). My understanding was Segment is the newest version, and that NewSegment is from SPM8 but maybe I have that backwards?
Sandesh Patil
@SandeshPatilCreatis
Hello,
Does anyone knows what Data composition pattern Nipype's algorithm supports (ono-to-one, all-to-all?)
Chris Markiewicz
@markiewicz:matrix.org
[m]
@SandeshPatilCreatis: Could you link to a resource that explains the sense in which you'reusing data composition patterns?
Sandesh Patil
@SandeshPatilCreatis
@markiewicz:matrix.org Thank you for your reply.
You can refer to 3. Data composition strategies(page 5) of this article - https://hal.archives-ouvertes.fr/hal-00691832/document
loukasilias
@loukasilias
Hello,
Is SAMSEG of FreeSurfer provided by nipype?
Thanks!
Chris Markiewicz
@markiewicz:matrix.org
[m]
Checking https://nipype.readthedocs.io/en/latest/api/generated/nipype.interfaces.freesurfer.html, I don't see it in any of the docs. A new interface would need to be added. If you're interested in writing it, the tutorials are a good place to get started: https://miykael.github.io/nipype_tutorial/notebooks/advanced_create_interfaces.html
JulianGaviriaL
@JulianGaviriaL

Hi. I'm trying to install nipype from an anaconda environment. Nipype seems incompatible with the existing python installation in my environment: UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • nipype -> python[version='2.7.|3.5.|3.6.|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.5,<3.6.0a0|3.4.']

Your python: python=3.10

Of course I can change the python version. However, I just would like to make sure that nipype is not compatible with python 3.10.4, or perhaps there's another issue that might cause the installation issue. Thanks in advance
JulianGaviriaL
@JulianGaviriaL
It seems that I just need to install nipype with: pip install nipype
.\conda list

Name Version Build Channel

nipype 1.8.1 pypi_0 pypi
Chris Markiewicz
@markiewicz:matrix.org
[m]
If it's not on conda-forge, then it's probably because conda-forge is not supporting building 3.10 packages, as we were able to build it a couple weeks ago. But yes, it's also fine to install with pip, which is much more under our control. There is nothing in the package that depends on conda machinery.
JulianGaviriaL
@JulianGaviriaL
Thank you very much Chris !
Keith Callenberg
@keithcallenberg
I would like to run fslstats on many images in parallel. It seems like nipype's FSL interface could help with that. I found the ImageStats wrapper (https://nipype.readthedocs.io/en/latest/api/generated/nipype.interfaces.fsl.utils.html#imagestats) but I can't find any examples of paralellizing a single step with nipype. When I try to put ImageStats inside a Node() and put that Node in a workflow and run connect(), I get an error: "cannot unpack non-iterable Node object"
Does anyone have any familiarity with running single steps in a parallel workflow, or using something like ImageStats inside a larger workflow?
Keith Callenberg
@keithcallenberg
OK, it seems I should use add_node() instead of connect(). Now with add_node() I can run a single fslstats command. Still trying to parallelize though...
Keith Callenberg
@keithcallenberg
OK, I needed to specify iterables for the ImageStats node.
Keith Callenberg
@keithcallenberg
Hmmm, with iterables it seems you can only specify one parameter to iterate over? What if you need to have masks that need to be matched to your input files?
I guess I need to do a MapNode with multiple iterfields https://nipype.readthedocs.io/en/0.12.0/users/tutorial_102.html#iterfield
Omer Sharon
@sharomer

Hi All, I'm doing some DTI analysis with nipype FSL interface. I love it. I did the preprocessing and TBSS successfully.
Now I would like to asses specific predfined tracts, I use a mask I got from the atlas. Now I would like use the TBSS skelton and not the the FA, for that I understand I would need to deproject the skelton into the subject native space using tbss_deproject as explained here:
https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/TBSS/UserGuide#Transforming_TBSS_results_back_to_native_space

Does anyone know how this can be implemented using nipype?
Great Thanks!

Chris Markiewicz
@markiewicz:matrix.org
[m]
Hi @sharomer it looks like we don't have an interface for tbss_deproject in Nipype. Would you be interested in writing one?
Omer Sharon
@sharomer
Thanks @markiewicz, I was able to perform this using niflow TBSS here:
https://nipype.readthedocs.io/en/latest/users/examples/dmri_tbss_nki.html
Apparently the resulting skeltonized Nifti file is exactly that while each subject appears as a volume.
Omer Sharon
@sharomer
This works nicely for FA files, however when following this example connecting the TBSS on MD files (the last part) I seem to get an error:
ValueError: TractSkeleton requires values for inputs 'threshold', 'distance_map', 'data_file' because 'project_data' is set. For a list of required inputs, see TractSkeleton.help()

`When creating this crashfile, the results file corresponding
to the node could not be found.
220811-09:46:22,162 nipype.workflow INFO:

 ***********************************

INFO:nipype.workflow:*
220811-09:46:22,162 nipype.workflow ERROR:
could not run node: tbssproc.tbss_MD.projectfa
ERROR:nipype.workflow:could not run node: tbssproc.tbss_MD.projectfa
220811-09:46:22,163 nipype.workflow INFO:
crashfile: /Users/omer/Desktop/crash-20220811-094622-omer-projectfa-304d1043-f275-4ac3-9b29-fb3c88c90df4.pklz
INFO:nipype.workflow:crashfile: /Users/omer/Desktop/crash-20220811-094622-omer-projectfa-304d1043-f275-4ac3-9b29-fb3c88c90df4.pklz
220811-09:46:22,163 nipype.workflow DEBUG:
The following dependent nodes were not run
DEBUG:nipype.workflow:The following dependent nodes were not run
220811-09:46:22,163 nipype.workflow DEBUG:
projectfa
DEBUG:nipype.workflow:projectfa
220811-09:46:22,163 nipype.workflow INFO:

 ***********************************

INFO:nipype.workflow:*`

Any help is very much appriciated!
Omer Sharon
@sharomer
Looking on the crash file it seems like it's the data_file input that is not passed well

ode inputs:

alt_data_file = /Users/omer/Desktop/DTI/TBSS/tbssproc/tbss_MD/maskgroup/sub-ASSO027_MD_warp_merged_masked.nii.gz
alt_skeleton = <undefined>
args = <undefined>
data_file = <undefined>
distance_map = /Users/omer/Desktop/DTI/TBSS/tbssproc/tbss_all/tbss4/distancemap/sub-ASSO027_FA_prep_warp_merged_mask_inv_dstmap.nii.gz
environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'}
in_file = /Users/omer/Desktop/DTI/TBSS/tbssproc/tbss_all/tbss3/meanfa/sub-ASSO027_FA_prep_warp_merged_masked_mean.nii.gz
output_type = NIFTI_GZ
project_data = True
projected_data = <undefined>
search_mask_file = <undefined>
skeleton_file = <undefined>
threshold = 0.2
use_cingulum_mask = True

but I don't understand why
Omer Sharon
@sharomer
Anyone?
Would appreciate any input.. thanks!!