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 change suffix workflow #516

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

Remi-Gau
Copy link
Contributor

@Remi-Gau Remi-Gau commented Feb 7, 2022

@marcobarilari

Was turning out to be too annoying to incorporate a change suffix only into bidsRename (that will have to happen later) so in the meantime I am adding a small workflow to change suffixes only.

@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #516 (891b08d) into dev (c76e644) will decrease coverage by 0.74%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #516      +/-   ##
==========================================
- Coverage   72.99%   72.24%   -0.75%     
==========================================
  Files         192      193       +1     
  Lines        4058     4104      +46     
==========================================
+ Hits         2962     2965       +3     
- Misses       1096     1139      +43     
Flag Coverage Δ
unittests 72.24% <0.00%> (-0.75%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/workflows/bidsChangeSuffix.m 0.00% <0.00%> (ø)
src/IO/saveSpmScript.m 88.46% <0.00%> (+0.96%) ⬆️
src/infra/getEnvInfo.m 79.54% <0.00%> (+2.27%) ⬆️

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 c76e644...891b08d. Read the comment docs.

@marcobarilari
Copy link
Collaborator

reporting the behavior here when setting derivatives as input:

FOR TASK(s): visualLocalizerFingerTapping
Getting data from:
 /Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives
Error using errorHandling (line 52)
This file does not exist: /Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives/dataset_description.json[.gz]

Error in validationInputFile (line 77)
    errorHandling(mfilename(), 'nonExistentFile', msg, false, true);

Error in getData (line 39)
  validationInputFile(bidsDir, 'dataset_description.json');

Error in setUpWorkflow (line 39)
  [BIDS, opt] = getData(opt, bidsDir);

Error in bidsChangeSuffix (line 52)
  [BIDS, opt] = setUpWorkflow(opt, 'changing suffix', opt.dir.input);

Error in SpatialPrepro (line 50)
  bidsChangeSuffix(opt, newSuffix, ...

so the file it is looking for is in /Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives/cpp_spm-preproc/dataset_description.json

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Feb 8, 2022

reporting the behavior here when setting derivatives as input:

FOR TASK(s): visualLocalizerFingerTapping
Getting data from:
 /Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives
Error using errorHandling (line 52)
This file does not exist: /Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives/dataset_description.json[.gz]

Error in validationInputFile (line 77)
    errorHandling(mfilename(), 'nonExistentFile', msg, false, true);

Error in getData (line 39)
  validationInputFile(bidsDir, 'dataset_description.json');

Error in setUpWorkflow (line 39)
  [BIDS, opt] = getData(opt, bidsDir);

Error in bidsChangeSuffix (line 52)
  [BIDS, opt] = setUpWorkflow(opt, 'changing suffix', opt.dir.input);

Error in SpatialPrepro (line 50)
  bidsChangeSuffix(opt, newSuffix, ...

so the file it is looking for is in /Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives/cpp_spm-preproc/dataset_description.json

yup we at least expect the input dataset to have data_description.json file

add a dummy one in there : even with just {} should already help

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Feb 8, 2022

that or you forgot one folder in your path ?

It says it is reading the data from

/Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives

When it should be reading them from

/Users/barilari/data/temp_to_delete/ses-007_2delete/derivatives/cpp_spm-preproc/

@Remi-Gau Remi-Gau merged commit 39bb165 into cpp-lln-lab:dev Feb 8, 2022
@Remi-Gau Remi-Gau deleted the change_suffix branch February 16, 2022 06:31
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.

2 participants