MACS3.IO.BedGraphIO module

Utilities for reading and writing MACS3 bedGraph files.

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.BedGraphIO.atof(*args, **kwargs)
MACS3.IO.BedGraphIO.atoi(*args, **kwargs)
class MACS3.IO.BedGraphIO.bedGraphIO(bedGraph_filename, data=None)

Bases: object

Helper for loading and writing bedGraph tracks.

bedGraph_filename = None
data = None
read_bedGraph(baseline_value=0)

Load bedGraph intervals into the internal bedGraphTrackI.

Parameters:

baseline_value (typedef) – Value used to fill gaps between defined intervals.

Returns:

Populated track instance.

Return type:

bedGraphTrackI

write_bedGraph(name='', description='', trackline=True)

Persist the current track to self.bedGraph_filename.

Parameters:
  • name (str) – Track name used in the optional header line.

  • description (str) – Track description used in the optional header line.

  • trackline (_fake_callable) – Whether to emit a UCSC track header.

MACS3.IO.BedGraphIO.bool(*args, **kwargs)