- Notifications
You must be signed in to change notification settings - Fork 536
WIP New interfaces for AFNI #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Yay, AFNI interfaces! It looks like these still need some work, though. First, they need some tests. At the moment, the module won't even import because of some issues with the indentation level of your docstrings. Take a look at, e.g., nipype/interfaces/fsl/tests/test_maths.py. The basic idea is, using the Nose framework, construct a bunch of class objects, set various inputs for typical use-cases, and then verify that the command-line that gets generated matches what you would write yourself. Additionally, it would be nice to have an example workflow that runs on some publicly available tutorial data, although since this looks like just a handful of interfaces it might not be possible to write an AFNI-only workflow that does a full set of processing. Second, they still need some style work. Take a look at the pep8.py program, which should catch most things: http://pypi.python.org/pypi/pep8. In terms of the class names, the various interfaces should be CamelCase, i.e. Threedskullstrip => ThreeDSkullStrip. I don't really use AFNI, but the fact that all their names start with 3d certainly is annoying from the perspective of writing a Python interface. I wonder if we even need the 3d part in our class names, though, in other words, if a script has this::
Most people are probably going to understand that it's the 3dskullstrip program that is getting called. @satra do you have thoughts on this? For instance, we don't start every Freesurfer interface with MRI. Since my actual understanding of AFNI is extremely shallow, it would be nice if someone who had used it a bit more could take a look. |
:-) sure! |
nipype/interfaces/afni/preprocess.py Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable the two lines on top of the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also check the header on top of other interface files. there is a little snippet of python code that allows tests to be run with data in nipype/testing/data
i agree with @mwaskom that we can remove Threed from the interfaces. and presumably a lot of those commands work on 4d files! |
let's try and polish this up within next week. also, with respect to test, focus on doctests as those turn into web examples. for each interface augment you doctest, so that you test the commandline. see for example: |
nipype/interfaces/afni/preprocess.py Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should maybe unify the inputspec parent classes across interfaces
nipype/interfaces/afni/preprocess.py Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please capitalize the first letter of each class
also, one docstring example for each class.
I've heard that you also have an example workflow working on publicly available data. Could you include it as well? This would help with testing. |
Hi chris , Its on https://github.com/ssikka/fcon1000 Its 2 pipelines fcon_pipeline and jhu_pipeline , one is a full blown resting state preprocessing pipeline and the other one is a freesurfer surface pipeline... |
Hi chris , Its on https://github.com/ssikka/fcon1000 Its 2 pipelines fcon_pipeline and jhu_pipeline , one is a full blown Best! On Thu, Mar 1, 2012 at 5:46 AM, Chris Filo Gorgolewski <
|
nipype/interfaces/afni/preprocess.py Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the docstr still requires some changes. could you follow the following format for all.
class X(object): """single sentence (no period at the end) <BLANK_LINE> Indented paragraph <BLANK_LINE> Examples ========
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note the blank lines and the use of =
for underlining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about now?
https://github.com/ssikka/nipype/blob/08001ab1b24e96184962d56d8ed94c1fb6fb060c/nipype/interfaces/afni/preprocess.py
On Fri, Mar 2, 2012 at 11:22 AM, Satrajit Ghosh <
reply@reply.github.com
wrote:
+class To3D(AFNICommand):
note the blank lines and the use of
=
for underlining.
Reply to this email directly or view it on GitHub:
https://github.com/nipy/nipype/pull/278/files#r512055
New interfaces, with the