def get_parser():
    """Build parser object"""
    from argparse import ArgumentParser
    from argparse import RawTextHelpFormatter
    parser = ArgumentParser(description=
        "OpenfMRI participants sampler, for FMRIPREP's testing purposes",
        formatter_class=RawTextHelpFormatter)
    parser.add_argument('openfmri_dir', action='store', help=
        'the root folder of a the openfmri dataset')
    parser.add_argument('output_dir', action='store', help=
        'the directory where outputs should be stored')
    parser.add_argument('sample_file', action='store', help=
        'a YAML file containing the subsample schedule')
    parser.add_argument('--anat-only', action='store_true', default=False,
        help='run only anatomical workflow')
    parser.add_argument('--nthreads', action='store', type=int, help=
        'number of total threads')
    parser.add_argument('--omp_nthreads', action='store', type=int, help=
        'number of threads for OMP-based interfaces')
    parser.add_argument('--mem-gb', action='store', type=int, help=
        'available memory in GB')
    parser.add_argument('--tasks-list-file', default='tasks_list.sh',
        action='store', help='write output file')
    parser.add_argument('-t', '--tasks-filter', action='store', nargs='*',
        help='run only specific tasks')
    parser.add_argument('--cmd-call', action='store', help='command to be run')
    return parser
