Convert pseudobulk coverage bedGraphs to bigWig
write_pseudobulk_bigwig.RdWraps the UCSC bedGraphToBigWig utility, writing the chrom.sizes file it
needs so the chromosome names match the coverage tracks.
Usage
write_pseudobulk_bigwig(
pb,
dir,
chrom_sizes,
executable = "bedGraphToBigWig",
keep_bedgraph = TRUE,
verbose = getOption("MarchR.verbose", FALSE)
)Arguments
- pb
(MarchRPseudobulk) Must already have run
write_pseudobulk_coverage().- dir
(character) Output directory. Files land in
<dir>/coverage/.- chrom_sizes
(data.frame or GRanges) Chromosome sizes with
chrandend.- executable
(character) Path or name of the converter. Default
"bedGraphToBigWig".- keep_bedgraph
(logical) Retain the source bedGraphs. Default
TRUE.- verbose
(logical) Print progress messages. Default
getOption("MarchR.verbose", FALSE).
Value
pb with a bigwig_path column added to its manifest, NA for any group
whose conversion was skipped or failed.
Details
Conversion is a soft dependency, kept out of
write_pseudobulk_coverage() so an absent binary cannot make coverage
writing look like it failed. When the executable is missing this warns, leaves
the bedGraphs in place, and returns, so the rest of the export still completes.