Skip to content

Commit

Permalink
fix: ignore jid tracking if local execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Routsong committed Nov 9, 2023
1 parent b432a87 commit 3376fc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions dmux
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ def run(args):
demux_runs = runs
for i, (rundir, run_infos) in enumerate(demux_runs):
run_infos['demux_dir'] = config['out_to'][i]
run_infos['parent_jid'] = jids[i]
if args.local:
run_infos['parent_jid'] = None
else
run_infos['parent_jid'] = jids[i]
ngsqc(args, demux_runs=demux_runs)



def ngsqc(args, demux_runs=False):
"""
Front-end sub-command for NGS QA/QC pipeline analysis.
Expand Down Expand Up @@ -83,7 +87,7 @@ def ngsqc(args, demux_runs=False):
sample_sheet = run_info['samplesheet']
configs['sample_sheet'].append(str(sample_sheet.path.absolute()))
configs['projects'].append(sample_sheet.samples[0].Sample_Project)
if 'parent_jid' in run_info:
if 'parent_jid' in run_info and not args.local:
configs['parent_jid'].append(run_info['parent_jid'])
sample_list = [
dict(sid=sample.Sample_ID+'_S'+str(i), r1_adapter=sample.index, r2_adapter=sample.index2)
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def exec_ngsqc_pipeline(configs, dry_run=False, local=False):
config_file = Path(this_config['out_to'], '.config', f'config_job_{str(i)}.json').absolute()
json.dump(this_config, open(config_file, 'w'), cls=PathJSONEncoder, indent=4)
top_env = {}
if 'parent_jid' in this_config and this_config['parent_jid'] is not None:
if 'parent_jid' in this_config and this_config['parent_jid'] is not None and not local:
top_env['SLURM_DEP_PARENT_JOB'] = str(this_config['parent_jid'])
top_env['PATH'] = os.environ["PATH"]
top_env['SNK_CONFIG'] = str(config_file.absolute())
Expand Down

0 comments on commit 3376fc2

Please sign in to comment.