-
Notifications
You must be signed in to change notification settings - Fork 532
ENH CompCor #1599
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
ENH CompCor #1599
Conversation
Yeah, I wanted to ask what (the best way to create test data is)/(if I should create test data). The ones I have in there are temporary. |
|
||
class aCompCor(Node): | ||
class aCompCor(Workflow): |
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.
Shouldn't this be BaseInterface?
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.
Like @satra 's comment on the issue (#1594), I am proposing to write an interface containing the core CompCor logic. tCompCor and aCompCor would be workflows that contain nodes for creating the masks, a node for the core CompCor logic, and possibly (?) nodes for applying the extracted noise components. What do you think?
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.
I see... Workflows go here:
https://github.com/nipy/nipype/tree/master/nipype/workflows and follow a
slightly different pattern (they are functions returning a workflow object
rather than sublasses of Workflow).
I personally would just create two Interfaces: aCompCor(BaseInterface) that
takes a mask, calculates PCA and return the components, and
tCompCor(aCompCor) that takes a percentile argument n, creates a mask that
includes only the n% most variable voxels and reuses the code from its
parent aCompCor to return components. This is as flexible as the workflows,
but easier to integrate with pipelines as well as implement. Let me know
what do you think.
On Fri, Sep 2, 2016 at 10:16 PM, Shoshana Berleant <notifications@github.com
wrote:
In nipype/algorithms/compcor.py
#1599 (comment):-class aCompCor(Node):
+class aCompCor(Workflow):Like @satra https://github.com/satra 's comment on the issue (#1594
#1594), I am proposing to write an
interface containing the core CompCor logic. tCompCor and aCompCor would be
workflows that contain nodes for creating the masks, a node for the core
CompCor logic, and possibly (?) nodes for applying the extracted noise
components. What do you think?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nipy/nipype/pull/1599/files/50da63f9a8c74e60ef43b48349d9e5e19f5ad719..9e0d32796cec4ef237e2ccb2b7b74554f01c6ad8#r77431634,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOkp4CKN3GLOC9k9ZZtcY92UazGtooFks5qmQK7gaJpZM4JyQmp
.
1 similar comment
class CompCoreOutputSpec(TraitedSpec): | ||
components_file = File(desc='text file containing the noise components', exists=True) | ||
|
||
class CompCore(BaseInterface): |
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.
@shoshber - checking if this is a pun intended class name :) we should use the name from the paper just for searchability purposes. also see how doi's are now included to be able to generate a citation list for an interface.
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.
Not the best place to mention this (I can make a separate issue) but is there a keyword search functionality in nipype? In other words it would be great if interfaces had keywords (like "motion correction", "brain masking"...it would be important to choose them carefully!) and then there was some way to search through them to find an interface that does what you want. Seems relevant here as it is best to have the name match what's in the paper, but then that name isn't actually all that descriptive about what the interface does!
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.
Yes it's a pun :) I'll change it.
re doi's, is this what you're referring to? #1464
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.
Yup! It's just a question of adding references_
field such as here:
nipype/nipype/interfaces/spm/base.py
Line 239 in 0f2cb9f
references_ = [{'entry': BibTeX("@book{FrackowiakFristonFrithDolanMazziotta1997," |
On Tue, Sep 6, 2016 at 2:15 PM, Shoshana Berleant notifications@github.com
wrote:
In nipype/algorithms/compcor.py
#1599 (comment):+import numpy as np
+from scipy import linalg, stats
+import os
+
+from nipype.pipeline.engine import Workflow
+
+class CompCoreInputSpec(BaseInterfaceInputSpec):
- realigned_file = File(exists=True, mandatory=True, desc='already realigned brain image (4D)')
- mask_file = File(exists=True, mandatory=True, desc='mask file that determines ROI (3D)')
- num_components = traits.Int(6, usedefault=True) # 6 for BOLD, 4 for ASL
additional_regressors??
+class CompCoreOutputSpec(TraitedSpec):
- components_file = File(desc='text file containing the noise components', exists=True)
+class CompCore(BaseInterface):
Yes it's a pun :) I'll change it.
re doi's, is this what you're referring to? #1464
#1464—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nipy/nipype/pull/1599/files/ef50858d3b3016018f0078af6b7da29412803c00#r77720814,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOkp7UyOpbrANACeVwGabDKi06T-Wveks5qndgEgaJpZM4JyQmp
.
|
I have the impression that absolute imports are messing up with the installed and the development versions in travis. I guess the easiest way to solve that is using explicit absolute imports. |
I had a chat with @satra (we are both at #NHW16) about the temporal denoising. We think the best way to go forward is to add |
Current coverage is 69.76% (diff: 99.02%)
|
exclude_low=True, exclude_high=True, | ||
usedefault=True, desc='the percentile ' | ||
'used to select highest-variance ' | ||
'voxels. By default the 2% of voxels ' |
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 default value is ".02" not "2%".
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.
there should be some clarity that this should be expressed as value ranging from 0.0-1.0 rather than 0-100
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.
I'll fix the documentation.
Other than the two comments I made (inf and extra_regressors) I think this is ready to merge. |
where did the duecredit reference go? |
Good question - I saw it when I was reviewing this PR a few days ago. @shoshber ? |
see #1630 |
Putting this up early