Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:32
    leehweeling opened #3344
  • Jun 11 10:18
    tclose commented #3280
  • Jun 11 10:12
    tclose synchronize #3280
  • Jun 11 10:10
    tclose synchronize #3280
  • Jun 11 10:10
    tclose synchronize #3280
  • Jun 11 10:10
    tclose synchronize #3280
  • Jun 11 10:10
    tclose synchronize #3280
  • Jun 11 10:10
    tclose synchronize #3280
  • Jun 10 15:11
    leehweeling closed #3343
  • Jun 10 13:29
    leehweeling opened #3343
  • Jun 08 13:28
    a3sha2 commented #3306
  • Jun 08 13:05
    a3sha2 commented #3306
  • Jun 08 13:01
    a3sha2 synchronize #3306
  • Jun 08 12:55
    a3sha2 synchronize #3306
  • Jun 03 16:58
    codecov[bot] commented #3336
  • Jun 03 16:56
    codecov[bot] commented #3336
  • Jun 03 16:56
    codecov[bot] commented #3336
  • Jun 03 16:56
    codecov[bot] commented #3336
  • Jun 03 16:49
    codecov[bot] commented #3336
  • Jun 03 16:30
    codecov[bot] commented #3336
Peer Herholz
@PeerHerholz
workflows that used to be available via nipype.workflows were migrated to NiFlows and their continued use is discouraged: https://nipype.readthedocs.io/en/latest/interfaces.html#workflows
Renata Baptista
@rpbaptista
Yes I saw that I can't use directly, would you recomend a way for transfering fsl_anat to be nipype adaptable?
Peer Herholz
@PeerHerholz
AFAIK all the functions in fsl_anat are supported by/available in nipype, thus you could just "recreate" the pipeline there. However, I'm not sure if that's more feasible than using FSLCommand or the function interface. I would assume that someone also already looked at that!?
@ramroomh and @rpbaptista, it would be great if you could post nipype related questions on https://neurostars.org/ to increase FAIR-ness and reach more people
Renata Baptista
@rpbaptista
It's really not clear to me how to use interfaces for that, once is a shell script not a python package, like if its to do os..... i can do outside nipype. For the FSL COMMANDS I also don't know how to associate, there's no example on documentation..
amir
@liamirpy
hi
i cant find trans.mat
Boojum
@intein
Nipype is amazing, thank you all! I've just started using it and I like it more and more
1 reply
kevinm36
@kevinm36

Hi, I hope this is the correct place to ask simple questions.

How exactly do you handle Nodes that take in lists as inputs within a workflow? Specifically, I'm trying to append the apply_to_files property for the spm.normalization interface from the output of two different nodes.

2 replies
Danlei Chen
@danlei-chen
Hi, I hope this is a good place to ask for this question: I'm trying to run a simple Finite Impulse Response model in FSL using Nipype. The beginner's guide makes it seem like it is very possible to run this analysis, but I haven't found a good example of exactly how to do it. I have tried to set the bases function as {'none':None} or {'none':{'none':None}} or {'none':{}}, but they gave the error of saying the EV file (in 3-column format) does not have enough data. Is there an example to set up the model that resembles the "FIR basis functions" convolution setting in FSL GUI? Thanks for any inputs!!
Elliot Howley
@elliohow
Is there any way to use rmsdiff with nipype?
Christian Hacker
@christianhacker

Salutations. Attempting to use nipype.interfaces.slicer.BRAINSFit in a pipeline, but running into No command "BRAINSFit" found errors. I have the latest version of Slicer installed at /opt/Slicer and manually appended that directory and /opt/Slicer/bin to my path. BRAINSFit runs correctly under bash:

Slicer --launch BRAINSFit

but won't work in nipype. Any ideas?

4 replies
Boojum
@intein
Hi, is there any convenient way to start jupyter notebook from nipype docker container? I mean, without reinstalling jupyter
rahulgoel20
@rahulgoel20
Hi, So I am using the SpaceTimeRealigner and was wondering if I can save the motion it has deducted and then use it to remove physiological noise? Also, every 10 frames, in my experiment, subject was pressing a button. I do have exact timing of those button presses as well, is there a good way to regress that out as well?
Muskan02-eng
@Muskan02-eng
@Divyaashwin I have seen you were facing the same problem of running bet, I even tried the same solution that you suggested but it's not working. Can you please guide me with this
seaguldee
@seaguldee
Hi, Just wondering if anyone is still having an issue running McFlirt in Nipype with Python 6.0 - I am getting the following error...
No such file or directory '/scratch/06953/jes6785/CPT/output/preproc_ses2_scan1/mcflirt/20200207.005.2_func_task-CPTPNND_run-01_dir-AP_20200207181451_15_brain_mcf_mean_reg.nii.gz' for output 'mean_img' of a MCFLIRT interface
when trying to output the mean image
seen this discussion above
elboss1
@elboss1
hey i am trying to learn how to use nipype for a project i have in my university. It is something that is not clear to me for the nipype package. The nipype package gives you the capabilty to visualize image data and/or recontruct them into 3d visualization? or is it only to process the image data?
2 replies
shervin Abdollahi
@shervin.abd71_gitlab
hi Guys, i am new to nipype and trying to transform my lab's processing pipeline to nipype workflow. so far i have been able to grab my BIDS validated dataset and axialize my mprage scan by wrapping afni commandline (fat_proc_axialize_anat) and use it's output as a reference to coregister t2 and flair scans. in the coregistration process i use MapNode to perform afni 3dAllineate . my next step is to perform freesurfer recon-all command and i want to use my coreigsitered t2 (as T2_file) input along side my axialized mprage( T1_files). the problem is the recon-all node does not recognize my t2 and throws an error. this is how i am connecting my node reconall = pe.Node(interface=ReconAll(),name="reconall")
reconall.inputs.subjects_dir = freesurfer_dir
reconall.inputs.use_T2 = True
reconall.inputs.directive = 'all'
pipeline.connect(subj_infosource, 'subject_id', reconall, 'subject_id')
pipeline.connect(axialized, 'out_file', reconall, 'T1_files')
pipeline.connect(allineate1, 'out_file', reconall, 'T2_file')
is there anything wrong with the way i am connecting the nodes? does the output of MapNode have a specific format that cant be called like a regular node output?
any suggestion would be greatly apprecited
mattsherwood87
@mattsherwood87
I am running nipype on python 3.6.9 on Ubuntu. I am trying to run fsl.ApplyXFM() from nipype.interfaces to apply a transformation but I get the following errors:

Traceback (most recent call last):
File "/var/lib/condor/execute/dir_25201/condor_exec.exe", line 355, in <module>
main()
File "/var/lib/condor/execute/dir_25201/condor_exec.exe", line 351, in main
asl_2d_flirt(options.IN_FILE,options.REF_FILE,argsDict)
File "/var/lib/condor/execute/dir_25201/condor_exec.exe", line 220, in asl_2d_flirt
applyxfm.run()
File "/usr/local/lib/python3.6/dist-packages/nipype/interfaces/base/core.py", line 434, in run
runtime = self._run_interface(runtime)
File "/usr/local/lib/python3.6/dist-packages/nipype/interfaces/base/core.py", line 829, in _run_interface
self.raise_exception(runtime)
File "/usr/local/lib/python3.6/dist-packages/nipype/interfaces/base/core.py", line 760, in raise_exception
).format(
runtime.dictcopy())
RuntimeError: Command:
flirt -in /mnt/ss_rhb1/s3-mri-general/AFRL-Single_Exposure/processed_data/AE001/SESSION_02/AE001_SESS02_ASL_RESTING.nii.gz -ref /mnt/ss_rhb1/scratch/AFRL-Single_Exposure/processed_data/AE001/SESSION_02/AE001_SESS02_AXIAL_T1_brain.nii.gz -out /mnt/ss_rhb1/scratch/AFRL-Single_Exposure/processed_data/AE001/SESSION_02/AE001_SESS02_ASL_RESTING_highres.nii.gz -omat /mnt/ss_rhb1/scratch/AFRL-Single_Exposure/processed_data/AE001/SESSION_02/AE001_SESS02_ASL_RESTING.reg/tmp.mat -applyxfm -init /mnt/ss_rhb1/scratch/AFRL-Single_Exposure/processed_data/AE001/SESSION_02/AE001_SESS02_ASL_RESTING.reg/example_asl2highres.mat
Standard output:

Standard error:
Killed
Return code: 137

It appears the function is trying to prescribe the option '-omat' which should not be the case when running FLIRT with the '-applyxfm -init' options
This is the snippet of my python code:
applyxfm = fsl.ApplyXFM()
applyxfm.inputs.in_file = aslFile
applyxfm.inputs.reference = strucFile
applyxfm.inputs.apply_xfm = True
applyxfm.inputs.out_file = os.path.join(kwargs['scratch_dir'],aslFileDir,aslFileBase[0] + '_highres.nii.gz')
applyxfm.inputs.in_matrix_file = os.path.join(aslOutputDir,'example_asl2highres.mat')
applyxfm.inputs.out_matrix_file = os.path.join(aslOutputDir,'tmp.mat')
if progress:
print('Applying transformation to 4d dataset to produce ' + applyxfm.inputs.out_file)
applyxfm.run()
mattsherwood87
@mattsherwood87
Sorry in the above example I was trying to fix the errors I was getting by prescribing the out_matrix_file but that still failed. If I comment the line with applyxfm.inputs.out_matrix_file ...
'-omat' still appears in the produced cmdline
@elboss1 nipype is a package of python tools to access various linux command-line utilities developed for image processing such as FSL and FreeSurfer. Most of these require knowledge of BASH or CSH, especially if you want to batch process. However, this can easily be achieved in python using nipype. At least this is my perspective.
Elliot Howley
@elliohow
Is there any way to use rmsdiff with nipype?
Martin Hochheimer
@MartinHochheimer
Hey guys, I am currently analysing an fMRI dataset, mainly using nipype's FSL interface. I finished the preprocessing (mainly sticking to https://nipype.readthedocs.io/en/latest/users/examples/fmri_fsl.html and https://miykael.github.io/nipype_tutorial/notebooks/handson_*.html for a rough structure. I have finished the preprocessing , generated the 1st level FEAT model and fitted it to the functional data using fsl.FILMGLS. This runs without apparent issues and should generate a "corrections" output, specifying the statistical corrections used in FILM modeling. However, neither the pe.Node's results.outputs nor the results directory for the FILMGLS wrapper show any sign of such a file or variable. I tried using the result*.pklz file generated inside the Node's base_dir, as this is a FILMGLSOutputSpec507 object and should hold all output variables, but it has no attribute "corrections".
Could anyone tell me, where FILMGLS stores its corrections?
I'm using a customised Dockerfile similar to Michael Notter's and am currently running the individual nodes WITHOUT a workflow for experimentation purposes.
Let me know if there is any more specific information you need and thanks a lot in advance!
One other curiosity: I can't open the .mat file created by fsl.FEATModel - neither using scipy.io.loadmat nor h5py. even if FSL's design matrix requires additional files to be complete, I should be able to at least handle the .mat file? Does FSL use some funny form of .mat file or am I simply not doing things right?
Luis Cebamanos
@lcebaman
Hello devs, I am trying to find info about how to use SLURMGraph to run on multiple compute nodes
Can someone please point me to examples, scripts or some more info?
Alessio Giacomel
@alegiac95
Hello everybody, I am running a pipeline that interfaces mostly FSL commands for a project, and for some reasons a connection from the workflow seems to do nothing. The workflow compiles and runs, but when I check the logs I can clearly see that a warp file generated by fsl.FNIRT doesn't input in the following block ( fsl.ConvertWarp). Does anyone know if there is any specific options i have to set in order to obtain as output the field_file from FNIRT?
1 reply
David Muñoz Tord
@munoztd0
Hello people! This is not a bug nor an issue but just a question on how orthogonalization for parametric modulator(s) works/is specified in SpecifySPMModel() ? (In SPM I can easily turn it on/off to vary between sequential orthogonalization but I can't vind any doc on Nipy(pe) ) > Thanks a bunch!
1 reply
andife
@andife
Hi, I'm trying to use nipype with ANTS for ImageRegistration.
In some cases I get "Trait fixed_image_mask (Registration) (version 2.3.5 > required 2.1.0)" Are there plans to update nipype to be compatible to version 2.3.5 next time? 2.1.0 would be quite old?
1 reply
xd3262nd
@xd3262nd
Hi everyone. I am learning how to use nipype. I have a question about Gunzip object. I’m trying to specify the inputsto a nipype.interfaces.niftyreg.reg.RegAladin object. It requires two nifti files and both of my nifti files are in .nii.gz format. Is it possible to convert both of these nifti files at the same time? (using nodes for this workflow) or I will need to create two different Gunzip nodes to convert two nifti files at the same time?
Chris Markiewicz
@markiewicz:matrix.org
[m]
You can use a MapNode and pass it a list. Does RegAladin really not permit nii.gz?
xd3262nd
@xd3262nd
How can I identify which out_file belong to which via MapNode? Yea I tried running the command and it is not working at all
Got a Traiterror saying the filepath is not valid.
Chris Markiewicz
@markiewicz:matrix.org
[m]
The out_file list will have the same order as the in_file list.
xd3262nd
@xd3262nd
I see...May I know do I just use the same GunZip for another command (such as Regf3d) Node (within the same workflow)?
Chris Markiewicz
@markiewicz:matrix.org
[m]
Each time you want to run a command, you need a new node, unless it's trivially parameterized in a MapNode. Sorry, I actually dodn't have much time, but I assume you've seen https://miykael.github.io/nipype_tutorial/?
xd3262nd
@xd3262nd
No worries thanks
^ yea I did but I will try to test them out
xd3262nd
@xd3262nd
Hello! 👋 I am trying to build a custom interface with nipype and having some trouble building the outputspec, is there anyone familiar with this?