Skip to content

Commit be9ba3f

Browse files
authored
Merge pull request #482 from Remi-Gau/remi-job_mat_to_mfile
[ENH] save jobs as m file
2 parents 9d0275f + d5fcb7e commit be9ba3f

File tree

73 files changed

+458
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+458
-267
lines changed

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cff-version: 1.2.0
33
title: "CPP SPM"
44

55
version: 1.1.4dev
6-
6+
77
abstract: CPP_SPM is a set pipelines and tools for Octave/MATLAB to process and analyze BIDS data sets using SPM.
88

99
message: "If you use this software, please cite it as below."

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
## Contributing guidelines
2+
3+
Feel free to open issues to report a bug and ask for improvements.
4+
5+
If you want to contribute, have a look at our
6+
[contributing guidelines](https://github.com/cpp-lln-lab/.github/blob/main/CONTRIBUTING.md)
7+
that are meant to guide you and help you get started. If something is not clear
8+
or you get stuck: it is more likely we did not do good enough a job at
9+
explaining things. So do not hesitate to open an issue, just to ask for
10+
clarification.
11+
12+
### Style guidelines
13+
14+
We use `camelCase` to name functions and variables for the vast majority of the
15+
code in this repository.
16+
17+
Scripts names in general and as well functions related to the demos use a
18+
`snake_case`.
19+
20+
Constant are written in `UPPERCASE`.
21+
22+
#### Input arguments ordering
23+
24+
From more general to more specific
25+
26+
`BIDS` > `opt` > `subject` > `session` > `run`
27+
28+
- `BIDS` (output from `getData` or `bids.layout`) restrict the set of possible
29+
analysis one can run to this BIDS data set
30+
- `opt` restricts this set even further
31+
- `subject` / `session` / `run` even more
32+
33+
```matlab
34+
% OK
35+
varargout = getInfo(BIDS, opt, subLabel, info, varargin)
36+
37+
% not OK
38+
varargout = getInfo(subLabel, BIDS, opt, info, varargin)
39+
```
40+
41+
#### Output arguments ordering
42+
43+
Try to return them in order of importance first and in order of appearance
44+
otherwise.
45+
46+
#### Exceptions
47+
48+
If function creates or modifies a batch then `matlabbatch` is the first `argin`
49+
and first `argout`.
50+
51+
If a function performs an "action" to be chosen from a one of several strings
52+
(with a switch statement), this string comes as first `argin` or second if
53+
`matlabbatch` is first.
54+
55+
```matlab
56+
% OK
57+
varargout = getInfo('filename', BIDS, opt, subID, varargin)
58+
[matlabbatch, voxDim] = setBatchRealign(matlabbatch, [action = 'realign',] BIDS, opt, subID)
59+
60+
% not OK
61+
% 'filename' is the name of the "action" or the info to get in this case
62+
% batch and action should go first
63+
varargout = getInfo(BIDS, opt, subID, 'filename', varargin)
64+
[matlabbatch, voxDim] = setBatchRealign(BIDS, opt, subID, matlabbatch, [action = 'realign'])
65+
```

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ validate_cff: CITATION.cff
1313

1414
manual:
1515
cd docs && sh create_manual.sh
16-

README.md

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -71,76 +71,6 @@ Please see our
7171
[documentation](https://cpp_spm.readthedocs.io/en/latest/index.html) for more
7272
info.
7373

74-
## Contributing
75-
76-
Feel free to open issues to report a bug and ask for improvements.
77-
78-
If you want to contribute, have a look at our
79-
[contributing guidelines](https://github.com/cpp-lln-lab/.github/blob/main/CONTRIBUTING.md)
80-
that are meant to guide you and help you get started. If something is not clear
81-
or you get stuck: it is more likely we did not do good enough a job at
82-
explaining things. So do not hesitate to open an issue, just to ask for
83-
clarification.
84-
85-
### Style guidelines
86-
87-
These are some of the guidelines we try to follow. Several of them are described
88-
in our our
89-
[contributing guidelines](https://github.com/cpp-lln-lab/.github/blob/main/CONTRIBUTING.md).
90-
91-
We use `camelCase` to name functions and variables for the vast majority of the
92-
code in this repository.
93-
94-
Scripts names in general and as well functions related to the demos use a
95-
`snake_case`.
96-
97-
Constant are written in `UPPERCASE`.
98-
99-
#### Input arguments ordering
100-
101-
From more general to more specific
102-
103-
`BIDS` > `opt` > `subject` > `session` > `run`
104-
105-
- `BIDS` (output from `getData` or `bids.layout`) restrict the set of possible
106-
analysis one can run to this BIDS data set
107-
- `opt` restricts this set even further
108-
- `subject` / `session` / `run` even more
109-
110-
```matlab
111-
% OK
112-
varargout = getInfo(BIDS, opt, subLabel, info, varargin)
113-
114-
% not OK
115-
varargout = getInfo(subLabel, BIDS, opt, info, varargin)
116-
```
117-
118-
#### Output arguments ordering
119-
120-
Try to return them in order of importance first and in order of appearance
121-
otherwise.
122-
123-
#### Exceptions
124-
125-
If function creates or modifies a batch then `matlabbatch` is the first `argin`
126-
and first `argout`.
127-
128-
If a function performs an "action" to be chosen from a one of several strings
129-
(with a switch statement), this string comes as first `argin` or second if
130-
`matlabbatch` is first.
131-
132-
```matlab
133-
% OK
134-
varargout = getInfo('filename', BIDS, opt, subID, varargin)
135-
[matlabbatch, voxDim] = setBatchRealign(matlabbatch, [action = 'realign',] BIDS, opt, subID)
136-
137-
% not OK
138-
% 'filename' is the name of the "action" or the info to get in this case
139-
% batch and action should go first
140-
varargout = getInfo(BIDS, opt, subID, 'filename', varargin)
141-
[matlabbatch, voxDim] = setBatchRealign(BIDS, opt, subID, matlabbatch, [action = 'realign'])
142-
```
143-
14474
## Citation
14575

14676
```bibtex

docs/source/architecture.rst

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,40 +74,66 @@ Batches
7474
Low level functions description
7575
===============================
7676

77-
Utility functions
78-
-----------------
77+
BIDS related functions
78+
----------------------
7979

80-
.. automodule:: src.utils
80+
.. automodule:: src.bids
8181

82-
.. autofunction:: cleanCrash
82+
.. autofunction:: initBids
8383

84-
.. autofunction:: saveOptions
85-
.. autofunction:: loadAndCheckOptions
84+
.. autofunction:: addStcToQuery
85+
.. autofunction:: removeEmptyQueryFields
86+
87+
.. autofunction:: getROIs
8688

87-
.. autofunction:: getInfo
8889
.. autofunction:: getData
8990

90-
.. autofunction:: setDirectories
91-
.. autofunction:: createDataDictionary
92-
.. autofunction:: createDerivativeDir
93-
.. autofunction:: createGlmDirName
91+
.. autofunction:: getInfo
92+
.. autofunction:: getSubjectList
93+
.. autofunction:: getAndCheckRepetitionTime
94+
.. autofunction:: getAndCheckSliceOrder
9495

95-
.. autofunction:: getAnatFilename
96-
.. autofunction:: getBoldFilename
97-
.. autofunction:: getMeanFuncFilename
9896
.. autofunction:: getTpmFilename
97+
.. autofunction:: getMeanFuncFilename
98+
.. autofunction:: getBoldFilename
99+
.. autofunction:: getAnatFilename
99100

100-
.. autofunction:: getFuncVoxelDims
101-
.. autofunction:: getAndCheckSliceOrder
102-
.. autofunction:: getSubjectList
101+
Input / Output
102+
--------------
103+
104+
.. automodule:: src.IO
105+
106+
.. autofunction:: saveOptions
107+
.. autofunction:: loadAndCheckOptions
108+
109+
.. autofunction:: overwriteDir
110+
.. autofunction:: createDerivativeDir
111+
112+
.. autofunction:: saveSpmScript
113+
114+
.. autofunction:: unzipAndReturnsFullpathName
115+
116+
.. autofunction:: onsetsMatToTsv
117+
.. autofunction:: regressorsMatToTsv
103118

104-
.. autofunction:: renameSegmentParameter
105119
.. autofunction:: renameUnwarpParameter
120+
.. autofunction:: renameSegmentParameter
121+
122+
.. autofunction:: cleanCrash
123+
124+
Utility functions
125+
-----------------
126+
127+
.. automodule:: src.utils
128+
129+
.. autofunction:: createDataDictionary
130+
.. autofunction:: createGlmDirName
131+
132+
.. autofunction:: getFuncVoxelDims
106133

107134
.. autofunction:: rmTrialTypeStr
108135
.. autofunction:: setFields
109136

110-
.. autofunction:: unzipAndReturnsFullpathName
111137
.. autofunction:: validationInputFile
112138

113139

docs/source/defaults.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ checkOptions
1111
============
1212

1313
.. autofunction:: checkOptions
14+
.. autofunction:: setDirectories
1415

1516
spm_my_defaults
1617
===============

docs/source/function_description.rst

Lines changed: 0 additions & 84 deletions
This file was deleted.

docs/source/set_up.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Selecting groups and subjects
2828
The way to select certain subjects is summarised in the documentation of the
2929
:func:`src/utils/getSubjectList` function.
3030

31-
.. automodule:: src.utils
31+
.. automodule:: src.bids
3232

3333
.. autofunction:: getSubjectList
3434
:noindex:

lib/miss_hit.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
enable: false
2-

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ pre-commit
88
jupyterlab
99
octave_kernel
1010
rstcheck
11-

0 commit comments

Comments
 (0)