NA  = "N/A" # Not Available
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'

if __name__ == '__main__':

    # Get environment variables
    packages_root = os.getenv('PACKAGES_ROOT')
    if not packages_root:
        log.info("Environment variable PACKAGES_ROOT must be set!")
        sys.exit(1)

    # Create archive access object
    archive = hcp3t_archive.Hcp3T_Archive()

    # Get list of subjects
    subject_file_name = file_utils.get_subjects_file_name(__file__)
    log.info("Retrieving subject list from: " + subject_file_name)
    subject_list = hcp3t_subject.read_subject_info_list(subject_file_name)

    print("Project",                     end="\t")
    print("Subject ID",                  end="\t")
    print("Preproc Resource Date",       end="\t")
    print("Package Path",                end="\t")
    print("Package Exists",              end="\t")
    print("Package Date",                end="\t")
    print("Package Size",                end="\t")
    print("Package Newer Than Resource", end="\t")
    print("Checksum Exists",             end="\t")
    print("Checksum Date",               end="\t")
    print("Checksum Newer Than Package")
__copyright__ = "Copyright 2016, The Human Connectome Project"
__maintainer__ = "Timothy B. Brown"

# configure logging and create module logger
logging.config.fileConfig(file_utils.get_logging_config_file_name(__file__))
logger = logging.getLogger(file_utils.get_logger_name(__file__))

# module constants
DNM = "---"  # Does Not Matter
NA = "N/A"  # Not Available
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'

if __name__ == '__main__':

    # get list of subjects to check
    subject_file_name = file_utils.get_subjects_file_name(__file__)
    logger.info("Retrieving subject list from: " + subject_file_name)
    subject_list = hcp3t_subject.read_subject_info_list(subject_file_name,
                                                        separator='\t')

    # open complete and incomplete files for writing
    complete_file = open('complete.status', 'w')
    incomplete_file = open('incomplete.status', 'w')

    # create archive access object
    archive = hcp3t_archive.Hcp3T_Archive()

    # create on subject completion checker
    completion_checker = one_subject_completion_checker.OneSubjectCompletionChecker(
    )
Beispiel #3
0
            # submit jobs
            submitter.submit_jobs(processing_stage)


if __name__ == '__main__':
    logging.config.fileConfig(
        file_utils.get_logging_config_file_name(__file__),
        disable_existing_loggers=False)

    # get ConnectomeDB credentials
    userid = input("Connectome DB Username: "******"Connectome DB Password: "******"Reading configuration from file: " + config_file_name)
    config = my_configparser.MyConfigParser()
    config.read(config_file_name)

    # get list of subjects to process
    subject_file_name = 'subjectfiles' + os.sep + file_utils.get_subjects_file_name(
        __file__)
    module_logger.info("Retrieving subject list from: " + subject_file_name)
    subject_list = ccf_subject.read_subject_info_list(subject_file_name,
                                                      separator=':')

    # process the subjects in the list
    batch_submitter = BatchSubmitter('3T')
    batch_submitter.submit_jobs(userid, password, subject_list, config)