[ENH]: Shorten Sphinx references in codebase #218
61 changed files with 249 additions and 259 deletions
|
|
@ -7,6 +7,7 @@
|
||||||

|

|
||||||
|
|
|||||||

|

|
||||||

|

|
||||||
|
[](https://github.com/psf/black)
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,55 +43,55 @@ Available
|
||||||
- Type/Config
|
- Type/Config
|
||||||
- State
|
- State
|
||||||
- Version Added
|
- Version Added
|
||||||
* - :class:`junifer.datagrabber.DataladHCP1200`
|
* - :class:`.DataladHCP1200`
|
||||||
- `HCP OpenAccess dataset <https://github.com/datalad-datasets/human-connectome-project-openaccess>`_
|
- `HCP OpenAccess dataset <https://github.com/datalad-datasets/human-connectome-project-openaccess>`_
|
||||||
- Open with registration
|
- Open with registration
|
||||||
- Built-in
|
- Built-in
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.configs.juseless.datagrabbers.JuselessDataladUKBVBM`
|
* - :class:`.JuselessDataladUKBVBM`
|
||||||
- UKB VBM dataset preprocessed with CAT. Available for Juseless only.
|
- UKB VBM dataset preprocessed with CAT. Available for Juseless only.
|
||||||
- Restricted
|
- Restricted
|
||||||
- ``junifer.configs.juseless``
|
- ``junifer.configs.juseless``
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.configs.juseless.datagrabbers.JuselessDataladCamCANVBM`
|
* - :class:`.JuselessDataladCamCANVBM`
|
||||||
- CamCAN VBM dataset preprocessed with CAT. Available for Juseless only.
|
- CamCAN VBM dataset preprocessed with CAT. Available for Juseless only.
|
||||||
- Restricted
|
- Restricted
|
||||||
- ``junifer.configs.juseless``
|
- ``junifer.configs.juseless``
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.datagrabber.DataladAOMICID1000`
|
* - :class:`.DataladAOMICID1000`
|
||||||
- `AOMIC 1000 dataset <https://github.com/OpenNeuroDatasets/ds003097>`_
|
- `AOMIC 1000 dataset <https://github.com/OpenNeuroDatasets/ds003097>`_
|
||||||
- Open without registration
|
- Open without registration
|
||||||
- Built-in
|
- Built-in
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.datagrabber.DataladAOMICPIOP1`
|
* - :class:`.DataladAOMICPIOP1`
|
||||||
- `AOMIC PIOP1 dataset <https://github.com/OpenNeuroDatasets/ds002785>`_
|
- `AOMIC PIOP1 dataset <https://github.com/OpenNeuroDatasets/ds002785>`_
|
||||||
- Open without registration
|
- Open without registration
|
||||||
- Built-in
|
- Built-in
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.datagrabber.DataladAOMICPIOP2`
|
* - :class:`.DataladAOMICPIOP2`
|
||||||
- `AOMIC PIOP2 dataset <https://github.com/OpenNeuroDatasets/ds002790>`_
|
- `AOMIC PIOP2 dataset <https://github.com/OpenNeuroDatasets/ds002790>`_
|
||||||
- Open without registration
|
- Open without registration
|
||||||
- Built-in
|
- Built-in
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.configs.juseless.datagrabbers.JuselessDataladAOMICID1000VBM`
|
* - :class:`.JuselessDataladAOMICID1000VBM`
|
||||||
- AOMIC ID1000 VBM dataset. Available for Juseless only.
|
- AOMIC ID1000 VBM dataset. Available for Juseless only.
|
||||||
- Restricted
|
- Restricted
|
||||||
- ``junifer.configs.juseless``
|
- ``junifer.configs.juseless``
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.configs.juseless.datagrabbers.JuselessDataladIXIVBM`
|
* - :class:`.JuselessDataladIXIVBM`
|
||||||
- `IXI VBM dataset <https://brain-development.org/ixi-dataset/>`_. Available for Juseless only.
|
- `IXI VBM dataset <https://brain-development.org/ixi-dataset/>`_. Available for Juseless only.
|
||||||
- Restricted
|
- Restricted
|
||||||
- ``junifer.configs.juseless``
|
- ``junifer.configs.juseless``
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.configs.juseless.datagrabbers.JuselessUCLA`
|
* - :class:`.JuselessUCLA`
|
||||||
- UCLA fMRIPrep dataset. Available for Juseless only.
|
- UCLA fMRIPrep dataset. Available for Juseless only.
|
||||||
- Restricted
|
- Restricted
|
||||||
- ``junifer.configs.juseless``
|
- ``junifer.configs.juseless``
|
||||||
|
|
@ -144,61 +144,61 @@ Available
|
||||||
- Description
|
- Description
|
||||||
- State
|
- State
|
||||||
- Version Added
|
- Version Added
|
||||||
* - :class:`junifer.markers.ParcelAggregation`
|
* - :class:`.ParcelAggregation`
|
||||||
- Apply parcellation and perform aggregation function
|
- Apply parcellation and perform aggregation function
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.FunctionalConnectivityParcels`
|
* - :class:`.FunctionalConnectivityParcels`
|
||||||
- Compute functional connectivity over parcellation
|
- Compute functional connectivity over parcellation
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.CrossParcellationFC`
|
* - :class:`.CrossParcellationFC`
|
||||||
- Compute functional connectivity across two parcellations
|
- Compute functional connectivity across two parcellations
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.SphereAggregation`
|
* - :class:`.SphereAggregation`
|
||||||
- Spherical aggregation using mean
|
- Spherical aggregation using mean
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.FunctionalConnectivitySpheres`
|
* - :class:`.FunctionalConnectivitySpheres`
|
||||||
- Compute functional connectivity over spheres placed on coordinates
|
- Compute functional connectivity over spheres placed on coordinates
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.RSSETSMarker`
|
* - :class:`.RSSETSMarker`
|
||||||
- Compute root sum of squares of edgewise timeseries
|
- Compute root sum of squares of edgewise timeseries
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.ReHoParcels`
|
* - :class:`.ReHoParcels`
|
||||||
- Calculate regional homogeneity over parcellation
|
- Calculate regional homogeneity over parcellation
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.ReHoSpheres`
|
* - :class:`.ReHoSpheres`
|
||||||
- Calculate regional homogeneity over spheres placed on coordinates
|
- Calculate regional homogeneity over spheres placed on coordinates
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.ALFFParcels`
|
* - :class:`.ALFFParcels`
|
||||||
- Calculate (f)ALFF and aggregate using parcellations
|
- Calculate (f)ALFF and aggregate using parcellations
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.ALFFSpheres`
|
* - :class:`.ALFFSpheres`
|
||||||
- Calculate (f)ALFF and aggregate using spheres placed on coordinates
|
- Calculate (f)ALFF and aggregate using spheres placed on coordinates
|
||||||
- Done
|
- Done
|
||||||
- 0.0.1
|
- 0.0.1
|
||||||
* - :class:`junifer.markers.EdgeCentricFCParcels`
|
* - :class:`.EdgeCentricFCParcels`
|
||||||
- Calculate edge-centric functional connectivity over parcellation, as found in
|
- Calculate edge-centric functional connectivity over parcellation, as found in
|
||||||
`Jo et al. (2021) <https://doi.org/10.1016/j.neuroimage.2021.118204>`_
|
`Jo et al. (2021) <https://doi.org/10.1016/j.neuroimage.2021.118204>`_
|
||||||
- Done
|
- Done
|
||||||
- 0.0.2
|
- 0.0.2
|
||||||
* - :class:`junifer.markers.EdgeCentricFCSpheres`
|
* - :class:`.EdgeCentricFCSpheres`
|
||||||
- Calculate edge-centric functional connectivity over spheres placed on coordinates,
|
- Calculate edge-centric functional connectivity over spheres placed on coordinates,
|
||||||
as found in `Jo et al. (2021) <https://doi.org/10.1016/j.neuroimage.2021.118204>`_
|
as found in `Jo et al. (2021) <https://doi.org/10.1016/j.neuroimage.2021.118204>`_
|
||||||
- Done
|
- Done
|
||||||
- 0.0.2
|
- 0.0.2
|
||||||
* - :class:`junifer.markers.TemporalSNRParcels`
|
* - :class:`.TemporalSNRParcels`
|
||||||
- Calculate temporal signal-to-noise ratio using parcellations
|
- Calculate temporal signal-to-noise ratio using parcellations
|
||||||
- Done
|
- Done
|
||||||
- 0.0.2
|
- 0.0.2
|
||||||
* - :class:`junifer.markers.TemporalSNRSpheres`
|
* - :class:`.TemporalSNRSpheres`
|
||||||
- Calculate temporal signal-to-noise ratio using spheres placed on coordinates
|
- Calculate temporal signal-to-noise ratio using spheres placed on coordinates
|
||||||
- Done
|
- Done
|
||||||
- 0.0.2
|
- 0.0.2
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Expose a :func:`junifer.data.parcellations.merge_parcellations` function to merge a list of parcellations by `Leonard Sasse`_
|
Expose a :func:`.merge_parcellations` function to merge a list of parcellations by `Leonard Sasse`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Add support for HDF5 feature storage via :class:`junifer.storage.HDF5FeatureStorage` by `Synchon Mandal`_
|
Add support for HDF5 feature storage via :class:`.HDF5FeatureStorage` by `Synchon Mandal`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Add ``confounds_format`` parameter to :class:`junifer.datagrabber.PatternDataGrabber` constructor for improved handling of confounds specified via ``BOLD_confounds`` data type by `Synchon Mandal`_
|
Add ``confounds_format`` parameter to :class:`.PatternDataGrabber` constructor for improved handling of confounds specified via ``BOLD_confounds`` data type by `Synchon Mandal`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Allow :class:`junifer.testing.datagrabbers.PartlyCloudyTestingDataGrabber` to be accessible via ``import junifer.testing.registry`` by `Synchon Mandal`_
|
Allow :class:`.PartlyCloudyTestingDataGrabber` to be accessible via ``import junifer.testing.registry`` by `Synchon Mandal`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Add :class:`junifer.markers.TemporalSNRParcels` and :class:`junifer.markers.TemporalSNRSpheres` by `Leonard Sasse`_
|
Add :class:`.TemporalSNRParcels` and :class:`.TemporalSNRSpheres` by `Leonard Sasse`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Fix :class:`junifer.markers.ALFFParcels`, :class:`junifer.markers.ALFFSpheres`, :class:`junifer.markers.ReHoSpheres` and :class:`junifer.markers.ReHoParcels` pass the ``extra_input`` parameter by `Fede Raimondo`_
|
Fix :class:`.ALFFParcels`, :class:`.ALFFSpheres`, :class:`.ReHoSpheres` and :class:`.ReHoParcels` pass the ``extra_input`` parameter by `Fede Raimondo`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Expose ``allow_overlap`` parameter in :class:`junifer.markers.SphereAggregation` and related markers by `Fede Raimondo`_
|
Expose ``allow_overlap`` parameter in :class:`.SphereAggregation` and related markers by `Fede Raimondo`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Allow for empty spheres in :class:`junifer.external.nilearn.JuniferNiftiSpheresMasker`, that will result in NaNs. Also, modify the behaviour of the ``collect`` parameter in HTCondor ``queue`` function to run a collect job even if some of the previous jobs fail. This is useful to collect the results of a pipeline even if some of the jobs fail by `Fede Raimondo`_
|
Allow for empty spheres in :class:`.JuniferNiftiSpheresMasker`, that will result in NaNs. Also, modify the behaviour of the ``collect`` parameter in HTCondor ``queue`` function to run a collect job even if some of the previous jobs fail. This is useful to collect the results of a pipeline even if some of the jobs fail by `Fede Raimondo`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Add aggregation function :func:`junifer.stats.count` that returns the number of elements in a given axis. This allows to count the number of voxels per sphere/parcel when used as ``method`` in markers by `Fede Raimondo`_
|
Add aggregation function :func:`.count` that returns the number of elements in a given axis. This allows to count the number of voxels per sphere/parcel when used as ``method`` in markers by `Fede Raimondo`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Fix a bug in which :class:`junifer.markers.ParcelAggregation` could yield duplicated column names if two or more parcels were used and label names were not unique by `Fede Raimondo`_
|
Fix a bug in which :class:`.ParcelAggregation` could yield duplicated column names if two or more parcels were used and label names were not unique by `Fede Raimondo`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Allow for empty parcels in :class:`junifer.markers.ParcelAggregation`, that will result in NaNs by `Fede Raimondo`_
|
Allow for empty parcels in :class:`.ParcelAggregation`, that will result in NaNs by `Fede Raimondo`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Fix a bug in which :func:`junifer.stats.count` will not be correctly applied across an axis by `Fede Raimondo`_
|
Fix a bug in which :func:`.count` will not be correctly applied across an axis by `Fede Raimondo`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Improve metadata and data I/O for :class:`junifer.storage.HDF5FeatureStorage` by `Synchon Mandal`_
|
Improve metadata and data I/O for :class:`.HDF5FeatureStorage` by `Synchon Mandal`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Fix a bug in which :func:`junifer.data.masks.get_mask` fails for FunctionalConnectivityBase class, because of missing extra_input parameter by `Leonard Sasse`_
|
Fix a bug in which :func:`.get_mask` fails for FunctionalConnectivityBase class, because of missing extra_input parameter by `Leonard Sasse`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Add missing ``abstractmethod`` decorators for ``get_valid_inputs`` methods of :class:`junifer.markers.BaseMarker` and :class:`junifer.preprocess.BasePreprocessor` by `Synchon Mandal`_
|
Add missing ``abstractmethod`` decorators for ``get_valid_inputs`` methods of :class:`.BaseMarker` and :class:`.BasePreprocessor` by `Synchon Mandal`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Fix the output of :class:`junifer.markers.RSSETSMarker` to be 2D by `Synchon Mandal`_
|
Fix the output of :class:`.RSSETSMarker` to be 2D by `Synchon Mandal`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
``AmplitudeLowFrequencyFluctuationParcels`` and ``AmplitudeLowFrequencyFluctuationSpheres`` are renamed to :class:`junifer.markers.ALFFParcels` and :class:`junifer.markers.ALFFSpheres` by `Synchon Mandal`_
|
Rename ``AmplitudeLowFrequencyFluctuationParcels`` and ``AmplitudeLowFrequencyFluctuationSpheres`` to :class:`.ALFFParcels` and :class:`.ALFFSpheres` by `Synchon Mandal`_
|
||||||
1
docs/changes/newsfragments/218.doc
Normal file
1
docs/changes/newsfragments/218.doc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Shorten Sphinx references across code and docs, and add ``black`` shield in README by `Synchon Mandal`_
|
||||||
|
|
@ -1 +1 @@
|
||||||
Add :class:`junifer.markers.EdgeCentricFCParcels` and :class:`junifer.markers.EdgeCentricFCSpheres` by `Leonard Sasse`_
|
Add :class:`.EdgeCentricFCParcels` and :class:`.EdgeCentricFCSpheres` by `Leonard Sasse`_
|
||||||
|
|
@ -6,11 +6,9 @@ Adding Coordinates
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Instead of using whole-brain parcellations to aggregate voxel-wise signals from
|
Instead of using whole-brain parcellations to aggregate voxel-wise signals from
|
||||||
MR images (as for example in the
|
MR images (as for example in the :class:`.ParcelAggregation` marker), Junifer
|
||||||
:class:`junifer.markers.parcel_aggregation.ParcelAggregation` marker), Junifer
|
|
||||||
allows you to specify a set of coordinates around which to draw spheres to
|
allows you to specify a set of coordinates around which to draw spheres to
|
||||||
aggregate (for example using the
|
aggregate (for example using the :class:`.SphereAggregation` marker) the MR
|
||||||
:class:`junifer.markers.sphere_aggregation.SphereAggregation` marker) the MR
|
|
||||||
signals from individual voxels. Now, before you start specifying your own sets
|
signals from individual voxels. Now, before you start specifying your own sets
|
||||||
of coordinates, check the coordinates that Junifer already has
|
of coordinates, check the coordinates that Junifer already has
|
||||||
:ref:`built in <builtin>`. If you simply want to use a well known set of
|
:ref:`built in <builtin>`. If you simply want to use a well known set of
|
||||||
|
|
@ -19,9 +17,8 @@ provides them already.
|
||||||
|
|
||||||
If you checked the in-built coordinates, and they are not there already (for
|
If you checked the in-built coordinates, and they are not there already (for
|
||||||
example if you came up with your own set of coordinates), then Junifer provides
|
example if you came up with your own set of coordinates), then Junifer provides
|
||||||
an easy way for you to register them using the
|
an easy way for you to register them using the :func:`.register_coordinates`
|
||||||
:func:`junifer.data.coordinates.register_coordinates` function, so you can use
|
function, so you can use your own set of coordinates within a Junifer pipeline.
|
||||||
your own set of coordinates within a Junifer pipeline.
|
|
||||||
|
|
||||||
From the API reference, we can see that it has 3 positional arguments
|
From the API reference, we can see that it has 3 positional arguments
|
||||||
(``name``, ``coordinates``, and ``voi_names``) as well as one
|
(``name``, ``coordinates``, and ``voi_names``) as well as one
|
||||||
|
|
@ -30,10 +27,9 @@ optional keyword argument (``overwrite``).
|
||||||
The ``name`` argument takes a string indicating the name you want to give to
|
The ``name`` argument takes a string indicating the name you want to give to
|
||||||
this set of coordinates. This ``name`` can be used to obtain and operate on a
|
this set of coordinates. This ``name`` can be used to obtain and operate on a
|
||||||
set of coordinates in Junifer. For example, you can obtain your coordinates
|
set of coordinates in Junifer. For example, you can obtain your coordinates
|
||||||
after registration by providing ``name`` to
|
after registration by providing ``name`` to :func:`.load_coordinates`. We could
|
||||||
:func:`junifer.data.coordinates.load_coordinates`. We could simply call it
|
simply call it ``"my_set_of_coordinates"``, but likely you want a more
|
||||||
``"my_set_of_coordinates"``, but likely you want a more descriptive and more
|
descriptive and more informative name most of the time.
|
||||||
informative name most of the time.
|
|
||||||
|
|
||||||
The ``coordinates`` argument takes the actual coordinates as a 2-dimensional
|
The ``coordinates`` argument takes the actual coordinates as a 2-dimensional
|
||||||
:class:`numpy.ndarray`. It contains one row for every location, and three
|
:class:`numpy.ndarray`. It contains one row for every location, and three
|
||||||
|
|
@ -116,8 +112,7 @@ you can use the ``with`` keyword provided by Junifer:
|
||||||
Afterwards continue configuring the rest of your pipeline in this YAML file,
|
Afterwards continue configuring the rest of your pipeline in this YAML file,
|
||||||
and you will be able to use this set of coordinates using the name you gave it
|
and you will be able to use this set of coordinates using the name you gave it
|
||||||
during registration (in our example "DMNCustom"). We can add a
|
during registration (in our example "DMNCustom"). We can add a
|
||||||
:class:`junifer.markers.sphere_aggregation.SphereAggregation` to demonstrate
|
:class:`.SphereAggregation` to demonstrate how this can be done:
|
||||||
how this can be done:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ the structure of a dataset and provide two specific functionalities:
|
||||||
2) Provide the list of *elements* available in the dataset.
|
2) Provide the list of *elements* available in the dataset.
|
||||||
|
|
||||||
In this section, we will see how to create a datagrabber for a dataset. Basic
|
In this section, we will see how to create a datagrabber for a dataset. Basic
|
||||||
aspects of datagrabbers are covered in the
|
aspects of datagrabbers are covered in the
|
||||||
:ref:`Understanding Data Grabbers <datagrabber>` section.
|
:ref:`Understanding Data Grabbers <datagrabber>` section.
|
||||||
|
|
||||||
.. _extending_datagrabbers_think:
|
.. _extending_datagrabbers_think:
|
||||||
|
|
@ -29,7 +29,7 @@ only one of each *data type* (see :ref:`data_types`).
|
||||||
|
|
||||||
For example, if we have a dataset from an fMRI study in which:
|
For example, if we have a dataset from an fMRI study in which:
|
||||||
|
|
||||||
a) both T1w and fMRI was acquired
|
a) both T1w and fMRI was acquired
|
||||||
b) 20 subjects went through an experiment twice
|
b) 20 subjects went through an experiment twice
|
||||||
c) the experiment included resting-stage fMRI and a task named *stroop*
|
c) the experiment included resting-stage fMRI and a task named *stroop*
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ Junifer provides an abstract class to deal with datasets that can be thought in
|
||||||
terms of *patterns*. A *pattern* is a string that contains placeholders that are
|
terms of *patterns*. A *pattern* is a string that contains placeholders that are
|
||||||
replaced by the actual values of the element. In our BIDS example, the path
|
replaced by the actual values of the element. In our BIDS example, the path
|
||||||
to the T1w image of subject `sub-01` and session `ses-01`, relative to the
|
to the T1w image of subject `sub-01` and session `ses-01`, relative to the
|
||||||
dataset location, is ``sub-01/ses-01/anat/sub-01_ses-01_T1w.nii.gz``. By
|
dataset location, is ``sub-01/ses-01/anat/sub-01_ses-01_T1w.nii.gz``. By
|
||||||
replacing ``sub-01`` with ``sub-02``, we can obtain the T1w image of the first
|
replacing ``sub-01`` with ``sub-02``, we can obtain the T1w image of the first
|
||||||
session of the second subject. Indeed, the path to the T1w images can be
|
session of the second subject. Indeed, the path to the T1w images can be
|
||||||
expressed as a pattern:
|
expressed as a pattern:
|
||||||
|
|
@ -105,7 +105,7 @@ in it.
|
||||||
|
|
||||||
Before creating the datagrabber, we need to define 3 variables:
|
Before creating the datagrabber, we need to define 3 variables:
|
||||||
|
|
||||||
* ``types``: A list with the available :ref:`data_types` in our dataset
|
* ``types``: A list with the available :ref:`data_types` in our dataset
|
||||||
* ``patterns``: A dictionary that specifies the pattern for each data type.
|
* ``patterns``: A dictionary that specifies the pattern for each data type.
|
||||||
* ``replacements``: A list indicating which of the elements in the patterns
|
* ``replacements``: A list indicating which of the elements in the patterns
|
||||||
should be replaced by the values of the element.
|
should be replaced by the values of the element.
|
||||||
|
|
@ -125,7 +125,7 @@ An additional fourth variable is the ``datadir``, which should be the path to
|
||||||
where the dataset is located. For example, if the dataset is located in
|
where the dataset is located. For example, if the dataset is located in
|
||||||
``/data/project/test/data``, then ``datadir`` should be
|
``/data/project/test/data``, then ``datadir`` should be
|
||||||
``/data/project/test/data``. Or, if we want to allow the user to specify the
|
``/data/project/test/data``. Or, if we want to allow the user to specify the
|
||||||
location of the dataset, we can expose the variable in the constructor, as in
|
location of the dataset, we can expose the variable in the constructor, as in
|
||||||
this example
|
this example
|
||||||
|
|
||||||
With this defined, we can now create our datagrabber, we will name it
|
With this defined, we can now create our datagrabber, we will name it
|
||||||
|
|
@ -147,7 +147,7 @@ With this defined, we can now create our datagrabber, we will name it
|
||||||
replacements = ["subject", "session"]
|
replacements = ["subject", "session"]
|
||||||
super().__init__(
|
super().__init__(
|
||||||
datadir=datadir,
|
datadir=datadir,
|
||||||
types=types,
|
types=types,
|
||||||
patterns=patterns,
|
patterns=patterns,
|
||||||
replacements=replacements,
|
replacements=replacements,
|
||||||
)
|
)
|
||||||
|
|
@ -175,7 +175,7 @@ use the :py:func:`~junifer.api.decorators.register_datagrabber` decorator.
|
||||||
replacements = ["subject", "session"]
|
replacements = ["subject", "session"]
|
||||||
super().__init__(
|
super().__init__(
|
||||||
datadir=datadir,
|
datadir=datadir,
|
||||||
types=types,
|
types=types,
|
||||||
patterns=patterns,
|
patterns=patterns,
|
||||||
replacements=replacements,
|
replacements=replacements,
|
||||||
)
|
)
|
||||||
|
|
@ -186,29 +186,28 @@ in the yaml file to ``ExampleBIDSDataGrabber``. Remember that we still need to
|
||||||
set the ``datadir``.
|
set the ``datadir``.
|
||||||
|
This is on purpose for educational purposes? This is on purpose for educational purposes?
What do you mean? What do you mean?
it has the full reference: it has the full reference: ``~junifer.datagrabber.PatternDataladDataGrabber``
Yeah missed that, good catch, thanks! Yeah missed that, good catch, thanks!
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
datagrabber:
|
datagrabber:
|
||||||
kind: ExampleBIDSDataGrabber
|
kind: ExampleBIDSDataGrabber
|
||||||
datadir: /data/project/test/data
|
datadir: /data/project/test/data
|
||||||
|
|
||||||
|
|
||||||
Optional: Using datalad
|
Optional: Using datalad
|
||||||
"""""""""""""""""""""""
|
"""""""""""""""""""""""
|
||||||
|
|
||||||
If you are using `datalad`_, you can use the
|
If you are using `datalad`_, you can use the :class:`.PatternDataladDataGrabber`
|
||||||
:py:class:`~junifer.datagrabber.PatternDataladDataGrabber` instead of the
|
instead of the :class:`.PatternDataGrabber`. This class will not only
|
||||||
:py:class:`~junifer.datagrabber.PatternDataGrabber`. This class will not only
|
|
||||||
interpret patterns, but also use `datalad`_ to `clone` and `get` the data.
|
interpret patterns, but also use `datalad`_ to `clone` and `get` the data.
|
||||||
|
|
||||||
The main difference between the two is that the ``datadir`` is not the actual
|
The main difference between the two is that the ``datadir`` is not the actual
|
||||||
location of the dataset, but the location where the dataset will be cloned. It
|
location of the dataset, but the location where the dataset will be cloned. It
|
||||||
can now be ``None``, which means that the data will be downloaded to a
|
can now be ``None``, which means that the data will be downloaded to a
|
||||||
temporary directory. To set the location of the dataset, you can use the
|
temporary directory. To set the location of the dataset, you can use the
|
||||||
``uri`` argument in the constructor. Additionally, a ``rootdir`` argument can
|
``uri`` argument in the constructor. Additionally, a ``rootdir`` argument can
|
||||||
be used to specify the path to the root directory of the dataset after doing
|
be used to specify the path to the root directory of the dataset after doing
|
||||||
``datalad clone``.
|
``datalad clone``.
|
||||||
|
|
||||||
In the example, the dataset is hosted in gin
|
In the example, the dataset is hosted in gin
|
||||||
(``https://gin.g-node.org/juaml/datalad-example-bids``).
|
(``https://gin.g-node.org/juaml/datalad-example-bids``).
|
||||||
|
|
||||||
When we clone this dataset, we will see the following structure:
|
When we clone this dataset, we will see the following structure:
|
||||||
|
|
@ -262,7 +261,7 @@ And we can create our datagrabber:
|
||||||
datadir=None,
|
datadir=None,
|
||||||
uri=uri,
|
uri=uri,
|
||||||
rootdir=rootdir,
|
rootdir=rootdir,
|
||||||
types=types,
|
types=types,
|
||||||
patterns=patterns,
|
patterns=patterns,
|
||||||
replacements=replacements,
|
replacements=replacements,
|
||||||
)
|
)
|
||||||
|
|
@ -287,7 +286,7 @@ implement the following methods:
|
||||||
The ``__init__`` method could also be implemented, but it is not mandatory. This is required if the datagrabber
|
The ``__init__`` method could also be implemented, but it is not mandatory. This is required if the datagrabber
|
||||||
requires any parameter.
|
requires any parameter.
|
||||||
|
|
||||||
We will now implement our BIDS example with this method.
|
We will now implement our BIDS example with this method.
|
||||||
|
|
||||||
The first method, ``get_item``, needs to obtain a single
|
The first method, ``get_item``, needs to obtain a single
|
||||||
item from the dataset. Since this dataset requires two variables, ``subject`` and ``session``, we will use them
|
item from the dataset. Since this dataset requires two variables, ``subject`` and ``session``, we will use them
|
||||||
|
|
@ -366,11 +365,12 @@ So, to summarize, our datagrabber will look like this:
|
||||||
def get_element_keys(self):
|
def get_element_keys(self):
|
||||||
return ["subject", "session"]
|
return ["subject", "session"]
|
||||||
|
|
||||||
Optional: Using datalad
|
Optional: Using datalad
|
||||||
"""""""""""""""""""""""
|
"""""""""""""""""""""""
|
||||||
|
|
||||||
If this dataset is in a datalad dataset, we can extend from :class:`junifer.datagrabber.DataladDataGrabber` instead of
|
If this dataset is in a datalad dataset, we can extend from
|
||||||
:class:`junifer.datagrabber.BaseDataGrabber`. This will allow us to use the datalad API to obtain the data.
|
:class:`.DataladDataGrabber` instead of :class:`.BaseDataGrabber`. This will
|
||||||
|
allow us to use the datalad API to obtain the data.
|
||||||
|
|
||||||
|
|
||||||
Step 4: Optional: Adding *BOLD confounds*
|
Step 4: Optional: Adding *BOLD confounds*
|
||||||
|
|
@ -385,7 +385,7 @@ Thus, the ``BOLD_confounds`` element is a dictionary with the following keys:
|
||||||
- ``format``: the format of the confounds file. Currently, this can be either ``fmriprep`` or ``adhoc``.
|
- ``format``: the format of the confounds file. Currently, this can be either ``fmriprep`` or ``adhoc``.
|
||||||
|
|
||||||
The ``fmriprep`` format corresponds to the format of the confounds files generated by `fMRIPrep`_. The
|
The ``fmriprep`` format corresponds to the format of the confounds files generated by `fMRIPrep`_. The
|
||||||
``adhoc`` format corresponds to a format that is not standardized.
|
``adhoc`` format corresponds to a format that is not standardized.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The ``mappings`` key is only required if the ``format`` is ``adhoc``. If the ``format`` is ``fmriprep``, the
|
The ``mappings`` key is only required if the ``format`` is ``adhoc``. If the ``format`` is ``fmriprep``, the
|
||||||
|
|
@ -393,9 +393,9 @@ The ``fmriprep`` format corresponds to the format of the confounds files generat
|
||||||
|
|
||||||
|
|
||||||
Currently, Junifer provides only one confound remover step
|
Currently, Junifer provides only one confound remover step
|
||||||
(:class:`junifer.preprocess.fMRIPrepConfoundRemover`), which relies entirely on the ``fmriprep`` confound
|
(:class:`.fMRIPrepConfoundRemover`), which relies entirely on the ``fmriprep`` confound
|
||||||
variable names. Thus, if the confounds are not in ``fmriprep`` format, the user will need to provide the mappings
|
variable names. Thus, if the confounds are not in ``fmriprep`` format, the user will need to provide the mappings
|
||||||
between the *ad-hoc* variable names and the ``fmriprep`` variable names.
|
between the *ad-hoc* variable names and the ``fmriprep`` variable names.
|
||||||
This is done by specifying the ``adhoc`` format and providing the mappings as a dictionary in the ``mappings`` key.
|
This is done by specifying the ``adhoc`` format and providing the mappings as a dictionary in the ``mappings`` key.
|
||||||
|
|
||||||
In the following example, the confounds file has 3 variables that are not in the ``fmriprep`` format. Thus, we will
|
In the following example, the confounds file has 3 variables that are not in the ``fmriprep`` format. Thus, we will
|
||||||
|
|
@ -418,7 +418,6 @@ provide the mappings for these variables to the ``fmriprep`` format.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Not all of the mappings need to be provided. For the moment, this is used only by the
|
Not all of the mappings need to be provided. For the moment, this is used only by the
|
||||||
:class:`junifer.preprocess.fMRIPrepConfoundRemover` step, which requires variables based on the
|
:class:`.fMRIPrepConfoundRemover` step, which requires variables based on the
|
||||||
strategy selected. However, it is recommended to provide all the mappings, as this will allow the user to
|
strategy selected. However, it is recommended to provide all the mappings, as this will allow the user to
|
||||||
choose different strategies with the same dataset.
|
choose different strategies with the same dataset.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@ Computing a marker (a.k.a. *feature*) is the main goal of junifer. While we aim
|
||||||
it might be the case that the marker you are looking for is not available. In this case, you can create your own marker
|
it might be the case that the marker you are looking for is not available. In this case, you can create your own marker
|
||||||
by following this tutorial.
|
by following this tutorial.
|
||||||
|
|
||||||
Most of the functionality of a junifer marker has been taken care by the :class:`junifer.markers.BaseMarker` class.
|
Most of the functionality of a junifer marker has been taken care by the :class:`.BaseMarker` class.
|
||||||
Thus, only a few methods are required:
|
Thus, only a few methods are required:
|
||||||
|
|
||||||
1. ``get_valid_inputs``: a method to obtain the list of valid inputs for the marker. This is used to check that the
|
1. ``get_valid_inputs``: a method to obtain the list of valid inputs for the marker. This is used to check that the
|
||||||
inputs provided by the user are valid. This method should return a list of strings, representing
|
inputs provided by the user are valid. This method should return a list of strings, representing
|
||||||
:ref:`data types <data_types>`
|
:ref:`data types <data_types>`
|
||||||
2. ``get_output_type``: a method to obtain the kind of output of the marker. This is used to check that the output
|
2. ``get_output_type``: a method to obtain the kind of output of the marker. This is used to check that the output
|
||||||
of the marker is compatible with the storage. This method should return a string, representing
|
of the marker is compatible with the storage. This method should return a string, representing
|
||||||
:ref:`storage types <storage_types>`
|
:ref:`storage types <storage_types>`
|
||||||
3. ``compute``: the method that given the data, computes the marker.
|
3. ``compute``: the method that given the data, computes the marker.
|
||||||
4. ``__init__``: the initialization method, where the marker is configured.
|
4. ``__init__``: the initialization method, where the marker is configured.
|
||||||
|
|
@ -57,7 +57,7 @@ Step 2: Initialize the marker
|
||||||
In this step we need to define the parameters of the marker. That is, all the parameters that the user can provide
|
In this step we need to define the parameters of the marker. That is, all the parameters that the user can provide
|
||||||
to configure how the marker will behave.
|
to configure how the marker will behave.
|
||||||
|
|
||||||
The parameters of the marker are defined in the ``__init__`` method. The :class:`junifer.markers.BaseMarker` class
|
The parameters of the marker are defined in the ``__init__`` method. The :class:`.BaseMarker` class
|
||||||
requires two optional parameters:
|
requires two optional parameters:
|
||||||
|
|
||||||
1. ``name``: the name of the marker. This is used to identify the marker in the configuration file.
|
1. ``name``: the name of the marker. This is used to identify the marker in the configuration file.
|
||||||
|
|
@ -71,13 +71,13 @@ In this example, the is only paramater required for the computation is the name
|
||||||
define the ``__init__`` method as follows:
|
define the ``__init__`` method as follows:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def __init__(self, parcellation_name, on=None, name=None):
|
def __init__(self, parcellation_name, on=None, name=None):
|
||||||
self.parcellation_name = parcellation_name
|
self.parcellation_name = parcellation_name
|
||||||
super().__init__(on=on, name=name)
|
super().__init__(on=on, name=name)
|
||||||
|
|
||||||
.. caution:: Parameters of the marker must be stored as object attributes without using ``_`` as prefix. This is
|
.. caution:: Parameters of the marker must be stored as object attributes without using ``_`` as prefix. This is
|
||||||
because any attribute that starts with ``_`` will not be considered as a parameter and not stored as
|
because any attribute that starts with ``_`` will not be considered as a parameter and not stored as
|
||||||
part of the metadata of the marker.
|
part of the metadata of the marker.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -89,7 +89,7 @@ Step 3: Compute the marker
|
||||||
In this step, we will define the method that computes the marker. This method will be called by junifer when needed,
|
In this step, we will define the method that computes the marker. This method will be called by junifer when needed,
|
||||||
using the data provided by the datagrabber, as configured by the user. The function ``compute`` has two arguments:
|
using the data provided by the datagrabber, as configured by the user. The function ``compute`` has two arguments:
|
||||||
|
|
||||||
* ``input``: a dictionary with the data to be used to compute the marker. This will be the corresponding element in the
|
* ``input``: a dictionary with the data to be used to compute the marker. This will be the corresponding element in the
|
||||||
:ref:`Data Object<data_object>` alredy indexing. Thus, the dictionary has at least two keys: ``data`` and ``path``.
|
:ref:`Data Object<data_object>` alredy indexing. Thus, the dictionary has at least two keys: ``data`` and ``path``.
|
||||||
The first one contains the data, while the second one contains the path to the data. The dictionary can also contain
|
The first one contains the data, while the second one contains the path to the data. The dictionary can also contain
|
||||||
other keys, depending on the data type.
|
other keys, depending on the data type.
|
||||||
|
|
@ -176,7 +176,7 @@ Finally, we need to register the marker using the ``@register_marker`` decorator
|
||||||
def __init__(self, parcellation_name, on=None, name=None):
|
def __init__(self, parcellation_name, on=None, name=None):
|
||||||
self.parcellation_name = parcellation_name
|
self.parcellation_name = parcellation_name
|
||||||
super().__init__(on=on, name=name)
|
super().__init__(on=on, name=name)
|
||||||
|
|
||||||
def get_valid_inputs(self):
|
def get_valid_inputs(self):
|
||||||
return ['BOLD', 'VBM_WM', 'VBM_GM']
|
return ['BOLD', 'VBM_WM', 'VBM_GM']
|
||||||
|
|
||||||
|
|
@ -235,7 +235,7 @@ Template for a custom Marker
|
||||||
def __init__(self, on=None, name=None):
|
def __init__(self, on=None, name=None):
|
||||||
# TODO: add marker-specific parameters
|
# TODO: add marker-specific parameters
|
||||||
super().__init__(on=on, name=name)
|
super().__init__(on=on, name=name)
|
||||||
|
|
||||||
def get_valid_inputs(self):
|
def get_valid_inputs(self):
|
||||||
# TODO: Complete with the valid inputs
|
# TODO: Complete with the valid inputs
|
||||||
valid = []
|
valid = []
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,16 @@ suit your needs, and you have found that they don't, you can come back here to
|
||||||
learn how to use your own masks.
|
learn how to use your own masks.
|
||||||
|
|
||||||
The principle is fairly simple and quite similar to :ref:`adding_parcellations`
|
The principle is fairly simple and quite similar to :ref:`adding_parcellations`
|
||||||
and :ref:`adding_coordinates`. Junifer provides a
|
and :ref:`adding_coordinates`. Junifer provides a :func:`.register_mask`
|
||||||
:func:`junifer.data.masks.register_mask` function that lets you register your
|
function that lets you register your own custom masks. It consists of two
|
||||||
own custom masks. It consists of two positional arguments (``name`` and
|
positional arguments (``name`` and ``mask_path``) and one optional keyword
|
||||||
``mask_path``) and one optional keyword argument (``overwrite``).
|
argument (``overwrite``).
|
||||||
|
|
||||||
The ``name`` argument is a string indicating the name of the mask. This name
|
The ``name`` argument is a string indicating the name of the mask. This name
|
||||||
is used to refer to that mask in Junifer internally in order to obtain the
|
is used to refer to that mask in Junifer internally in order to obtain the
|
||||||
actual mask data and perform operations on it. For example, using the name you
|
actual mask data and perform operations on it. For example, using the name you
|
||||||
can load a mask after registration using the
|
can load a mask after registration using the
|
||||||
:func:`junifer.data.masks.load_mask` function.
|
:func:`.load_mask` function.
|
||||||
|
|
||||||
The ``mask_path`` should contain the path to a valid NIfTI image with binary
|
The ``mask_path`` should contain the path to a valid NIfTI image with binary
|
||||||
voxel values (i.e. 0 or 1). This data can then be used by Junifer to mask other
|
voxel values (i.e. 0 or 1). This data can then be used by Junifer to mask other
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ markers to assess and validate your own parcellation. So, how can you do this?
|
||||||
|
|
||||||
Since both of these use-cases are quite common, and not being able to use your
|
Since both of these use-cases are quite common, and not being able to use your
|
||||||
favourite parcellation is of course quite a buzzkill, Junifer actually provides
|
favourite parcellation is of course quite a buzzkill, Junifer actually provides
|
||||||
the easy-to-use :func:`junifer.data.parcellations.register_parcellation`
|
the easy-to-use :func:`.register_parcellation` function to do just that. Let's
|
||||||
function to do just that. Let's try to understand the API reference
|
try to understand the API reference and then use this function to register our
|
||||||
and then use this function to register our own parcellation.
|
own parcellation.
|
||||||
|
|
||||||
From the API reference, we can see that it has 3 positional arguments
|
From the API reference, we can see that it has 3 positional arguments
|
||||||
(``name``, ``parcellation_path``, and ``parcels_labels``) as well as one
|
(``name``, ``parcellation_path``, and ``parcels_labels``) as well as one
|
||||||
|
|
@ -101,8 +101,7 @@ file, we can save the above code in a python file, say
|
||||||
Afterwards continue configuring the rest of the pipeline in this YAML file, and
|
Afterwards continue configuring the rest of the pipeline in this YAML file, and
|
||||||
you will be able to use this parcellation using the name you gave the
|
you will be able to use this parcellation using the name you gave the
|
||||||
parcellation when registering it. For example, we can add a
|
parcellation when registering it. For example, we can add a
|
||||||
:class:`junifer.markers.parcel_aggregation.ParcelAggregation` marker to
|
:class:`.ParcelAggregation` marker to demonstrate how this can be done:
|
||||||
demonstrate how this can be done:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ The following steps are specific to VSCode and you can choose to go with it:
|
||||||
|
|
||||||
2. We recommend using ``conda`` to create your virtual environment
|
2. We recommend using ``conda`` to create your virtual environment
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: bash
|
||||||
|
|
||||||
conda env create -n <your-environment-name> -f conda-env.yml python=3.9
|
conda env create -n <your-environment-name> -f conda-env.yml python=3.9
|
||||||
conda activate <your-environment-name>
|
conda activate <your-environment-name>
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,13 @@ junifer is compatible with `Python`_ >= 3.8 and requires the following packages:
|
||||||
|
|
||||||
* ``click>=8.1.3,<8.2``
|
* ``click>=8.1.3,<8.2``
|
||||||
* ``numpy>=1.22,<1.24``
|
* ``numpy>=1.22,<1.24``
|
||||||
* ``datalad>=0.15.4,<0.18``
|
* ``datalad>=0.15.4,<0.19``
|
||||||
* ``pandas>=1.4.0,<1.6``
|
* ``pandas>=1.4.0,<1.6``
|
||||||
* ``nibabel>=3.2.0,<4.1``
|
* ``nibabel>=3.2.0,<4.1``
|
||||||
* ``nilearn>=0.9.0,<1.0``
|
* ``nilearn>=0.9.0,<=0.10.0``
|
||||||
* ``sqlalchemy>=1.4.27,<= 1.5.0``
|
* ``sqlalchemy>=1.4.27,<= 1.5.0``
|
||||||
* ``pyyaml>=5.1.2,<7.0``
|
* ``pyyaml>=5.1.2,<7.0``
|
||||||
|
* ``h5py>=3.8.0,<3.9``
|
||||||
|
|
||||||
Depending on the installation method, these packages might be installed automatically.
|
Depending on the installation method, these packages might be installed automatically.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ Datagrabbers are intended to be used as context managers. When used within a con
|
||||||
of any pre and post steps for interacting with the dataset, for example, downloading and cleaning up. As the interface
|
of any pre and post steps for interacting with the dataset, for example, downloading and cleaning up. As the interface
|
||||||
is consistent, you always use the same procedure to interact with the datagrabber.
|
is consistent, you always use the same procedure to interact with the datagrabber.
|
||||||
|
|
||||||
For example, a concrete implementation of :class:`junifer.datagrabber.DataladDataGrabber` can provide junifer
|
For example, a concrete implementation of :class:`.DataladDataGrabber` can provide junifer
|
||||||
with data from a Datalad dataset. Of course, datagrabbers are not only meant to work with Datalad datasets but
|
with data from a Datalad dataset. Of course, datagrabbers are not only meant to work with Datalad datasets but
|
||||||
any dataset.
|
any dataset.
|
||||||
|
|
||||||
|
|
@ -36,19 +36,19 @@ In this section, we showcase different abstract base classes you might want to u
|
||||||
|
|
||||||
* - Name
|
* - Name
|
||||||
- Description
|
- Description
|
||||||
* - :class:`junifer.datagrabber.BaseDataGrabber`
|
* - :class:`.BaseDataGrabber`
|
||||||
- | The abstract base class providing you an interface to implement your own datagrabber.
|
- | The abstract base class providing you an interface to implement your own datagrabber.
|
||||||
| You should try to avoid using this directly and instead use
|
| You should try to avoid using this directly and instead use
|
||||||
| :class:`junifer.datagrabber.PatternDataGrabber` or :class:`junifer.datagrabber.DataladDataGrabber`.
|
| :class:`.PatternDataGrabber` or :class:`.DataladDataGrabber`.
|
||||||
| To build your own custom *low-level* datagrabber, you need to at least implement the ``get_elements`` method,
|
| To build your own custom *low-level* datagrabber, you need to at least implement the ``get_elements`` method,
|
||||||
| but most of the time you should also override other existing methods like ``__enter__`` and ``__exit__``.
|
| but most of the time you should also override other existing methods like ``__enter__`` and ``__exit__``.
|
||||||
* - :class:`junifer.datagrabber.PatternDataGrabber`
|
* - :class:`.PatternDataGrabber`
|
||||||
- | It implements functionality to help you define the pattern of the dataset you want to get. For example,
|
- | It implements functionality to help you define the pattern of the dataset you want to get. For example,
|
||||||
| you know that T1 images are found in a directory following this pattern ``{subject}/anat/{subject}_T1w.nii.gz``
|
| you know that T1 images are found in a directory following this pattern ``{subject}/anat/{subject}_T1w.nii.gz``
|
||||||
| inside of the dataset. Now you can provide this to the **PatternDataGrabber** and it will be able to get the file.
|
| inside of the dataset. Now you can provide this to the **PatternDataGrabber** and it will be able to get the file.
|
||||||
* - :class:`junifer.datagrabber.DataladDataGrabber`
|
* - :class:`.DataladDataGrabber`
|
||||||
- | It implements functionality to deal with Datalad datasets. Specifically, the ``__enter__`` and ``__exit__`` methods
|
- | It implements functionality to deal with Datalad datasets. Specifically, the ``__enter__`` and ``__exit__`` methods
|
||||||
| take care of cloning and removing the Datalad dataset.
|
| take care of cloning and removing the Datalad dataset.
|
||||||
* - :class:`junifer.datagrabber.PatternDataladDataGrabber`
|
* - :class:`.PatternDataladDataGrabber`
|
||||||
- | It is a combination of :class:`junifer.datagrabber.PatternDataladDataGrabber` and
|
- | It is a combination of :class:`.PatternDataladDataGrabber` and
|
||||||
| :class:`junifer.datagrabber.DataladDataGrabber`. This is probably the class you are looking for when using Datalad.
|
| :class:`.DataladDataGrabber`. This is probably the class you are looking for when using Datalad.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ For data formats not supported by junifer yet, you can either make your own *Dat
|
||||||
Currently supported file-formats
|
Currently supported file-formats
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
We already provide a concrete implementation :class:`junifer.datareader.DefaultDataReader` which knows how to
|
We already provide a concrete implementation :class:`.DefaultDataReader` which knows how to
|
||||||
read the following file formats:
|
read the following file formats:
|
||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
|
|
|
||||||
|
|
@ -19,5 +19,5 @@ Markers are meant to be used inside the datagrabber context but you can operate
|
||||||
as the actual data is in the memory and the Python runtime has not garbage-collected it.
|
as the actual data is in the memory and the Python runtime has not garbage-collected it.
|
||||||
|
|
||||||
If you are interested in using already provided markers, please go to :doc:`../builtin`. And, if you want to implement
|
If you are interested in using already provided markers, please go to :doc:`../builtin`. And, if you want to implement
|
||||||
your own marker, you need to provide concrete implementation of :class:`junifer.markers.BaseMarker`. Specifically, you
|
your own marker, you need to provide concrete implementation of :class:`.BaseMarker`. Specifically, you
|
||||||
need to override ``get_output_type``, ``store`` and ``compute`` methods.
|
need to override ``get_output_type``, ``store`` and ``compute`` methods.
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ The *Confound Removal* step is meant to remove *confounds* from the ``BOLD`` dat
|
||||||
extracted from the ``BOLD_confounds`` data (must be provided by the :ref:`Data Grabber <datagrabber>`).
|
extracted from the ``BOLD_confounds`` data (must be provided by the :ref:`Data Grabber <datagrabber>`).
|
||||||
The confounds are then regressed out from the ``BOLD`` data using :func:`nilearn.image.clean_img`.
|
The confounds are then regressed out from the ``BOLD`` data using :func:`nilearn.image.clean_img`.
|
||||||
|
|
||||||
Currently, junifer supports only one confound removal class:
|
Currently, junifer supports only one confound removal class:
|
||||||
:class:`junifer.preprocess.fMRIPrepConfoundRemover`. This class is meant to remove confounds as described
|
:class:`.fMRIPrepConfoundRemover`. This class is meant to remove confounds as described
|
||||||
before, using the output of `fMRIPrep`_ as reference.
|
before, using the output of `fMRIPrep`_ as reference.
|
||||||
|
|
||||||
Strategy
|
Strategy
|
||||||
|
|
@ -54,7 +54,7 @@ The *strategy* is defined as a dictionary, with the *noise components* as keys a
|
||||||
|
|
||||||
Example in python format:
|
Example in python format:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
strategy = {
|
strategy = {
|
||||||
"motion": "basic",
|
"motion": "basic",
|
||||||
|
|
@ -64,8 +64,8 @@ Example in python format:
|
||||||
|
|
||||||
or in YAML format:
|
or in YAML format:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
motion: basic
|
motion: basic
|
||||||
wm_csf: full
|
wm_csf: full
|
||||||
|
|
@ -73,7 +73,7 @@ or in YAML format:
|
||||||
|
|
||||||
The default value is to use all the *noise components* with the ``full`` *confounds*:
|
The default value is to use all the *noise components* with the ``full`` *confounds*:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
strategy = {
|
strategy = {
|
||||||
"motion": "full",
|
"motion": "full",
|
||||||
|
|
@ -84,7 +84,7 @@ The default value is to use all the *noise components* with the ``full`` *confou
|
||||||
Other parameters
|
Other parameters
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Additionaly, the :class:`junifer.preprocess.fMRIPrepConfoundRemover` supports the following parameters:
|
Additionaly, the :class:`.fMRIPrepConfoundRemover` supports the following parameters:
|
||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
:widths: 10, 30, 5
|
:widths: 10, 30, 5
|
||||||
|
|
@ -113,4 +113,4 @@ Additionaly, the :class:`junifer.preprocess.fMRIPrepConfoundRemover` supports th
|
||||||
- from nifti header
|
- from nifti header
|
||||||
* - ``mask``
|
* - ``mask``
|
||||||
- If provided, signal is only cleaned from voxels inside the mask. If not, a mask is computed using :func:`nilearn.masking.compute_brain_mask`.
|
- If provided, signal is only cleaned from voxels inside the mask. If not, a mask is computed using :func:`nilearn.masking.compute_brain_mask`.
|
||||||
- compute
|
- compute
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,12 @@ as the processed data is in the memory and the Python runtime has not garbage-co
|
||||||
|
|
||||||
The :ref:`Markers <marker>` are responsible for defining what *storage kind* (``matrix``, ``vector``, ``timeseries``)
|
The :ref:`Markers <marker>` are responsible for defining what *storage kind* (``matrix``, ``vector``, ``timeseries``)
|
||||||
they support for which :ref:`data type <data_types>` by overriding its ``store`` method. The storage object in turn
|
they support for which :ref:`data type <data_types>` by overriding its ``store`` method. The storage object in turn
|
||||||
declares and provides implementation for specific *storage kind*. For example, :class:`junifer.storage.SQLiteFeatureStorage`
|
declares and provides implementation for specific *storage kind*. For example, :class:`.SQLiteFeatureStorage`
|
||||||
supports saving ``matrix``, ``vector`` and ``timeseries`` via ``store_matrix``, ``store_vector`` and ``store_timeseries``
|
supports saving ``matrix``, ``vector`` and ``timeseries`` via ``store_matrix``, ``store_vector`` and ``store_timeseries``
|
||||||
methods respectively.
|
methods respectively.
|
||||||
|
|
||||||
For storage interfaces not supported by junifer yet, you can either make your own ``Storage`` by providing a concrete
|
For storage interfaces not supported by junifer yet, you can either make your own ``Storage`` by providing a concrete
|
||||||
implementation of :class:`junifer.storage.BaseFeatureStorage` or open an issue on `junifer Github`_ and we can help you out.
|
implementation of :class:`.BaseFeatureStorage` or open an issue on `junifer Github`_ and we can help you out.
|
||||||
|
|
||||||
|
|
||||||
.. _storage_types:
|
.. _storage_types:
|
||||||
|
|
@ -41,15 +41,15 @@ Currently supported storage types
|
||||||
* - ``matrix``
|
* - ``matrix``
|
||||||
- A 2D matrix with row and column names
|
- A 2D matrix with row and column names
|
||||||
- ``col_names``, ``row_names``, ``matrix_kind``, ``diagonal``
|
- ``col_names``, ``row_names``, ``matrix_kind``, ``diagonal``
|
||||||
- :meth:`junifer.storage.BaseFeatureStorage.store_matrix`
|
- :meth:`.BaseFeatureStorage.store_matrix`
|
||||||
* - ``vector``
|
* - ``vector``
|
||||||
- A vector of values with column names
|
- A vector of values with column names
|
||||||
- ``columns``, ``row_names``
|
- ``columns``, ``row_names``
|
||||||
- :meth:`junifer.storage.BaseFeatureStorage.store_vector`
|
- :meth:`.BaseFeatureStorage.store_vector`
|
||||||
* - ``timeseries``
|
* - ``timeseries``
|
||||||
- A 2D matrix of values with column names
|
- A 2D matrix of values with column names
|
||||||
- ``columns``, ``row_names``
|
- ``columns``, ``row_names``
|
||||||
- :meth:`junifer.storage.BaseFeatureStorage.store_timeseries`
|
- :meth:`.BaseFeatureStorage.store_timeseries`
|
||||||
|
|
||||||
.. _storage_interfaces:
|
.. _storage_interfaces:
|
||||||
|
|
||||||
|
|
@ -64,11 +64,11 @@ Currently supported storage interfaces
|
||||||
- File extension
|
- File extension
|
||||||
- File type
|
- File type
|
||||||
- Storage kinds
|
- Storage kinds
|
||||||
* - :class:`junifer.storage.SQLiteFeatureStorage`
|
* - :class:`.SQLiteFeatureStorage`
|
||||||
- ``.sqlite``
|
- ``.sqlite``
|
||||||
- SQLite
|
- SQLite
|
||||||
- ``matrix``, ``vector``, ``timeseries``
|
- ``matrix``, ``vector``, ``timeseries``
|
||||||
* - :class:`junifer.storage.HDF5FeatureStorage`
|
* - :class:`.HDF5FeatureStorage`
|
||||||
- ``.hdf5``
|
- ``.hdf5``
|
||||||
- HDF5
|
- HDF5
|
||||||
- ``matrix``, ``vector``, ``timeseries``
|
- ``matrix``, ``vector``, ``timeseries``
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ achieved by using a configuration file that is written in YAML_. In this file, w
|
||||||
|
|
||||||
As a reminder, this is how the pipeline looks like:
|
As a reminder, this is how the pipeline looks like:
|
||||||
|
|
||||||
.. mermaid::
|
.. mermaid::
|
||||||
|
|
||||||
flowchart LR
|
flowchart LR
|
||||||
dg[Data Grabber]
|
dg[Data Grabber]
|
||||||
|
|
@ -70,7 +70,7 @@ Data Grabber
|
||||||
The ``datagrabber`` section must be configured using the ``kind`` key to specify the datagrabber to use. Additional
|
The ``datagrabber`` section must be configured using the ``kind`` key to specify the datagrabber to use. Additional
|
||||||
keys correspond to the parameters of the datagrabber.
|
keys correspond to the parameters of the datagrabber.
|
||||||
|
|
||||||
For example, to use the :class:`junifer.datagrabber.DataladAOMICPIOP1` datagrabber, we just need to
|
For example, to use the :class:`.DataladAOMICPIOP1` datagrabber, we just need to
|
||||||
specify its name as the ``kind`` key.
|
specify its name as the ``kind`` key.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
@ -99,7 +99,7 @@ Data Reader
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
As mentioned before, this section is entirely optional, as junifer only provides one data reader
|
As mentioned before, this section is entirely optional, as junifer only provides one data reader
|
||||||
(:class:`junifer.datareader.DefaultDataReader`), which is the default in case the section is not specified.
|
(:class:`.DefaultDataReader`), which is the default in case the section is not specified.
|
||||||
|
|
||||||
In any case, the syntax of the section is the same as for the ``datagrabber`` section, using the ``kind`` key to
|
In any case, the syntax of the section is the same as for the ``datagrabber`` section, using the ``kind`` key to
|
||||||
specify the data reader to use, and additional keys to pass parameters to the data reader:
|
specify the data reader to use, and additional keys to pass parameters to the data reader:
|
||||||
|
|
@ -119,7 +119,7 @@ Preprocessing is also an optional step, as it might be the case that no pre-proc
|
||||||
preprocessing is needed, the section must be configured using the ``kind`` key to specify the preprocessor to use,
|
preprocessing is needed, the section must be configured using the ``kind`` key to specify the preprocessor to use,
|
||||||
and additional keys to pass parameters to the preprocessor.
|
and additional keys to pass parameters to the preprocessor.
|
||||||
|
|
||||||
For example, to use the :class:`junifer.preprocess.fMRIPrepConfoundRemover` preprocessor, we just need to specify its
|
For example, to use the :class:`.fMRIPrepConfoundRemover` preprocessor, we just need to specify its
|
||||||
name as the ``kind`` key, as well as its parameters.
|
name as the ``kind`` key, as well as its parameters.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ Storage
|
||||||
Finally, we need to define how and where the results will be stored. This is done using the ``storage`` section,
|
Finally, we need to define how and where the results will be stored. This is done using the ``storage`` section,
|
||||||
which must be configured using the ``kind`` key to specify the storage to use, and additional keys to pass parameters.
|
which must be configured using the ``kind`` key to specify the storage to use, and additional keys to pass parameters.
|
||||||
|
|
||||||
For example, to use the :class:`junifer.storage.SQLiteFeatureStorage` storage, we just need to specify where we want
|
For example, to use the :class:`.SQLiteFeatureStorage` storage, we just need to specify where we want
|
||||||
to store the results:
|
to store the results:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@ voxels that contain a certain ratio of gray matter to white matter / cerebrospin
|
||||||
are not extracted from voxels that contain mostly white matter or cerebrospinal fluid, which could add noise to the
|
are not extracted from voxels that contain mostly white matter or cerebrospinal fluid, which could add noise to the
|
||||||
BOLD signal.
|
BOLD signal.
|
||||||
|
|
||||||
Junifer provides a number of built-in masks, which can be listed using the :func:`junifer.data.masks.list_masks`. Some
|
Junifer provides a number of built-in masks, which can be listed using the :func:`.list_masks`. Some
|
||||||
masks are images, while other masks can be computed using :ref:`nilearn` functions.
|
masks are images, while other masks can be computed using :ref:`nilearn` functions.
|
||||||
|
|
||||||
For markers and steps that accept ``masks`` as an argument, the mask can be specified as a string, which will be the
|
For markers and steps that accept ``masks`` as an argument, the mask can be specified as a string, which will be the
|
||||||
name of a built-in mask, or as a dictionary in which the **only** key is the built-in mask name and the value is a
|
name of a built-in mask, or as a dictionary in which the **only** key is the built-in mask name and the value is a
|
||||||
dictionary of keyword arguments to pass to the mask function.
|
dictionary of keyword arguments to pass to the mask function.
|
||||||
|
|
||||||
For example, the following is a valid mask specification that specified the ``GM_prob0.2`` mask.
|
For example, the following is a valid mask specification that specified the ``GM_prob0.2`` mask.
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ with a threshold of 0.5.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
masks:
|
masks:
|
||||||
compute_brain_mask:
|
compute_brain_mask:
|
||||||
threshold: 0.5
|
threshold: 0.5
|
||||||
|
|
||||||
|
|
@ -39,7 +39,7 @@ is a valid mask specification that specifies the intersection of the ``GM_prob0.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
masks:
|
masks:
|
||||||
- GM_prob0.2
|
- GM_prob0.2
|
||||||
- compute_brain_mask:
|
- compute_brain_mask:
|
||||||
threshold: 0.5
|
threshold: 0.5
|
||||||
|
|
@ -50,7 +50,7 @@ following example combines the same masks as the previous one, but computing the
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
masks:
|
masks:
|
||||||
- GM_prob0.2
|
- GM_prob0.2
|
||||||
- compute_brain_mask:
|
- compute_brain_mask:
|
||||||
threshold: 0.5
|
threshold: 0.5
|
||||||
|
|
@ -60,9 +60,9 @@ Alternatively, we can also compute the union, even if the voxels do not form a c
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
masks:
|
masks:
|
||||||
- GM_prob0.2
|
- GM_prob0.2
|
||||||
- compute_brain_mask:
|
- compute_brain_mask:
|
||||||
threshold: 0.5
|
threshold: 0.5
|
||||||
- threshold: 0 # union
|
- threshold: 0 # union
|
||||||
- connected: False # keep disconnected components
|
- connected: False # keep disconnected components
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ individual results into a single file.
|
||||||
|
|
||||||
Assuming that we have a configuration file named ``config.yaml``, the following commands will extract the features:
|
Assuming that we have a configuration file named ``config.yaml``, the following commands will extract the features:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: bash
|
||||||
|
|
||||||
junifer run config.yaml
|
junifer run config.yaml
|
||||||
|
|
||||||
|
|
@ -22,20 +22,20 @@ The ``run`` command accepts the following additional arguments:
|
||||||
|
|
||||||
* ``--help``: Show a help message.
|
* ``--help``: Show a help message.
|
||||||
* ``--verbose`` Set the verbosity level. Options are ``warning``, ``info``, ``debug``.
|
* ``--verbose`` Set the verbosity level. Options are ``warning``, ``info``, ``debug``.
|
||||||
* ``--element``: The *element* to run. If not specified, all elements will be run. This parameter can be specified
|
* ``--element``: The *element* to run. If not specified, all elements will be run. This parameter can be specified
|
||||||
multiple times to run multiple elements. If the *element* requires several parameters, they can be specified
|
multiple times to run multiple elements. If the *element* requires several parameters, they can be specified
|
||||||
by separating them with ``,``.
|
by separating them with ``,``.
|
||||||
|
|
||||||
|
|
||||||
Example on running two elements:
|
Example on running two elements:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: bash
|
||||||
|
|
||||||
junifer run config.yaml --element sub-01 --element sub-02
|
junifer run config.yaml --element sub-01 --element sub-02
|
||||||
|
|
||||||
Example on elements with multiple parameters and verbose output:
|
Example on elements with multiple parameters and verbose output:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: bash
|
||||||
|
|
||||||
junifer run --verbose info config.yaml --element sub-01,ses-01
|
junifer run --verbose info config.yaml --element sub-01,ses-01
|
||||||
|
|
||||||
|
|
@ -50,7 +50,7 @@ individual results into a single file.
|
||||||
|
|
||||||
Assuming that we have a configuration file named ``config.yaml``, the following commands will collect the results:
|
Assuming that we have a configuration file named ``config.yaml``, the following commands will collect the results:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: bash
|
||||||
|
|
||||||
junifer collect config.yaml
|
junifer collect config.yaml
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,12 @@ API Changes
|
||||||
Bugfixes
|
Bugfixes
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
- Fix a bug in which a :class:`junifer.datagrabber.PatternDataGrabber` would
|
- Fix a bug in which a :class:`.PatternDataGrabber` would now work with
|
||||||
now work with relative ``datadir`` paths (reported by `Leonard Sasse`_,
|
relative ``datadir`` paths (reported by `Leonard Sasse`_, fixed by
|
||||||
fixed by `Fede Raimondo`_) (:gh:`96`, :gh:`98`)
|
`Fede Raimondo`_) (:gh:`96`, :gh:`98`)
|
||||||
|
|
||||||
- Fix a bug in which :class:`junifer.datagrabber.DataladAOMICPIOP2` datagrabber
|
- Fix a bug in which :class:`.DataladAOMICPIOP2` datagrabber did not use user
|
||||||
did not use user input to constrain elements based on tasks by
|
input to constrain elements based on tasks by `Leonard Sasse`_ (:gh:`105`)
|
||||||
`Leonard Sasse`_ (:gh:`105`)
|
|
||||||
|
|
||||||
- Fix a bug in which a datalad dataset could remove a user-cloned dataset by
|
- Fix a bug in which a datalad dataset could remove a user-cloned dataset by
|
||||||
`Fede Raimondo`_ (:gh:`53`)
|
`Fede Raimondo`_ (:gh:`53`)
|
||||||
|
|
@ -53,9 +52,9 @@ Improved Documentation
|
||||||
Enhancements
|
Enhancements
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
- Add comments to :class:`junifer.datagrabber.DataladDataGrabber` datagrabber
|
- Add comments to :class:`.DataladDataGrabber` datagrabber and change to use
|
||||||
and change to use ``datalad-clone`` instead of ``datalad-install`` by
|
``datalad-clone`` instead of ``datalad-install`` by `Benjamin Poldrack`_
|
||||||
`Benjamin Poldrack`_ (:gh:`55`)
|
(:gh:`55`)
|
||||||
|
|
||||||
- Upgrade storage interface for storage-like objects by `Synchon Mandal`_
|
- Upgrade storage interface for storage-like objects by `Synchon Mandal`_
|
||||||
(:gh:`84`)
|
(:gh:`84`)
|
||||||
|
|
@ -65,65 +64,64 @@ Enhancements
|
||||||
- Refactor markers ``on`` attribute and ``get_valid_inputs`` to verify that the
|
- Refactor markers ``on`` attribute and ``get_valid_inputs`` to verify that the
|
||||||
marker can be computed on the input data types by `Fede Raimondo`_
|
marker can be computed on the input data types by `Fede Raimondo`_
|
||||||
|
|
||||||
- Add test for :class:`junifer.datagrabber.DataladHCP1200` datagrabber by
|
- Add test for :class:`.DataladHCP1200` datagrabber by `Synchon Mandal`_
|
||||||
`Synchon Mandal`_ (:gh:`93`)
|
(:gh:`93`)
|
||||||
|
|
||||||
|
- Refactor :class:`.DataladAOMICID1000` slightly by `Leonard Sasse`_ (:gh:`94`)
|
||||||
|
|
||||||
- Rename "atlas" to "parcellation" by `Fede Raimondo`_ (:gh:`116`)
|
- Rename "atlas" to "parcellation" by `Fede Raimondo`_ (:gh:`116`)
|
||||||
|
|
||||||
- Refactor the :class:`junifer.datagrabber.BaseDataGrabber` class to allow for
|
- Refactor the :class:`.BaseDataGrabber` class to allow for easier subclassing
|
||||||
easier subclassing by `Fede Raimondo`_ (:gh:`123`)
|
by `Fede Raimondo`_ (:gh:`123`)
|
||||||
|
|
||||||
- Allow custom aggregation method for :class:`junifer.markers.SphereAggregation`
|
- Allow custom aggregation method for :class:`.SphereAggregation` by
|
||||||
by `Synchon Mandal`_ (:gh:`102`)
|
`Synchon Mandal`_ (:gh:`102`)
|
||||||
|
|
||||||
- Add support for "masks" by `Fede Raimondo`_ (:gh:`79`)
|
- Add support for "masks" by `Fede Raimondo`_ (:gh:`79`)
|
||||||
|
|
||||||
- Allow :class:`junifer.markers.ParcelAggregation` to apply multiple
|
- Allow :class:`.ParcelAggregation` to apply multiple parcellations at once by
|
||||||
parcellations at once by `Fede Raimondo`_ (:gh:`131`)
|
`Fede Raimondo`_ (:gh:`131`)
|
||||||
|
|
||||||
- Refactor :class:`junifer.pipeline.PipelineStepMixin` to improve its
|
- Refactor :class:`.PipelineStepMixin` to improve its implementation and
|
||||||
implementation and validation for pipeline steps by `Synchon Mandal`_
|
validation for pipeline steps by `Synchon Mandal`_ (:gh:`152`)
|
||||||
(:gh:`152`)
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
- Implement :class:`junifer.testing.datagrabbers.SPMAuditoryTestingDatagrabber`
|
- Implement :class:`.SPMAuditoryTestingDatagrabber` datagrabber by
|
||||||
datagrabber by `Fede Raimondo`_ (:gh:`52`)
|
`Fede Raimondo`_ (:gh:`52`)
|
||||||
|
|
||||||
- Implement matrix storage in SQliteFeatureStorage by `Fede Raimondo`_
|
- Implement matrix storage in SQliteFeatureStorage by `Fede Raimondo`_
|
||||||
(:gh:`42`)
|
(:gh:`42`)
|
||||||
|
|
||||||
- Implement :class:`junifer.markers.FunctionalConnectivityParcels` marker for
|
- Implement :class:`.FunctionalConnectivityParcels` marker for functional
|
||||||
functional connectivity using a parcellation by `Amir Omidvarnia`_ and
|
connectivity using a parcellation by `Amir Omidvarnia`_ and
|
||||||
`Kaustubh R. Patil`_ (:gh:`41`)
|
`Kaustubh R. Patil`_ (:gh:`41`)
|
||||||
|
|
||||||
- Implement coordinate register, list and load by `Fede Raimondo`_ (:gh:`11`)
|
- Implement :func:`.register_coordinates`, :func:`.list_coordinates` and
|
||||||
|
:func:`.load_coordinates` by `Fede Raimondo`_ (:gh:`11`)
|
||||||
|
|
||||||
- Add :class:`junifer.datagrabber.DataladAOMICID1000` datagrabber for AOMIC
|
- Add :class:`.DataladAOMICID1000` datagrabber for AOMIC ID1000 dataset
|
||||||
ID1000 dataset including tests and creation of mock dataset for testing by
|
including tests and creation of mock dataset for testing by
|
||||||
`Vera Komeyer`_ and `Xuan Li`_ (:gh:`60`)
|
`Vera Komeyer`_ and `Xuan Li`_ (:gh:`60`)
|
||||||
|
|
||||||
- Add support to access other input in the data object in the ``compute`` method
|
- Add support to access other input in the data object in the ``compute`` method
|
||||||
by `Fede Raimondo`_
|
by `Fede Raimondo`_
|
||||||
|
|
||||||
- Implement :class:`junifer.markers.RSSETSMarker` marker by `Leonard Sasse`_,
|
- Implement :class:`.RSSETSMarker` marker by `Leonard Sasse`_, `Nicolas Nieto`_
|
||||||
`Nicolas Nieto`_ and `Sami Hamdan`_ (:gh:`51`)
|
and `Sami Hamdan`_ (:gh:`51`)
|
||||||
|
|
||||||
- Implement :class:`junifer.markers.SphereAggregation` marker by
|
- Implement :class:`.SphereAggregation` marker by `Fede Raimondo`_ (:gh:`83`)
|
||||||
`Fede Raimondo`_
|
|
||||||
|
|
||||||
- Implement :class:`junifer.datagrabber.DataladAOMICPIOP1` and
|
- Implement :class:`.DataladAOMICPIOP1` and :class:`.DataladAOMICPIOP2`
|
||||||
:class:`junifer.datagrabber.DataladAOMICPIOP2` datagrabbers for AOMIC PIOP1
|
datagrabbers for AOMIC PIOP1 and PIOP2 datasets respectively by
|
||||||
and PIOP2 datasets respectively and refactor
|
`Leonard Sasse`_ (:gh:`94`)
|
||||||
:class:`junifer.datagrabber.DataladAOMICID1000` slightly by `Leonard Sasse`_
|
|
||||||
(:gh:`94`)
|
|
||||||
|
|
||||||
- Implement :class:`junifer.configs.juseless.datagrabbers.JuselessDataladCamCANVBM`
|
- Implement :class:`.JuselessDataladCamCANVBM` datagrabber by `Leonard Sasse`_
|
||||||
datagrabber by `Leonard Sasse`_ (:gh:`99`)
|
(:gh:`99`)
|
||||||
|
|
||||||
- Implement :class:`junifer.configs.juseless.datagrabbers.JuselessDataladIXIVBM`
|
- Implement :class:`.JuselessDataladIXIVBM` CAT output datagrabber for juseless
|
||||||
CAT output datagrabber for juseless by `Leonard Sasse`_ (:gh:`48`)
|
by `Leonard Sasse`_ (:gh:`48`)
|
||||||
|
|
||||||
- Add ``junifer wtf`` to report environment details by `Synchon Mandal`_
|
- Add ``junifer wtf`` to report environment details by `Synchon Mandal`_
|
||||||
(:gh:`33`)
|
(:gh:`33`)
|
||||||
|
|
@ -131,27 +129,27 @@ Features
|
||||||
- Add ``junifer selftest`` to report environment details by `Synchon Mandal`_
|
- Add ``junifer selftest`` to report environment details by `Synchon Mandal`_
|
||||||
(:gh:`9`)
|
(:gh:`9`)
|
||||||
|
|
||||||
- Implement :class:`junifer.configs.juseless.datagrabbers.JuselessDataladAOMICID1000VBM`
|
- Implement :class:`.JuselessDataladAOMICID1000VBM` datagrabber for accessing
|
||||||
datagrabber for accessing AOMIC ID1000 VBM from juseless by `Felix Hoffstaedter`_
|
AOMIC ID1000 VBM from juseless by `Felix Hoffstaedter`_ and `Synchon Mandal`_
|
||||||
and `Synchon Mandal`_ (:gh:`57`)
|
(:gh:`57`)
|
||||||
|
|
||||||
- Add :class:`junifer.preprocess.fMRIPrepConfoundRemover` by `Fede Raimondo`_
|
- Add :class:`.fMRIPrepConfoundRemover` by `Fede Raimondo`_ and `Leonard Sasse`_
|
||||||
and `Leonard Sasse`_ (:gh:`111`)
|
(:gh:`111`)
|
||||||
|
|
||||||
- Implement :class:`junifer.markers.CrossParcellationFC` marker by
|
- Implement :class:`.CrossParcellationFC` marker by `Leonard Sasse`_ and
|
||||||
`Leonard Sasse`_ and `Kaustubh R. Patil`_ (:gh:`85`)
|
`Kaustubh R. Patil`_ (:gh:`85`)
|
||||||
|
|
||||||
- Add :class:`junifer.configs.juseless.datagrabbers.JuselessUCLA` datagrabber
|
- Add :class:`.JuselessUCLA` datagrabber for the UCLA dataset available on
|
||||||
for the UCLA dataset available on juseless by `Leonard Sasse`_ (:gh:`118`)
|
juseless by `Leonard Sasse`_ (:gh:`118`)
|
||||||
|
|
||||||
- Introduce a singleton decorator for marker computations by `Synchon Mandal`_
|
- Introduce a singleton decorator for marker computations by `Synchon Mandal`_
|
||||||
(:gh:`151`)
|
(:gh:`151`)
|
||||||
|
|
||||||
- Implement :class:`junifer.markers.ReHoParcels` and
|
- Implement :class:`.ReHoParcels` and :class:`.ReHoSpheres` markers by
|
||||||
:class:`junifer.markers.ReHoSpheres` markers by `Synchon Mandal`_ (:gh:`36`)
|
`Synchon Mandal`_ (:gh:`36`)
|
||||||
|
|
||||||
- Implement :class:`junifer.markers.ALFFParcels` and
|
- Implement :class:`.ALFFParcels` and :class:`.ALFFSpheres` markers by
|
||||||
:class:`junifer.markers.ALFFSpheres` markers by `Fede Raimondo`_ (:gh:`35`)
|
`Fede Raimondo`_ (:gh:`35`)
|
||||||
|
|
||||||
Misc
|
Misc
|
||||||
^^^^
|
^^^^
|
||||||
|
|
|
||||||
|
|
@ -515,10 +515,11 @@ def _queue_condor(
|
||||||
collect_pre_fname = jobdir / "collect_pre.sh"
|
collect_pre_fname = jobdir / "collect_pre.sh"
|
||||||
dag_file.write(
|
dag_file.write(
|
||||||
f"SCRIPT PRE collect {collect_pre_fname.as_posix()} "
|
f"SCRIPT PRE collect {collect_pre_fname.as_posix()} "
|
||||||
"$DAG_STATUS\n")
|
"$DAG_STATUS\n"
|
||||||
|
)
|
||||||
with open(collect_pre_fname, "w") as pre_file:
|
with open(collect_pre_fname, "w") as pre_file:
|
||||||
pre_file.write("#!/bin/bash\n\n")
|
pre_file.write("#!/bin/bash\n\n")
|
||||||
pre_file.write("if [ \"${1}\" == \"4\" ]; then\n")
|
pre_file.write('if [ "${1}" == "4" ]; then\n')
|
||||||
pre_file.write(" exit 1\n")
|
pre_file.write(" exit 1\n")
|
||||||
pre_file.write("fi\n")
|
pre_file.write("fi\n")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ def load_parcellation(
|
||||||
----------
|
----------
|
||||||
name : str
|
name : str
|
||||||
The name of the parcellation. Check valid options by calling
|
The name of the parcellation. Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
parcellations_dir : str or pathlib.Path, optional
|
parcellations_dir : str or pathlib.Path, optional
|
||||||
Path where the parcellations files are stored. The default location is
|
Path where the parcellations files are stored. The default location is
|
||||||
"$HOME/junifer/data/parcellations" (default None).
|
"$HOME/junifer/data/parcellations" (default None).
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,13 @@ class RSSETSMarker(BaseMarker):
|
||||||
----------
|
----------
|
||||||
parcellation : str or list of str
|
parcellation : str or list of str
|
||||||
The name(s) of the parcellation(s). Check valid options by calling
|
The name(s) of the parcellation(s). Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default None).
|
:func:`.get_aggfunc_by_name` (default None).
|
||||||
masks : str, dict or list of dict or str, optional
|
masks : str, dict or list of dict or str, optional
|
||||||
The specification of the masks to apply to regions before extracting
|
The specification of the masks to apply to regions before extracting
|
||||||
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ class ALFFEstimator:
|
||||||
by caching the voxel-wise ALFF map for a given set of file path and
|
by caching the voxel-wise ALFF map for a given set of file path and
|
||||||
computation parameters.
|
computation parameters.
|
||||||
|
|
||||||
.. warning:: This class can only be used via
|
.. warning:: This class can only be used via :class:`.ALFFBase` as it
|
||||||
:class:`junifer.markers.falff.ALFFBase` as it serves a specific purpose.
|
serves a specific purpose.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class ALFFParcels(ALFFBase):
|
||||||
----------
|
----------
|
||||||
parcellation : str or list of str
|
parcellation : str or list of str
|
||||||
The name(s) of the parcellation(s). Check valid options by calling
|
The name(s) of the parcellation(s). Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
fractional : bool
|
fractional : bool
|
||||||
Whether to compute fractional ALFF.
|
Whether to compute fractional ALFF.
|
||||||
highpass : positive float, optional
|
highpass : positive float, optional
|
||||||
|
|
@ -40,10 +40,10 @@ class ALFFParcels(ALFFBase):
|
||||||
If None, will not apply any mask (default None).
|
If None, will not apply any mask (default None).
|
||||||
method : str, optional
|
method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
method_params : dict, optional
|
method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name`.
|
:func:`.get_aggfunc_by_name`.
|
||||||
name : str, optional
|
name : str, optional
|
||||||
The name of the marker. If None, will use the class name (default
|
The name of the marker. If None, will use the class name (default
|
||||||
None).
|
None).
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class ALFFSpheres(ALFFBase):
|
||||||
----------
|
----------
|
||||||
coords : str
|
coords : str
|
||||||
The name of the coordinates list to use. See
|
The name of the coordinates list to use. See
|
||||||
:func:`junifer.data.coordinates.list_coordinates` for options.
|
:func:`.list_coordinates` for options.
|
||||||
radius : float, optional
|
radius : float, optional
|
||||||
The radius of the sphere in mm. If None, the signal will be extracted
|
The radius of the sphere in mm. If None, the signal will be extracted
|
||||||
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
||||||
|
|
@ -47,10 +47,10 @@ class ALFFSpheres(ALFFBase):
|
||||||
If None, will not apply any mask (default None).
|
If None, will not apply any mask (default None).
|
||||||
method : str, optional
|
method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
method_params : dict, optional
|
method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name`.
|
:func:`.get_aggfunc_by_name`.
|
||||||
name : str, optional
|
name : str, optional
|
||||||
The name of the marker. If None, will use the class name (default
|
The name of the marker. If None, will use the class name (default
|
||||||
None).
|
None).
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@ class EdgeCentricFCParcels(FunctionalConnectivityBase):
|
||||||
----------
|
----------
|
||||||
parcellation : str or list of str
|
parcellation : str or list of str
|
||||||
The name(s) of the parcellation(s). Check valid options by calling
|
The name(s) of the parcellation(s). Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The method to perform aggregation of BOLD time series.
|
The method to perform aggregation of BOLD time series.
|
||||||
Check valid options in :func:`junifer.stats.get_aggfunc_by_name`
|
Check valid options in :func:`.get_aggfunc_by_name`
|
||||||
(default "mean").
|
(default "mean").
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default None).
|
:func:`.get_aggfunc_by_name` (default None).
|
||||||
cor_method : str, optional
|
cor_method : str, optional
|
||||||
The method to perform correlation. Check valid options in
|
The method to perform correlation. Check valid options in
|
||||||
:class:`nilearn.connectome.ConnectivityMeasure`
|
:class:`nilearn.connectome.ConnectivityMeasure`
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class EdgeCentricFCSpheres(FunctionalConnectivityBase):
|
||||||
----------
|
----------
|
||||||
coords : str
|
coords : str
|
||||||
The name of the coordinates list to use. See
|
The name of the coordinates list to use. See
|
||||||
:func:`junifer.data.coordinates.list_coordinates` for options.
|
:func:`.list_coordinates` for options.
|
||||||
radius : float, optional
|
radius : float, optional
|
||||||
The radius of the sphere in mm. If None, the signal will be extracted
|
The radius of the sphere in mm. If None, the signal will be extracted
|
||||||
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
||||||
|
|
@ -30,7 +30,7 @@ class EdgeCentricFCSpheres(FunctionalConnectivityBase):
|
||||||
the spheres overlap (default is False).
|
the spheres overlap (default is False).
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The aggregation method to use.
|
The aggregation method to use.
|
||||||
See :func:`junifer.stats.get_aggfunc_by_name` for more information
|
See :func:`.get_aggfunc_by_name` for more information
|
||||||
(default None).
|
(default None).
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
The parameters to pass to the aggregation method (default None).
|
The parameters to pass to the aggregation method (default None).
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ class FunctionalConnectivityBase(BaseMarker):
|
||||||
----------
|
----------
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default None).
|
:func:`.get_aggfunc_by_name` (default None).
|
||||||
cor_method : str, optional
|
cor_method : str, optional
|
||||||
The method to perform correlation using. Check valid options in
|
The method to perform correlation using. Check valid options in
|
||||||
:class:`nilearn.connectome.ConnectivityMeasure`
|
:class:`nilearn.connectome.ConnectivityMeasure`
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,13 @@ class FunctionalConnectivityParcels(FunctionalConnectivityBase):
|
||||||
----------
|
----------
|
||||||
parcellation : str or list of str
|
parcellation : str or list of str
|
||||||
The name(s) of the parcellation(s). Check valid options by calling
|
The name(s) of the parcellation(s). Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default None).
|
:func:`.get_aggfunc_by_name` (default None).
|
||||||
cor_method : str, optional
|
cor_method : str, optional
|
||||||
The method to perform correlation using. Check valid options in
|
The method to perform correlation using. Check valid options in
|
||||||
:class:`nilearn.connectome.ConnectivityMeasure`
|
:class:`nilearn.connectome.ConnectivityMeasure`
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class FunctionalConnectivitySpheres(FunctionalConnectivityBase):
|
||||||
----------
|
----------
|
||||||
coords : str
|
coords : str
|
||||||
The name of the coordinates list to use. See
|
The name of the coordinates list to use. See
|
||||||
:func:`junifer.data.coordinates.list_coordinates` for options.
|
:func:`.list_coordinates` for options.
|
||||||
radius : float, optional
|
radius : float, optional
|
||||||
The radius of the sphere in mm. If None, the signal will be extracted
|
The radius of the sphere in mm. If None, the signal will be extracted
|
||||||
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
||||||
|
|
@ -31,7 +31,7 @@ class FunctionalConnectivitySpheres(FunctionalConnectivityBase):
|
||||||
the spheres overlap (default is False).
|
the spheres overlap (default is False).
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The aggregation method to use.
|
The aggregation method to use.
|
||||||
See :func:`junifer.stats.get_aggfunc_by_name` for more information
|
See :func:`.get_aggfunc_by_name` for more information
|
||||||
(default None).
|
(default None).
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
The parameters to pass to the aggregation method (default None).
|
The parameters to pass to the aggregation method (default None).
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,13 @@ class ParcelAggregation(BaseMarker):
|
||||||
----------
|
----------
|
||||||
parcellation : str or list of str
|
parcellation : str or list of str
|
||||||
The name(s) of the parcellation(s). Check valid options by calling
|
The name(s) of the parcellation(s). Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
method : str
|
method : str
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name`.
|
:func:`.get_aggfunc_by_name`.
|
||||||
method_params : dict, optional
|
method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name`.
|
:func:`.get_aggfunc_by_name`.
|
||||||
time_method : str, optional
|
time_method : str, optional
|
||||||
The method to use to aggregate the time series over the time points,
|
The method to use to aggregate the time series over the time points,
|
||||||
after applying :term:`method` (only applicable to BOLD data). If None,
|
after applying :term:`method` (only applicable to BOLD data). If None,
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class ReHoParcels(ReHoBase):
|
||||||
----------
|
----------
|
||||||
parcellation : str
|
parcellation : str
|
||||||
The name of the parcellation. Check valid options by calling
|
The name of the parcellation. Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
use_afni : bool, optional
|
use_afni : bool, optional
|
||||||
Whether to use AFNI for computing. If None, will use AFNI only
|
Whether to use AFNI for computing. If None, will use AFNI only
|
||||||
if available (default None).
|
if available (default None).
|
||||||
|
|
@ -70,10 +70,10 @@ class ReHoParcels(ReHoBase):
|
||||||
|
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default None).
|
:func:`.get_aggfunc_by_name` (default None).
|
||||||
masks : str, dict or list of dict or str, optional
|
masks : str, dict or list of dict or str, optional
|
||||||
The specification of the masks to apply to regions before extracting
|
The specification of the masks to apply to regions before extracting
|
||||||
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class ReHoSpheres(ReHoBase):
|
||||||
----------
|
----------
|
||||||
coords : str
|
coords : str
|
||||||
The name of the coordinates list to use. See
|
The name of the coordinates list to use. See
|
||||||
:func:`junifer.data.coordinates.list_coordinates` for options.
|
:func:`.list_coordinates` for options.
|
||||||
radius : float, optional
|
radius : float, optional
|
||||||
The radius of the sphere in millimeters. If None, the signal will be
|
The radius of the sphere in millimeters. If None, the signal will be
|
||||||
extracted from a single voxel. See
|
extracted from a single voxel. See
|
||||||
|
|
@ -78,7 +78,7 @@ class ReHoSpheres(ReHoBase):
|
||||||
|
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The aggregation method to use.
|
The aggregation method to use.
|
||||||
See :func:`junifer.stats.get_aggfunc_by_name` for more information
|
See :func:`.get_aggfunc_by_name` for more information
|
||||||
(default None).
|
(default None).
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
The parameters to pass to the aggregation method (default None).
|
The parameters to pass to the aggregation method (default None).
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class SphereAggregation(BaseMarker):
|
||||||
----------
|
----------
|
||||||
coords : str
|
coords : str
|
||||||
The name of the coordinates list to use. See
|
The name of the coordinates list to use. See
|
||||||
:func:`junifer.data.coordinates.list_coordinates` for options.
|
:func:`.list_coordinates` for options.
|
||||||
radius : float, optional
|
radius : float, optional
|
||||||
The radius of the sphere in millimeters. If None, the signal will be
|
The radius of the sphere in millimeters. If None, the signal will be
|
||||||
extracted from a single voxel. See
|
extracted from a single voxel. See
|
||||||
|
|
@ -33,7 +33,7 @@ class SphereAggregation(BaseMarker):
|
||||||
the spheres overlap (default is False).
|
the spheres overlap (default is False).
|
||||||
method : str, optional
|
method : str, optional
|
||||||
The aggregation method to use.
|
The aggregation method to use.
|
||||||
See :func:`junifer.stats.get_aggfunc_by_name` for more information
|
See :func:`.get_aggfunc_by_name` for more information
|
||||||
(default "mean").
|
(default "mean").
|
||||||
method_params : dict, optional
|
method_params : dict, optional
|
||||||
The parameters to pass to the aggregation method (default None).
|
The parameters to pass to the aggregation method (default None).
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ class TemporalSNRBase(BaseMarker):
|
||||||
----------
|
----------
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default None).
|
:func:`.get_aggfunc_by_name` (default None).
|
||||||
masks : str, dict or list of dict or str, optional
|
masks : str, dict or list of dict or str, optional
|
||||||
The specification of the masks to apply to regions before extracting
|
The specification of the masks to apply to regions before extracting
|
||||||
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ class TemporalSNRParcels(TemporalSNRBase):
|
||||||
----------
|
----------
|
||||||
parcellation : str or list of str
|
parcellation : str or list of str
|
||||||
The name(s) of the parcellation(s). Check valid options by calling
|
The name(s) of the parcellation(s). Check valid options by calling
|
||||||
:func:`junifer.data.parcellations.list_parcellations`.
|
:func:`.list_parcellations`.
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The method to perform aggregation using. Check valid options in
|
The method to perform aggregation using. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default "mean").
|
:func:`.get_aggfunc_by_name` (default "mean").
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
Parameters to pass to the aggregation function. Check valid options in
|
Parameters to pass to the aggregation function. Check valid options in
|
||||||
:func:`junifer.stats.get_aggfunc_by_name` (default None).
|
:func:`.get_aggfunc_by_name` (default None).
|
||||||
masks : str, dict or list of dict or str, optional
|
masks : str, dict or list of dict or str, optional
|
||||||
The specification of the masks to apply to regions before extracting
|
The specification of the masks to apply to regions before extracting
|
||||||
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
signals. Check :ref:`Using Masks <using_masks>` for more details.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class TemporalSNRSpheres(TemporalSNRBase):
|
||||||
----------
|
----------
|
||||||
coords : str
|
coords : str
|
||||||
The name of the coordinates list to use. See
|
The name of the coordinates list to use. See
|
||||||
:func:`junifer.data.coordinates.list_coordinates` for options.
|
:func:`.list_coordinates` for options.
|
||||||
radius : float, optional
|
radius : float, optional
|
||||||
The radius of the sphere in mm. If None, the signal will be extracted
|
The radius of the sphere in mm. If None, the signal will be extracted
|
||||||
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
from a single voxel. See :class:`nilearn.maskers.NiftiSpheresMasker`
|
||||||
|
|
@ -29,7 +29,7 @@ class TemporalSNRSpheres(TemporalSNRBase):
|
||||||
the spheres overlap (default is False).
|
the spheres overlap (default is False).
|
||||||
agg_method : str, optional
|
agg_method : str, optional
|
||||||
The aggregation method to use.
|
The aggregation method to use.
|
||||||
See :func:`junifer.stats.get_aggfunc_by_name` for more information
|
See :func:`.get_aggfunc_by_name` for more information
|
||||||
(default None).
|
(default None).
|
||||||
agg_method_params : dict, optional
|
agg_method_params : dict, optional
|
||||||
The parameters to pass to the aggregation method (default None).
|
The parameters to pass to the aggregation method (default None).
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ def test_base_marker_subclassing() -> None:
|
||||||
"element": "elem",
|
"element": "elem",
|
||||||
"datareader": "dr",
|
"datareader": "dr",
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
marker = MyBaseMarker(on=["BOLD"])
|
marker = MyBaseMarker(on=["BOLD"])
|
||||||
output = marker.fit_transform(input=input_) # process
|
output = marker.fit_transform(input=input_) # process
|
||||||
|
|
|
||||||
|
|
@ -141,10 +141,7 @@ def build(
|
||||||
object_ = klass(**init_params)
|
object_ = klass(**init_params)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise_error(
|
raise_error(
|
||||||
msg=(
|
msg=(f"Failed to create {step} ({name}). " f"Error: {e}"),
|
||||||
f"Failed to create {step} ({name}). "
|
|
||||||
f"Error: {e}"
|
|
||||||
),
|
|
||||||
klass=RuntimeError,
|
klass=RuntimeError,
|
||||||
exception=e,
|
exception=e,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ def get_aggfunc_by_name(
|
||||||
* ``mean`` -> :func:`numpy.mean`
|
* ``mean`` -> :func:`numpy.mean`
|
||||||
* ``std`` -> :func:`numpy.std`
|
* ``std`` -> :func:`numpy.std`
|
||||||
* ``trim_mean`` -> :func:`scipy.stats.trim_mean`
|
* ``trim_mean`` -> :func:`scipy.stats.trim_mean`
|
||||||
* ``count`` -> :func:`junifer.stats.count`
|
* ``count`` -> :func:`.count`
|
||||||
* ``select`` -> :func:`junifer.stats.select`
|
* ``select`` -> :func:`.select`
|
||||||
|
|
||||||
func_params : dict, optional
|
func_params : dict, optional
|
||||||
Parameters to pass to the function.
|
Parameters to pass to the function.
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,8 @@ class BaseFeatureStorage(ABC):
|
||||||
-------
|
-------
|
||||||
dict
|
dict
|
||||||
List of features in the storage. The keys are the feature MD5 to
|
List of features in the storage. The keys are the feature MD5 to
|
||||||
be used in :meth:`junifer.storage.BaseFeatureStorage.read_df`
|
be used in :meth:`.read_df` and the values are the metadata of each
|
||||||
and the values are the metadata of each feature.
|
feature.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
raise_error(
|
raise_error(
|
||||||
|
|
|
||||||
|
|
@ -114,8 +114,8 @@ class HDF5FeatureStorage(BaseFeatureStorage):
|
||||||
values are found (default True).
|
values are found (default True).
|
||||||
chunk_size : int, optional
|
chunk_size : int, optional
|
||||||
The chunk size to use when collecting data from element files in
|
The chunk size to use when collecting data from element files in
|
||||||
:meth:`junifer.storage.HDF5FeatureStorage.collect`. If the file count
|
:meth:`.collect`. If the file count is smaller than the value, the
|
||||||
is smaller than the value, the minimum is used (default 100).
|
minimum is used (default 100).
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
|
|
@ -262,8 +262,8 @@ class HDF5FeatureStorage(BaseFeatureStorage):
|
||||||
-------
|
-------
|
||||||
dict
|
dict
|
||||||
List of features in the storage. The keys are the feature MD5 to
|
List of features in the storage. The keys are the feature MD5 to
|
||||||
be used in :meth:`junifer.storage.HDF5FeatureStorage.read_df`
|
be used in :meth:`.read_df` and the values are the metadata of each
|
||||||
and the values are the metadata of each feature.
|
feature.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# Read metadata
|
# Read metadata
|
||||||
|
|
@ -496,9 +496,7 @@ class HDF5FeatureStorage(BaseFeatureStorage):
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Write processed data to HDF5 (should not be called directly).
|
"""Write processed data to HDF5 (should not be called directly).
|
||||||
|
|
||||||
This is used primarily in
|
This is used primarily in :meth:`.store_metadata` and ``_store_data``.
|
||||||
:func:`junifer.storage.HDF5FeatureStorage.store_metadata` and
|
|
||||||
``_store_data``.
|
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
|
|
||||||
|
|
@ -213,8 +213,8 @@ class SQLiteFeatureStorage(PandasBaseFeatureStorage):
|
||||||
-------
|
-------
|
||||||
dict
|
dict
|
||||||
List of features in the storage. The keys are the feature MD5 to
|
List of features in the storage. The keys are the feature MD5 to
|
||||||
be used in :meth:`junifer.storage.SQLiteFeatureStorage.read_df`
|
be used in :meth:`.read_df` and the values are the metadata of each
|
||||||
and the values are the metadata of each feature.
|
feature.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# Retrieve meta table from storage
|
# Retrieve meta table from storage
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue
There's an error here.