{"action":"created","comment":{"url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments/82108513","pull_request_review_id":3038359,"id":82108513,"diff_hunk":"@@ -0,0 +1,109 @@\n+'''\n+Workflow for discovering confounds.\n+Calculates frame displacement, segment regressors, global regressor, dvars, aCompCor, tCompCor\n+'''\n+from nipype.interfaces import utility, nilearn\n+from nipype.algorithms import confounds\n+from nipype.pipeline import engine as pe\n+\n+from fmriprep.interfaces import mask\n+from fmriprep import interfaces\n+\n+# this should be moved to nipype. Won't do it now bc of slow PR approval there\n+# I'm not 100% sure the order is correct\n+FAST_DEFAULT_SEGS = ['CSF', 'gray matter', 'white matter']\n+\n+def discover_wf(settings, name=\"ConfoundDiscoverer\"):\n+    ''' All input fields are required.\n+\n+    Calculates global regressor and tCompCor\n+        from motion-corrected fMRI ('inputnode.fmri_file').\n+    Calculates DVARS from the fMRI and an EPI brain mask ('inputnode.epi_mask')\n+    Calculates frame displacement from MCFLIRT movement parameters ('inputnode.movpar_file')\n+    Calculates segment regressors and aCompCor\n+        from the fMRI and a white matter/gray matter/CSF segmentation ('inputnode.t1_seg')\n+\n+    Saves the confounds in a file ('outputnode.confounds_file')'''\n+\n+    inputnode = pe.Node(utility.IdentityInterface(fields=['fmri_file', 'movpar_file', 't1_seg',\n+                                                          'epi_mask']),\n+                        name='inputnode')\n+    outputnode = pe.Node(utility.IdentityInterface(fields=['confounds_file']),\n+                         name='outputnode')\n+\n+    # Global and segment regressors\n+    signals = pe.Node(nilearn.SignalExtraction(include_global=True, detrend=True,","path":"fmriprep/workflows/confounds.py","position":35,"original_position":35,"commit_id":"2b970a1450e031277451a61533dc0d7e3a300c80","original_commit_id":"0d50499e7acfb580cd11712537ebaa1c32fd5673","user":{"login":"shoshber","id":1402948,"avatar_url":"https://avatars.githubusercontent.com/u/1402948?v=3","gravatar_id":"","url":"https://api.github.com/users/shoshber","html_url":"https://github.com/shoshber","followers_url":"https://api.github.com/users/shoshber/followers","following_url":"https://api.github.com/users/shoshber/following{/other_user}","gists_url":"https://api.github.com/users/shoshber/gists{/gist_id}","starred_url":"https://api.github.com/users/shoshber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoshber/subscriptions","organizations_url":"https://api.github.com/users/shoshber/orgs","repos_url":"https://api.github.com/users/shoshber/repos","events_url":"https://api.github.com/users/shoshber/events{/privacy}","received_events_url":"https://api.github.com/users/shoshber/received_events","type":"User","site_admin":false},"body":"oh wow. that is supposed to be `nipype.SignalExtraction`. how did that even work?","created_at":"2016-10-06T02:36:07Z","updated_at":"2016-10-06T02:36:07Z","html_url":"https://github.com/poldracklab/fmriprep/pull/157#discussion_r82108513","pull_request_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157","_links":{"self":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments/82108513"},"html":{"href":"https://github.com/poldracklab/fmriprep/pull/157#discussion_r82108513"},"pull_request":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157"}}},"pull_request":{"url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157","id":87625496,"html_url":"https://github.com/poldracklab/fmriprep/pull/157","diff_url":"https://github.com/poldracklab/fmriprep/pull/157.diff","patch_url":"https://github.com/poldracklab/fmriprep/pull/157.patch","issue_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/157","number":157,"state":"open","locked":false,"title":"WIP Confounds","user":{"login":"shoshber","id":1402948,"avatar_url":"https://avatars.githubusercontent.com/u/1402948?v=3","gravatar_id":"","url":"https://api.github.com/users/shoshber","html_url":"https://github.com/shoshber","followers_url":"https://api.github.com/users/shoshber/followers","following_url":"https://api.github.com/users/shoshber/following{/other_user}","gists_url":"https://api.github.com/users/shoshber/gists{/gist_id}","starred_url":"https://api.github.com/users/shoshber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoshber/subscriptions","organizations_url":"https://api.github.com/users/shoshber/orgs","repos_url":"https://api.github.com/users/shoshber/repos","events_url":"https://api.github.com/users/shoshber/events{/privacy}","received_events_url":"https://api.github.com/users/shoshber/received_events","type":"User","site_admin":false},"body":"Still working on getting the circle tests to pass, but the bulk of the work is done. Take a look!","created_at":"2016-10-02T05:53:03Z","updated_at":"2016-10-06T02:36:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24574d65209275c0cbb4fd41ab92b5c91c21eb37","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157/commits","review_comments_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157/comments","review_comment_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments{/number}","comments_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/157/comments","statuses_url":"https://api.github.com/repos/poldracklab/fmriprep/statuses/2b970a1450e031277451a61533dc0d7e3a300c80","head":{"label":"shoshber:confounds","ref":"confounds","sha":"2b970a1450e031277451a61533dc0d7e3a300c80","user":{"login":"shoshber","id":1402948,"avatar_url":"https://avatars.githubusercontent.com/u/1402948?v=3","gravatar_id":"","url":"https://api.github.com/users/shoshber","html_url":"https://github.com/shoshber","followers_url":"https://api.github.com/users/shoshber/followers","following_url":"https://api.github.com/users/shoshber/following{/other_user}","gists_url":"https://api.github.com/users/shoshber/gists{/gist_id}","starred_url":"https://api.github.com/users/shoshber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoshber/subscriptions","organizations_url":"https://api.github.com/users/shoshber/orgs","repos_url":"https://api.github.com/users/shoshber/repos","events_url":"https://api.github.com/users/shoshber/events{/privacy}","received_events_url":"https://api.github.com/users/shoshber/received_events","type":"User","site_admin":false},"repo":{"id":61680340,"name":"fmriprep","full_name":"shoshber/fmriprep","owner":{"login":"shoshber","id":1402948,"avatar_url":"https://avatars.githubusercontent.com/u/1402948?v=3","gravatar_id":"","url":"https://api.github.com/users/shoshber","html_url":"https://github.com/shoshber","followers_url":"https://api.github.com/users/shoshber/followers","following_url":"https://api.github.com/users/shoshber/following{/other_user}","gists_url":"https://api.github.com/users/shoshber/gists{/gist_id}","starred_url":"https://api.github.com/users/shoshber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoshber/subscriptions","organizations_url":"https://api.github.com/users/shoshber/orgs","repos_url":"https://api.github.com/users/shoshber/repos","events_url":"https://api.github.com/users/shoshber/events{/privacy}","received_events_url":"https://api.github.com/users/shoshber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shoshber/fmriprep","description":"Fmriprep is a functional magnetic resonance image pre-processing pipeline that is designed to provide an easily accessible, state-of-the-art interface that is robust to differences in scan acquisition protocols and that requires minimal user input, while providing easily interpretable and comprehensive error and output reporting.","fork":true,"url":"https://api.github.com/repos/shoshber/fmriprep","forks_url":"https://api.github.com/repos/shoshber/fmriprep/forks","keys_url":"https://api.github.com/repos/shoshber/fmriprep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shoshber/fmriprep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shoshber/fmriprep/teams","hooks_url":"https://api.github.com/repos/shoshber/fmriprep/hooks","issue_events_url":"https://api.github.com/repos/shoshber/fmriprep/issues/events{/number}","events_url":"https://api.github.com/repos/shoshber/fmriprep/events","assignees_url":"https://api.github.com/repos/shoshber/fmriprep/assignees{/user}","branches_url":"https://api.github.com/repos/shoshber/fmriprep/branches{/branch}","tags_url":"https://api.github.com/repos/shoshber/fmriprep/tags","blobs_url":"https://api.github.com/repos/shoshber/fmriprep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shoshber/fmriprep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shoshber/fmriprep/git/refs{/sha}","trees_url":"https://api.github.com/repos/shoshber/fmriprep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shoshber/fmriprep/statuses/{sha}","languages_url":"https://api.github.com/repos/shoshber/fmriprep/languages","stargazers_url":"https://api.github.com/repos/shoshber/fmriprep/stargazers","contributors_url":"https://api.github.com/repos/shoshber/fmriprep/contributors","subscribers_url":"https://api.github.com/repos/shoshber/fmriprep/subscribers","subscription_url":"https://api.github.com/repos/shoshber/fmriprep/subscription","commits_url":"https://api.github.com/repos/shoshber/fmriprep/commits{/sha}","git_commits_url":"https://api.github.com/repos/shoshber/fmriprep/git/commits{/sha}","comments_url":"https://api.github.com/repos/shoshber/fmriprep/comments{/number}","issue_comment_url":"https://api.github.com/repos/shoshber/fmriprep/issues/comments{/number}","contents_url":"https://api.github.com/repos/shoshber/fmriprep/contents/{+path}","compare_url":"https://api.github.com/repos/shoshber/fmriprep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shoshber/fmriprep/merges","archive_url":"https://api.github.com/repos/shoshber/fmriprep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shoshber/fmriprep/downloads","issues_url":"https://api.github.com/repos/shoshber/fmriprep/issues{/number}","pulls_url":"https://api.github.com/repos/shoshber/fmriprep/pulls{/number}","milestones_url":"https://api.github.com/repos/shoshber/fmriprep/milestones{/number}","notifications_url":"https://api.github.com/repos/shoshber/fmriprep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shoshber/fmriprep/labels{/name}","releases_url":"https://api.github.com/repos/shoshber/fmriprep/releases{/id}","deployments_url":"https://api.github.com/repos/shoshber/fmriprep/deployments","created_at":"2016-06-22T01:49:16Z","updated_at":"2016-08-30T05:56:02Z","pushed_at":"2016-10-05T22:46:39Z","git_url":"git://github.com/shoshber/fmriprep.git","ssh_url":"git@github.com:shoshber/fmriprep.git","clone_url":"https://github.com/shoshber/fmriprep.git","svn_url":"https://github.com/shoshber/fmriprep","homepage":"","size":542,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"poldracklab:master","ref":"master","sha":"8e9e2578cb70c8d5e13cf7c9f56b200b947ef77c","user":{"login":"poldracklab","id":9287954,"avatar_url":"https://avatars.githubusercontent.com/u/9287954?v=3","gravatar_id":"","url":"https://api.github.com/users/poldracklab","html_url":"https://github.com/poldracklab","followers_url":"https://api.github.com/users/poldracklab/followers","following_url":"https://api.github.com/users/poldracklab/following{/other_user}","gists_url":"https://api.github.com/users/poldracklab/gists{/gist_id}","starred_url":"https://api.github.com/users/poldracklab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poldracklab/subscriptions","organizations_url":"https://api.github.com/users/poldracklab/orgs","repos_url":"https://api.github.com/users/poldracklab/repos","events_url":"https://api.github.com/users/poldracklab/events{/privacy}","received_events_url":"https://api.github.com/users/poldracklab/received_events","type":"Organization","site_admin":false},"repo":{"id":53175327,"name":"fmriprep","full_name":"poldracklab/fmriprep","owner":{"login":"poldracklab","id":9287954,"avatar_url":"https://avatars.githubusercontent.com/u/9287954?v=3","gravatar_id":"","url":"https://api.github.com/users/poldracklab","html_url":"https://github.com/poldracklab","followers_url":"https://api.github.com/users/poldracklab/followers","following_url":"https://api.github.com/users/poldracklab/following{/other_user}","gists_url":"https://api.github.com/users/poldracklab/gists{/gist_id}","starred_url":"https://api.github.com/users/poldracklab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poldracklab/subscriptions","organizations_url":"https://api.github.com/users/poldracklab/orgs","repos_url":"https://api.github.com/users/poldracklab/repos","events_url":"https://api.github.com/users/poldracklab/events{/privacy}","received_events_url":"https://api.github.com/users/poldracklab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/poldracklab/fmriprep","description":"fMRIprep is a functional magnetic resonance image pre-processing pipeline that is designed to provide an easily accessible, state-of-the-art interface that is robust to differences in scan acquisition protocols and that requires minimal user input, while providing easily interpretable and comprehensive error and output reporting.","fork":false,"url":"https://api.github.com/repos/poldracklab/fmriprep","forks_url":"https://api.github.com/repos/poldracklab/fmriprep/forks","keys_url":"https://api.github.com/repos/poldracklab/fmriprep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poldracklab/fmriprep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poldracklab/fmriprep/teams","hooks_url":"https://api.github.com/repos/poldracklab/fmriprep/hooks","issue_events_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/events{/number}","events_url":"https://api.github.com/repos/poldracklab/fmriprep/events","assignees_url":"https://api.github.com/repos/poldracklab/fmriprep/assignees{/user}","branches_url":"https://api.github.com/repos/poldracklab/fmriprep/branches{/branch}","tags_url":"https://api.github.com/repos/poldracklab/fmriprep/tags","blobs_url":"https://api.github.com/repos/poldracklab/fmriprep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poldracklab/fmriprep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poldracklab/fmriprep/git/refs{/sha}","trees_url":"https://api.github.com/repos/poldracklab/fmriprep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poldracklab/fmriprep/statuses/{sha}","languages_url":"https://api.github.com/repos/poldracklab/fmriprep/languages","stargazers_url":"https://api.github.com/repos/poldracklab/fmriprep/stargazers","contributors_url":"https://api.github.com/repos/poldracklab/fmriprep/contributors","subscribers_url":"https://api.github.com/repos/poldracklab/fmriprep/subscribers","subscription_url":"https://api.github.com/repos/poldracklab/fmriprep/subscription","commits_url":"https://api.github.com/repos/poldracklab/fmriprep/commits{/sha}","git_commits_url":"https://api.github.com/repos/poldracklab/fmriprep/git/commits{/sha}","comments_url":"https://api.github.com/repos/poldracklab/fmriprep/comments{/number}","issue_comment_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/comments{/number}","contents_url":"https://api.github.com/repos/poldracklab/fmriprep/contents/{+path}","compare_url":"https://api.github.com/repos/poldracklab/fmriprep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poldracklab/fmriprep/merges","archive_url":"https://api.github.com/repos/poldracklab/fmriprep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poldracklab/fmriprep/downloads","issues_url":"https://api.github.com/repos/poldracklab/fmriprep/issues{/number}","pulls_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls{/number}","milestones_url":"https://api.github.com/repos/poldracklab/fmriprep/milestones{/number}","notifications_url":"https://api.github.com/repos/poldracklab/fmriprep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poldracklab/fmriprep/labels{/name}","releases_url":"https://api.github.com/repos/poldracklab/fmriprep/releases{/id}","deployments_url":"https://api.github.com/repos/poldracklab/fmriprep/deployments","created_at":"2016-03-05T00:56:46Z","updated_at":"2016-10-02T18:04:18Z","pushed_at":"2016-10-05T23:57:08Z","git_url":"git://github.com/poldracklab/fmriprep.git","ssh_url":"git@github.com:poldracklab/fmriprep.git","clone_url":"https://github.com/poldracklab/fmriprep.git","svn_url":"https://github.com/poldracklab/fmriprep","homepage":"","size":554,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":25,"forks":6,"open_issues":25,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157"},"html":{"href":"https://github.com/poldracklab/fmriprep/pull/157"},"issue":{"href":"https://api.github.com/repos/poldracklab/fmriprep/issues/157"},"comments":{"href":"https://api.github.com/repos/poldracklab/fmriprep/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/poldracklab/fmriprep/statuses/2b970a1450e031277451a61533dc0d7e3a300c80"}}}}
{"actor":{"display_login":"shoshber"}}