Exports a track or track expression to BigWig format by first creating a temporary bedGraph file and then converting it using bedGraphToBigWig (or wigToBigWig as a fallback).

gtrack.export_bigwig(track, file, intervals = NULL, iterator = NULL)

Arguments

track

track name or track expression (character string)

file

output file path (typically ending in .bw or .bigwig).

intervals

genomic intervals to export. If NULL (default), the entire genome (.misha$ALLGENOME) is used.

iterator

iterator bin size. If NULL (default), the iterator is determined automatically from the track expression.

Value

NULL (invisible). Called for its side effect of writing a file.

Details

This function requires the UCSC bedGraphToBigWig utility to be installed and available on the system PATH, or bundled with the misha package. If not found, the function will raise an error with installation instructions.

Examples

if (FALSE) { # \dontrun{
gdb.init_examples()

# Export to BigWig (requires bedGraphToBigWig)
gtrack.export_bigwig("dense_track", "/tmp/dense.bw")

# With specific region
gtrack.export_bigwig("dense_track", "/tmp/dense_chr1.bw",
    intervals = gintervals(1, 0, 1e6)
)
} # }