# HG changeset patch # User sanbi-uwc # Date 1618230521 0 # Node ID 878f18249f76f90d60a41c8978d0f7b3cbda8c2a # Parent 499b71c93c5d2a97be4ed3b38d8970e697f90654 "planemo upload for repository https://github.com/SANBI-SA/tools-sanbi-uwc/tree/master/tools/qc commit 21d348651ca466563cc507b9e3a3fbd6c2b0a016" diff -r 499b71c93c5d -r 878f18249f76 qc.py --- a/qc.py Wed Apr 07 22:07:00 2021 +0000 +++ b/qc.py Mon Apr 12 12:28:41 2021 +0000 @@ -6,6 +6,7 @@ import pandas as pd import matplotlib.pyplot as plt import shlex +import json """ This script can incorporate as many QC checks as required @@ -156,7 +157,12 @@ writer = csv.DictWriter(csvfile, fieldnames=header) writer.writeheader() writer.writerow(qc_line) - + + # write a json file from the dict + json_file = args.outfile + '.json' + with open(args.outfile, 'w') as jsonfile: + json.dump(qc_line, json_file) + N_density = sliding_window_N_density(fasta) make_qc_plot(depth_pos, N_density, args.sample) diff -r 499b71c93c5d -r 878f18249f76 qc.xml --- a/qc.xml Wed Apr 07 22:07:00 2021 +0000 +++ b/qc.xml Mon Apr 12 12:28:41 2021 +0000 @@ -11,8 +11,9 @@ --sample 'sample' --ref '$input_ref' --bam '$input_bam' - --fasta '$input_cons_fasta' && - mv sample.depth.png '$output2' + --fasta '$input_cons_fasta' && + mv '$output1'.json '$output2' && + mv sample.depth.png '$output3' ]]> @@ -27,7 +28,8 @@ - + + @@ -36,7 +38,8 @@ - + +