Skip to content
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: Add flags dictionary input to spm.Level1Design #2861

Merged
merged 2 commits into from
Feb 24, 2019

Conversation

hstojic
Copy link
Contributor

@hstojic hstojic commented Jan 21, 2019

Summary

One common thing in SPM is to change the default masking threshold in the stats.fmri_spec part. It is set to 0.8 which is quite high if you are interested in midbrain regions, OFC etc that have lower signal. At the moment I don't see how to set this default and a correct way seemed to be to add flags option, similar to the one implemented in the EstimateModel function. I tried it out on my local version and it does work correctly, it adds a correct line to the .m file created by Nipype for this job. and resulting images correspondingly change.

If some additional files with documentation should be changed, do let me know.

Re Run make check-before-commit before submitting the PR. Where can I find info about libraries that I need to install to run this? If I run it on basic Ubuntu OS terminal it complains about missing libraries.

List of changes proposed in this PR (pull-request)

  • adds flags argument in Level1Design function

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

@codecov-io
Copy link

codecov-io commented Jan 21, 2019

Codecov Report

Merging #2861 into master will decrease coverage by 0.37%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2861      +/-   ##
==========================================
- Coverage   67.39%   67.02%   -0.38%     
==========================================
  Files         341      343       +2     
  Lines       43428    44798    +1370     
  Branches     5396     5848     +452     
==========================================
+ Hits        29270    30026     +756     
- Misses      13461    13983     +522     
- Partials      697      789      +92
Flag Coverage Δ
#smoketests 48.62% <33.33%> (-1.85%) ⬇️
#unittests 65.21% <33.33%> (+0.4%) ⬆️
Impacted Files Coverage Δ
nipype/interfaces/spm/model.py 42.54% <33.33%> (-0.07%) ⬇️
nipype/algorithms/rapidart.py 35% <0%> (-29.42%) ⬇️
nipype/interfaces/spm/base.py 68.64% <0%> (-18.49%) ⬇️
nipype/interfaces/fsl/model.py 75.3% <0%> (-5.32%) ⬇️
nipype/interfaces/spm/preprocess.py 52.88% <0%> (-4.15%) ⬇️
nipype/algorithms/modelgen.py 59.69% <0%> (-3.67%) ⬇️
nipype/testing/utils.py 89.65% <0%> (-1.73%) ⬇️
nipype/utils/misc.py 65.43% <0%> (-1.24%) ⬇️
nipype/pipeline/engine/workflows.py 77.77% <0%> (-1.18%) ⬇️
nipype/interfaces/fsl/epi.py 63.22% <0%> (-0.98%) ⬇️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2a21fd...1f9f106. Read the comment docs.

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor cleanups.

nipype/interfaces/spm/model.py Outdated Show resolved Hide resolved
nipype/interfaces/spm/model.py Show resolved Hide resolved
@effigies effigies changed the title ENH: added flags option to the Level1Design function in SPM interface ENH: Added flags option to the Level1Design function in SPM interface Feb 14, 2019
@effigies effigies changed the title ENH: Added flags option to the Level1Design function in SPM interface ENH: Add flags dictionary input to spm.Level1Design Feb 14, 2019
@effigies effigies added this to the 1.1.9 milestone Feb 14, 2019
Co-Authored-By: hstojic <hrvoje.stojic@protonmail.com>
@effigies effigies merged commit a3f5115 into nipy:master Feb 24, 2019
yarikoptic added a commit to yarikoptic/nipype that referenced this pull request Mar 15, 2019
1.1.9 (February 25, 2019)

Full changelog: https://github.com/nipy/nipype/milestone/30?closed=1

  * FIX: Make positional arguments to LaplacianThickness require previous argument (nipy#2848)
  * FIX: Import math and csv modules for bids_gen_info (nipy#2881)
  * FIX: Ensure outputs can be listed in camino.ProcStreamlines by defining instance variable (nipy#2739)
  * ENH: Allow afni.MaskTool to take multiple input files (nipy#2892)
  * ENH: Add flags dictionary input to spm.Level1Design (nipy#2861)
  * ENH: Threshold stddev once only in TSNR (nipy#2883)
  * ENH: Add workbench.CiftiSmooth interface (nipy#2871)
  * DOC: Replace initialism typo in comment with intended phrase (nipy#2875)
  * DOC: Fix typos in ANTs Registration input documentation (nipy#2869)

* tag '1.1.9': (34 commits)
  MNT: Update changelog
  MNT: Add Katherine Bottenhorn, Paul Mihai to Zenodo
  MNT: Add kchawla-pi to Zenodo, update mailmap and ordering
  add to zenodo
  MNT: Update zenodo ordering
  Update .zenodo.json
  afni utils.py - masktool - InputMultiPath for in_file argument
  MNT: Update .zenodo ordering
  MNT: Add Oliver Contier name to .zenodo.json
  Update nipype/interfaces/spm/model.py
  ENH: Add zenodo updating script
  MNT: Update mailmap to avoid renames in script
  MNT: Update .mailmap, .zenodo.json
  MNT: Version 1.1.9
  DOC: 1.1.9 changelog
  ENH: minor - compute non degenerate stddev map once
  BF: regenerated test_auto_LaplacianThickness using wonderfully long running tools/checkspecs.py
  TEST: Thorough test of LaplacianThickness requirement cascade
  FIX: Requires error text was backwards
  import math and csv modules for bids_gen_info
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants