nimare.dataset
.Dataset¶
-
class
Dataset
(source, target='mni152_2mm', mask=None)[source]¶ Storage container for a coordinate- and/or image-based meta-analytic dataset/database.
- Parameters
source (
str
) – JSON file containing dictionary with database information or the dict() objecttarget (
str
) – Desired coordinate space for coordinates. Names follow NIDM convention.mask (str, Nifti1Image, or any nilearn Masker) – Mask(er) to use. If None, uses the target space image, with all non-zero voxels included in the mask.
- Variables
ids (1D array_like) – A list of identifiers for all studies in the Dataset.
masker (
nilearn.input_data.NiftiMasker
or similar) – Masker object defining the space and location of the area of interest (e.g., ‘brain’).space (
str
) – Standard space. Same astarget
parameter.annotations (
pandas.DataFrame
) – DataFrame with labels describing studies in the dataset.metadata (
pandas.DataFrame
) – DataFrame with metadata describing studies in the Dataset.texts (
pandas.DataFrame
) – DataFrame with texts associated with studies in the Dataset.images (
pandas.DataFrame
) – DataFrame with paths to statistical images for studies in the Dataset.coordinates (
pandas.DataFrame
) – DataFrame with suprathreshold peak coordinates from studies in the Dataset.
-
get_images
(ids=None, imtype=None)[source]¶ Get images of a certain type for a subset of studies in the dataset.
- Parameters
- Returns
images (
list
) – List of images of requested type for selected IDs.
-
get_metadata
(ids=None, field=None)[source]¶ Get metadata from Dataset.
- Parameters
- Returns
metadata (
list
) – List of values of requested type for selected IDs.
-
get_params
(deep=True)[source]¶ Get parameters for this estimator.
- Parameters
deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns
params (mapping of string to any) – Parameter names mapped to their values.
-
get_studies_by_coordinate
(xyz, r=20)[source]¶ Extract list of studies with at least one focus within radius r of requested coordinates.
-
get_studies_by_label
(labels=None, label_threshold=0.5)[source]¶ Extract list of studies with a given label.
- Parameters
- Returns
found_ids (
list
) – A list of IDs from the Dataset found by the search criteria.
-
get_studies_by_mask
(mask)[source]¶ Extract list of studies with at least one coordinate in mask.
- Parameters
mask (img_like) – Mask across which to search for coordinates.
- Returns
found_ids (
list
) – A list of IDs from the Dataset with at least one focus in the mask.
-
get_texts
(ids=None, text_type=None)[source]¶ Extract list of texts of a given type for selected IDs.
- Parameters
- Returns
texts (
list
) – List of texts of requested type for selected IDs.
-
set_params
(**params)[source]¶ Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each component of a nested object.- Returns
self
-
slice
(ids)[source]¶ Return a reduced dataset with only requested IDs.
- Parameters
ids (array_like) – List of study IDs to include in new dataset
- Returns
new_dset (
nimare.dataset.Dataset
) – Reduced Dataset containing only requested studies.