def download_ref_tables()

in app/source/dragen/src/dragen_qs.py [0:0]


    def download_ref_tables(self):

        if not self.ref_s3_url:
            printf('Warning: No reference HT directory URL specified!')
            return

        # Generate the params to download the HT based on URL s3://bucket/key
        s3_valid, s3_bucket, s3_key = get_s3_bucket_key(self.ref_s3_url)

        if not s3_valid or not s3_key or not s3_bucket:
            printf('Error: could not get S3 bucket and key info from specified URL %s' % self.ref_s3_url)
            sys.exit(1)

        target_path = self.DEFAULT_DATA_FOLDER  # Specifies the root
        dl_cmd = '{bin} --mode download --bucket {bucket} --key {key} --path {target}'.format(
            bin=self.D_HAUL_UTIL,
            bucket=s3_bucket,
            key=s3_key,
            target=target_path)

        exit_code = exec_cmd(dl_cmd)

        if exit_code:
            printf('Error: Failure downloading from S3. Exiting with code %d' % exit_code)
            sys.exit(exit_code)

        self.ref_dir = self.DEFAULT_DATA_FOLDER + s3_key
        self.new_args[self.ref_s3_index] = self.ref_dir
        return