bsxplorer.UniversalWriter

class UniversalWriter(file: str | Path, report_type: Literal['bismark', 'cgmap', 'bedgraph', 'coverage', 'binom'])[source]

Class for writing reports in specific methylation report format.

Parameters:
  • file – Path where the file will be written.

  • report_type – Type of the methylation report. Possible types: “bismark”, “cgmap”, “bedgraph”, “coverage”, “binom”

Methods

__init__

close

This method should be called after writing all data, when writer is called without with context manager.

open

This method should be called before writing data, when writer is called without with context manager.

write

Method for writing batch to the report file.

close()[source]

This method should be called after writing all data, when writer is called without with context manager.

open()[source]

This method should be called before writing data, when writer is called without with context manager.

write(universal_batch: UniversalBatch)[source]

Method for writing batch to the report file.