Our tbprofiler_full_report.json files don't have any newlines or indentation. They're fairly large/complex documents so this makes it difficult for a person to visually read the files directly. They can be re-formatted with a text editor, but it would be simpler and more convenient to write the files in "pretty-printed" form (with newlines and indentation).
One way to do this is to just stream the file through python's json.tool module before writing to disk:
Our
tbprofiler_full_report.json
files don't have any newlines or indentation. They're fairly large/complex documents so this makes it difficult for a person to visually read the files directly. They can be re-formatted with a text editor, but it would be simpler and more convenient to write the files in "pretty-printed" form (with newlines and indentation).One way to do this is to just stream the file through python's
json.tool
module before writing to disk:On this line:
https://github.com/BCCDC-PHL/tbprofiler-nf/blob/3f8a41da1675cda2fa43e4f6a7e5e74dbf37e838/modules/tbprofiler.nf#L87
We could instead do: