Beispiel #1
0
 def wrapper(func, *args, **kwargs):
     old_flags = hl._get_flags('cpp')
     try:
         hl._set_flags(cpp='t')
         func(*args, **kwargs)
     finally:
         hl._set_flags(**old_flags)
Beispiel #2
0
    def wrapper(func, *args, **kwargs):
        prev_flags = {k: v for k, v in hl._get_flags().items() if k in flags}

        hl._set_flags(**{k: '1' for k in flags})

        try:
            return func(*args, **kwargs)
        finally:
            hl._set_flags(**prev_flags)
Beispiel #3
0
    def wrapper(func, *args, **kwargs):
        flags = hl._get_flags()
        prev_lower = flags.get('lower')
        prev_lower_only = flags.get('lower_only')

        hl._set_flags(lower='1', lower_only='1')

        try:
            return func(*args, **kwargs)
        finally:
            hl._set_flags(lower=prev_lower, lower_only=prev_lower_only)
def compile_2k_merge(path):
    flagname = 'no_ir_logging'
    prev_flag_value = hl._get_flags(flagname).get(flagname)
    try:
        hl._set_flags(**{flagname: '1'})
        vcf = setup(path)
        vcfs = [vc_all.transform_gvcf(vcf)] * COMBINE_GVCF_MAX
        combined = [vc_all.combine_gvcfs(vcfs)] * 20
        with TemporaryDirectory() as tmpdir:
            hl.experimental.write_matrix_tables(combined,
                                                os.path.join(
                                                    tmpdir,
                                                    'combiner-multi-write'),
                                                overwrite=True)
    finally:
        hl._set_flags(**{flagname: prev_flag_value})
    def run(self):
        flagname = 'no_ir_logging'
        prev_flag_value = hl._get_flags(flagname).get(flagname)
        hl._set_flags(**{flagname: '1'})

        vds_samples = sum(vds.n_samples for vdses in self.vdses.values()
                          for vds in vdses)
        info(
            'Running VDS combiner:\n'
            f'    VDS arguments: {self._num_vdses} datasets with {vds_samples} samples\n'
            f'    GVCF arguments: {len(self.gvcfs)} inputs/samples\n'
            f'    Branch factor: {self.branch_factor}\n'
            f'    GVCF merge batch size: {self.gvcf_batch_size}')
        while not self.finished:
            self.save()
            self.step()
        self.save()
        info('Finished VDS combiner!')
        hl._set_flags(**{flagname: prev_flag_value})
Beispiel #6
0
 def wrapper(func, *args, **kwargs):
     old_flags = hl._get_flags('cpp')
     hl._set_flags(cpp='t')
     func(*args, **kwargs)
     hl._set_flags(**old_flags)