Skip to content

Commit

Permalink
Merge pull request #21 from ucpete/patch-1
Browse files Browse the repository at this point in the history
Fixes auto sample naming (#19)
  • Loading branch information
mdshw5 authored Nov 2, 2021
2 parents b8ee406 + 9e64677 commit 5db2d4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pisces/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def run(args, unknown_args):
sample_name = long_substr(tuple(chain(args.fq1, args.fq1)))
sample_name = sample_name.split('/')[-1].split('_')[0]
logging.info("Sample name: %s", sample_name)
assert len(sample_name) > 0
try:
assert len(sample_name) > 0
except AssertionError:
raise RuntimeError("Output file naming failed; provide an output file basename with `--name`.")
else:
sample_name = args.name

Expand Down

0 comments on commit 5db2d4a

Please sign in to comment.