Skip to content

Commit

Permalink
Also, creating output dir in outdir
Browse files Browse the repository at this point in the history
  • Loading branch information
crosenth committed Oct 3, 2024
1 parent aa620f0 commit 48ba771
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/run_plate.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def main(arguments):

platedir = path.join(args.data_dir, f'miseq-plate-{plate}')
outdir = path.join(args.data_dir, args.out_dir, f'miseq-plate-{plate}')
output = path.join(outdir, 'output')
try:
os.makedirs(outdir)
os.makedirs(output)
except OSError as err:
pass

Expand Down Expand Up @@ -93,7 +94,7 @@ def main(arguments):
manifest = read_manifest_excel(sample_information)
fieldnames = next(manifest)
writer = csv.DictWriter(
open(path.join(outdir, 'sample_information.csv'), 'w'),
open(path.join(output, 'sample_information.csv'), 'w'),
fieldnames=fieldnames)
writer.writeheader()
writer.writerows(manifest)
Expand All @@ -102,7 +103,7 @@ def main(arguments):
d = {
'sample_information': sample_information,
'fastq_list': fastq_list,
'output': path.join(outdir, 'output'),
'output': output,
'index_file_type': 'dual',
'dada_params': 'data/dada_params_300.json',
'alignment': {
Expand Down

0 comments on commit 48ba771

Please sign in to comment.