MACS3.IO.OutputWriter module

Utility functions for writing MACS3 signal and diagnostic outputs.

This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file LICENSE included with the distribution).

MACS3.IO.OutputWriter.diag_write(filename, diag_result)

Write a tab-delimited motif enrichment summary report.

Parameters:
  • filename – Output path for the diagnostic table.

  • diag_result – Iterable whose rows contain fold-change bins followed by metrics.

MACS3.IO.OutputWriter.model2r_script(model, filename, name)

Export peak model diagnostics as a standalone R plotting script.

Parameters:
  • model – Peak model object with plus/minus lines, correlations, etc.

  • filename – Destination path for the generated .R file.

  • name – Sample label interpolated into plot titles.

MACS3.IO.OutputWriter.zbdg_write(trackI, subdir, fileprefix, d, log=None, single=False)

Write per-chromosome bedGraph tracks for shifted tags and gzip them.

Parameters:
  • trackI – Shifted tag track (typically from PeakDetect).

  • subdir – Output directory where bedGraph files are created.

  • fileprefix – Prefix used for generated file names.

  • d – Tag extension length.

  • log – Optional logging callable; defaults to sys.stderr.write.

  • single – When True produce a single combined file instead of per-chromosome files.

MACS3.IO.OutputWriter.zwig_write(trackI, subdir, fileprefix, d, log=None, space=10, single=False)

Write per-chromosome wiggle tracks for shifted tags and gzip them.

Parameters:
  • trackI – Shifted tag track (typically from PeakDetect).

  • subdir – Output directory where wiggle files are created.

  • fileprefix – Prefix used for generated file names.

  • d – Tag extension length.

  • log – Optional logging callable; defaults to sys.stderr.write.

  • space – Interval at which counts are emitted; defaults to 10 bp.

  • single – When True produce a single combined file instead of per-chromosome files.