ando.tools.generator package

Subpackages

Submodules

ando.tools.generator.AnDOGenerator module

class ando.tools.generator.AnDOGenerator.AnDOData(sub_id, ses_id, modality='ephys')

Bases: object

property basedir
generate_data_files(mode='link')

Add datafiles to AnDO structure

Args:

mode (str): Can be either ‘link’ ‘copy’ or ‘move’.

generate_metadata_files()

Copy registered metadata files into BIDS structure

This method currently only takes the file postfix into account to determine the target folder.

generate_structure()

Generate the required folders for storing the dataset

Returns:

(path): Path of created data folder

get_data_folder(mode='absolute')

Generate the relative path to the folder of the data files

Args:
mode (str): Return the absolute or local path to the data folder.

Accepted values: ‘absolute’, ‘local’

Returns:

path: pathlib.Path of the data folder

register_data_files(*files, task=None, run=None)

Register data with the AnDO data structure.

Args:
*files: path to files to be added as data files. If multiple files

are provided they are treated as a single data files split into multiple chunks and will be enumerated according to the order they are provided in.

register_metadata_files(*files)
validate()

Validate the generated structure using the AnDO validator

Returns:

(bool): True if validation was successful. False if it failed.

ando.tools.generator.AnDOGenerator.create_file(source, destination, mode)
ando.tools.generator.AnDOGenerator.extract_structure_from_csv(csv_file)
ando.tools.generator.AnDOGenerator.generate_Struct(csv_file, pathToDir)
ando.tools.generator.AnDOGenerator.main()

usage: AnDOGenerator.py [-h] pathToCsv pathToDir

positional arguments: pathToCsv Path to your folder pathToDir Path to your csv file

optional arguments: -h, –help show this help message and exit

Module contents