{"action":"created","issue":{"url":"https://api.github.com/repos/nipy/nipype/issues/795","labels_url":"https://api.github.com/repos/nipy/nipype/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/nipy/nipype/issues/795/comments","events_url":"https://api.github.com/repos/nipy/nipype/issues/795/events","html_url":"https://github.com/nipy/nipype/pull/795","id":27291689,"number":795,"title":"WIP: nipype_cmd - run any Interface from a command line","user":{"login":"chrisfilo","id":238759,"avatar_url":"https://avatars.githubusercontent.com/u/238759?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisfilo","html_url":"https://github.com/chrisfilo","followers_url":"https://api.github.com/users/chrisfilo/followers","following_url":"https://api.github.com/users/chrisfilo/following{/other_user}","gists_url":"https://api.github.com/users/chrisfilo/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisfilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisfilo/subscriptions","organizations_url":"https://api.github.com/users/chrisfilo/orgs","repos_url":"https://api.github.com/users/chrisfilo/repos","events_url":"https://api.github.com/users/chrisfilo/events{/privacy}","received_events_url":"https://api.github.com/users/chrisfilo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-02-10T19:12:26Z","updated_at":"2015-03-17T22:10:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nipy/nipype/pulls/795","html_url":"https://github.com/nipy/nipype/pull/795","diff_url":"https://github.com/nipy/nipype/pull/795.diff","patch_url":"https://github.com/nipy/nipype/pull/795.patch"},"body":"nipype_cmd --help\r\n\r\n    usage: nipype_cmd [-h] module interface\r\n\r\n    Nipype interface runner\r\n\r\n    positional arguments:\r\n      module      Module name\r\n      interface   Interface name\r\n\r\n    optional arguments:\r\n      -h, --help  show this help message and exit\r\n\r\nnipype_cmd nipype.interfaces.nipy\r\n\r\n    Available Interfaces:\r\n\t    SpaceTimeRealigner\r\n\t    Similarity\r\n\t    ComputeMask\r\n\t    FitGLM\r\n\t    EstimateContrast\r\n\t    FmriRealign4d\r\n\r\nnipype_cmd nipype.interfaces.nipy ComputeMask --help\r\n\r\n    usage: nipype_cmd nipype.interfaces.nipy ComputeMask [-h] [--M M] [--cc CC]\r\n                                                         [--ignore_exception IGNORE_EXCEPTION]\r\n                                                         [--m M]\r\n                                                         [--reference_volume REFERENCE_VOLUME]\r\n                                                         mean_volume\r\n\r\n    Run ComputeMask\r\n\r\n    positional arguments:\r\n      mean_volume           mean EPI image, used to compute the threshold for the\r\n                            mask\r\n\r\n    optional arguments:\r\n      -h, --help            show this help message and exit\r\n      --M M                 upper fraction of the histogram to be discarded\r\n      --cc CC               Keep only the largest connected component\r\n      --ignore_exception IGNORE_EXCEPTION\r\n                            Print an error message instead of throwing an\r\n                            exception in case the interface fails to run\r\n      --m M                 lower fraction of the histogram to be discarded\r\n      --reference_volume REFERENCE_VOLUME\r\n                            reference volume used to compute the mask. If none is\r\n                            give, the mean volume is used.\r\n\r\nnipype_cmd nipype.interfaces.nipy ComputeMask /tmp/mean_volume.nii\r\n\r\n    brain_mask = /tmp/mean_mask.nii.gz"},"comment":{"url":"https://api.github.com/repos/nipy/nipype/issues/comments/82618251","html_url":"https://github.com/nipy/nipype/pull/795#issuecomment-82618251","issue_url":"https://api.github.com/repos/nipy/nipype/issues/795","id":82618251,"user":{"login":"chrisfilo","id":238759,"avatar_url":"https://avatars.githubusercontent.com/u/238759?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisfilo","html_url":"https://github.com/chrisfilo","followers_url":"https://api.github.com/users/chrisfilo/followers","following_url":"https://api.github.com/users/chrisfilo/following{/other_user}","gists_url":"https://api.github.com/users/chrisfilo/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisfilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisfilo/subscriptions","organizations_url":"https://api.github.com/users/chrisfilo/orgs","repos_url":"https://api.github.com/users/chrisfilo/repos","events_url":"https://api.github.com/users/chrisfilo/events{/privacy}","received_events_url":"https://api.github.com/users/chrisfilo/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T22:10:34Z","updated_at":"2015-03-17T22:10:34Z","body":"nipype_cmd is written in a very generic way right now - it can turn any Nipype Interface into a command line script. Interfaces it operates on do not have to eve nbe part of nipype package. You could do:\r\n\r\n\tnipype_cmd nipype.interfaces.dipy TensorMode\r\n\t\r\nbut also:\r\n\r\n\tnipype_cmd dipy.interfaces TensorMode\r\n\t\r\nif dipy was installed and provided Nipype Interfaces. Does this functionality help you in your use cases?"}}