From f723f33b20d08e95a803691ffab562c0d11c1e0a Mon Sep 17 00:00:00 2001 From: Chang Ye Date: Tue, 18 Jun 2024 19:17:09 -0500 Subject: [PATCH] fix json report --- cutseq/run.py | 54 ++++++++++++++++++++++++++------------------------ pyproject.toml | 2 +- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/cutseq/run.py b/cutseq/run.py index 542f840..100392d 100644 --- a/cutseq/run.py +++ b/cutseq/run.py @@ -427,19 +427,20 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings): pipeline = SingleEndPipeline(modifiers, steps) stats = runner.run(pipeline, Progress(), outfiles) - json_report( - settings.json_file, - stats, - barcode, - input1, - None, - output1, - None, - short1, - None, - untrimmed1, - None, - ) + if settings.json_file is not None: + json_report( + settings.json_file, + stats, + barcode, + input1, + None, + output1, + None, + short1, + None, + untrimmed1, + None, + ) print(minimal_report(stats, time=None, gc_content=None), file=sys.stderr) outfiles.close() @@ -686,19 +687,20 @@ def pipeline_paired( pipeline = PairedEndPipeline(modifiers, steps) stats = runner.run(pipeline, Progress(), outfiles) - json_report( - settings.json_file, - stats, - barcode, - input1, - input2, - output1, - output2, - short1, - short2, - untrimmed1, - untrimmed2, - ) + if settings.json_file is not None: + json_report( + settings.json_file, + stats, + barcode, + input1, + input2, + output1, + output2, + short1, + short2, + untrimmed1, + untrimmed2, + ) print(minimal_report(stats, time=None, gc_content=None), file=sys.stderr) outfiles.close() diff --git a/pyproject.toml b/pyproject.toml index c50bad4..d71de5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cutseq" -version = "0.0.42" +version = "0.0.43" description = "Automatically cut adapter / barcode / UMI from NGS data" authors = ["Ye Chang "] license = "MIT"