def organize_inputs(user_args):
    '\n    Validates the input features specified and returns organized list of paths and readers.\n\n    Parameters\n    ----------\n    user_args : ArgParse object\n        Various options specified by the user.\n\n    Returns\n    -------\n    user_feature_paths : list\n        List of paths to specified input features\n    user_feature_type : str\n        String identifying the type of user-defined input\n    fs_subject_dir : str\n        Path to freesurfer subject directory, if supplied.\n\n    '
    atleast_one_feature_specified = False
    meta_data_supplied = False
    meta_data_format = None
    if not_unspecified(user_args.fs_subject_dir):
        fs_subject_dir = abspath(user_args.fs_subject_dir)
        if (not pexists(fs_subject_dir)):
            raise IOError("Given Freesurfer directory doesn't exist.")
        atleast_one_feature_specified = True
    else:
        fs_subject_dir = None
    mutually_excl_formats = ['user_feature_paths', 'data_matrix_paths', 'pyradigm_paths', 'arff_paths']
    not_none_count = 0
    for format in mutually_excl_formats:
        if not_unspecified(getattr(user_args, format)):
            not_none_count = (not_none_count + 1)
    if (not_none_count > 1):
        raise ValueError('Only one of the following formats can be specified:\n{}'.format(mutually_excl_formats))
    if not_unspecified(user_args.user_feature_paths):
        user_feature_paths = check_paths(user_args.user_feature_paths, path_type='user defined (dir_of_dirs)')
        atleast_one_feature_specified = True
        user_feature_type = 'dir_of_dirs'
    elif not_unspecified(user_args.data_matrix_paths):
        user_feature_paths = check_paths(user_args.data_matrix_paths, path_type='data matrix')
        atleast_one_feature_specified = True
        user_feature_type = 'data_matrix'
    elif not_unspecified(user_args.pyradigm_paths):
        user_feature_paths = check_paths(user_args.pyradigm_paths, path_type='pyradigm')
        atleast_one_feature_specified = True
        meta_data_supplied = user_feature_paths[0]
        meta_data_format = 'pyradigm'
        user_feature_type = 'pyradigm'
    elif not_unspecified(user_args.arff_paths):
        user_feature_paths = check_paths(user_args.arff_paths, path_type='ARFF')
        atleast_one_feature_specified = True
        user_feature_type = 'arff'
        meta_data_supplied = user_feature_paths[0]
        meta_data_format = 'arff'
    else:
        user_feature_paths = None
        user_feature_type = None
    if (not isinstance(user_feature_paths, list)):
        user_feature_paths = list(user_feature_paths)
    if (not atleast_one_feature_specified):
        raise ValueError('Atleast one method specifying features must be specified. It can be a path(s) to pyradigm dataset, matrix file, user-defined folder or a Freesurfer subject directory.')
    return (user_feature_paths, user_feature_type, fs_subject_dir, meta_data_supplied, meta_data_format)
Validates the input features specified and returns organized list of paths and readers.

Parameters
----------
user_args : ArgParse object
    Various options specified by the user.

Returns
-------
user_feature_paths : list
    List of paths to specified input features
user_feature_type : str
    String identifying the type of user-defined input
fs_subject_dir : str
    Path to freesurfer subject directory, if supplied.
def organize_inputs(user_args):
    '\n    Validates the input features specified and returns organized list of paths and readers.\n\n    Parameters\n    ----------\n    user_args : ArgParse object\n        Various options specified by the user.\n\n    Returns\n    -------\n    user_feature_paths : list\n        List of paths to specified input features\n    user_feature_type : str\n        String identifying the type of user-defined input\n    fs_subject_dir : str\n        Path to freesurfer subject directory, if supplied.\n\n    '
    atleast_one_feature_specified = False
    meta_data_supplied = False
    meta_data_format = None
    if not_unspecified(user_args.fs_subject_dir):
        fs_subject_dir = abspath(user_args.fs_subject_dir)
        if (not pexists(fs_subject_dir)):
            raise IOError("Given Freesurfer directory doesn't exist.")
        atleast_one_feature_specified = True
    else:
        fs_subject_dir = None
    mutually_excl_formats = ['user_feature_paths', 'data_matrix_paths', 'pyradigm_paths', 'arff_paths']
    not_none_count = 0
    for format in mutually_excl_formats:
        if not_unspecified(getattr(user_args, format)):
            not_none_count = (not_none_count + 1)
    if (not_none_count > 1):
        raise ValueError('Only one of the following formats can be specified:\n{}'.format(mutually_excl_formats))
    if not_unspecified(user_args.user_feature_paths):
        user_feature_paths = check_paths(user_args.user_feature_paths, path_type='user defined (dir_of_dirs)')
        atleast_one_feature_specified = True
        user_feature_type = 'dir_of_dirs'
    elif not_unspecified(user_args.data_matrix_paths):
        user_feature_paths = check_paths(user_args.data_matrix_paths, path_type='data matrix')
        atleast_one_feature_specified = True
        user_feature_type = 'data_matrix'
    elif not_unspecified(user_args.pyradigm_paths):
        user_feature_paths = check_paths(user_args.pyradigm_paths, path_type='pyradigm')
        atleast_one_feature_specified = True
        meta_data_supplied = user_feature_paths[0]
        meta_data_format = 'pyradigm'
        user_feature_type = 'pyradigm'
    elif not_unspecified(user_args.arff_paths):
        user_feature_paths = check_paths(user_args.arff_paths, path_type='ARFF')
        atleast_one_feature_specified = True
        user_feature_type = 'arff'
        meta_data_supplied = user_feature_paths[0]
        meta_data_format = 'arff'
    else:
        user_feature_paths = None
        user_feature_type = None
    if (not isinstance(user_feature_paths, list)):
        user_feature_paths = list(user_feature_paths)
    if (not atleast_one_feature_specified):
        raise ValueError('Atleast one method specifying features must be specified. It can be a path(s) to pyradigm dataset, matrix file, user-defined folder or a Freesurfer subject directory.')
    return (user_feature_paths, user_feature_type, fs_subject_dir, meta_data_supplied, meta_data_format)