Skip to content

FIX: parsing of filename in AlignEpiAnatPy when filename does not have + #2909

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

Merged
merged 2 commits into from
Apr 18, 2019
Merged

FIX: parsing of filename in AlignEpiAnatPy when filename does not have + #2909

merged 2 commits into from
Apr 18, 2019

Conversation

gpiantoni
Copy link
Contributor

Summary

AlignEpiAnatPy can take an AFNI file or a NIFTI file as input. If it's an AFNI file, it correctly removes the part after the +. However, a NIFTI file does not need to have a + in the filename, so the part ''.join(anat_prefix.split('+')[:-1]) returns "". This fix only removes the AFNI suffix if the filename contains a +.

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

Do not split + if it's not in the filename.

Acknowledgment

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

@codecov-io
Copy link

codecov-io commented Apr 5, 2019

Codecov Report

Merging #2909 into master will decrease coverage by <.01%.
The diff coverage is 12.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2909      +/-   ##
==========================================
- Coverage   67.57%   67.57%   -0.01%     
==========================================
  Files         343      343              
  Lines       43645    43649       +4     
  Branches     5428     5430       +2     
==========================================
  Hits        29494    29494              
+ Misses      13447    13443       -4     
- Partials      704      712       +8
Flag Coverage Δ
#smoketests 50.47% <ø> (ø) ⬆️
#unittests 65% <12.5%> (-0.01%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/afni/preprocess.py 82.01% <0%> (-0.39%) ⬇️
nipype/interfaces/afni/utils.py 81.89% <100%> (ø) ⬆️
nipype/interfaces/io.py 55.07% <0%> (ø) ⬆️
nipype/interfaces/freesurfer/preprocess.py 66.11% <0%> (ø) ⬆️
nipype/interfaces/dynamic_slicer.py 17.47% <0%> (ø) ⬆️
nipype/interfaces/nipy/preprocess.py 45.79% <0%> (ø) ⬆️

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 44ed184...e384080. Read the comment docs.

@mgxd
Copy link
Member

mgxd commented Apr 9, 2019

@gpiantoni thanks for the patch - if you sync with current master it should get tests passing

@gpiantoni
Copy link
Contributor Author

It should be good now. thanks

@satra satra merged commit bb68793 into nipy:master Apr 18, 2019
@effigies effigies added this to the 1.2.0 milestone Apr 29, 2019
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.

5 participants