Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 04 09:25
    codecov[bot] commented #3309
  • Mar 04 08:56
    codecov[bot] commented #3309
  • Mar 04 08:56
    codecov[bot] commented #3309
  • Mar 04 08:56
    ZviBaratz synchronize #3309
  • Mar 04 08:38
    codecov[bot] commented #3309
  • Mar 04 08:38
    codecov[bot] commented #3309
  • Mar 04 08:38
    ZviBaratz synchronize #3309
  • Mar 04 08:11
    ZviBaratz commented #3309
  • Mar 04 08:00
    ZviBaratz edited #3309
  • Mar 04 07:58
    ZviBaratz commented #3309
  • Mar 04 07:57
    ZviBaratz commented #3309
  • Mar 04 07:56
    codecov[bot] commented #3309
  • Mar 04 07:56
    codecov[bot] commented #3309
  • Mar 04 07:56
    ZviBaratz synchronize #3309
  • Mar 04 07:14
    codecov[bot] commented #3309
  • Mar 04 06:47
    ZviBaratz synchronize #3309
  • Mar 04 06:44
    ZviBaratz opened #3309
  • Mar 04 02:56
    codecov[bot] commented #3263
  • Mar 04 02:32
    aghayoor commented #3263
  • Mar 04 02:29
    codecov[bot] commented #3263
matrixbot
@matrixbot
Chris Markiewicz I'm not sure I understand. Does something prevent you from opening in its initial location?
Abdul Sayyed
@AbdulSayyed
on line 2 above skullstrip = BET(in_file = fileInput) it throws the above error
matrixbot
@matrixbot
Chris Markiewicz Sorry, I was unclear. I meant, why do you need to move the file to your current directory to open it? What are you using to open it?
Abdul Sayyed
@AbdulSayyed
I am not moving it, I am trying to read it where it is but it does not read it from the original location, for some reason it says that a path like object is expected .. but the value of ... is specified
matrixbot
@matrixbot
Chris Markiewicz
What do you get if you run: ls -AFl /home/sayyed/neuro-science/projects/nikola/mysite/notebooks/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz
Abdul Sayyed
@AbdulSayyed
The file is in the directory /data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz but the function does not treat it an acceptable path.
matrixbot
@matrixbot
Chris Markiewicz Ah. What is fileInput, then? Is there a chance that you're missing an initial /?
Abdul Sayyed
@AbdulSayyed
Thanks I got the point it is link pointing to another location let me deal with it , if any problem I will come back many thanks
Rami Hamati
@ramroomh
Hi there, thanks for your time. Looking to wrap https://surfer.nmr.mgh.harvard.edu/fswiki/mri_cvs_register. It is 1 line in bash, with the only required flag being subject ID -freesurfer does the rest. Is there any quick way to add this to a work flow without creating a whole interface?
Renata Baptista
@rpbaptista
Hello, I wondered if I could import the whole fsl_anat() with nipype, thanks!
Peer Herholz
@PeerHerholz
@ramroomh you could use the function interface for that: https://miykael.github.io/nipype_tutorial/notebooks/basic_function_interface.html
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
Peer Herholz
@PeerHerholz
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?