BigWig Manipulation


bigWigMerge .. out.bedGraph


This tool is part of UCSC Genome Browser's utilities.

bigWigMerge merge bigWig files by adding together the signal values.


  • -threshold=0.N: don't output values at or below this threshold. Default is 0.0
  • -adjust=0.N: add adjustment to each value
  • -clip=NNN.N: values higher than this are clipped to this value


After running this command, you will have to run bedGraphToBigWig to make the output bigWig.

If there are negative values in any of your bigWig files, bigWigMerge will ignore these loci with non-positive values. To avoid this behavior, you need to set -threshold=-10000.0 (replace -10000.0 with a value you think is smaller than the smallest value in your file). One caveat is that loci with no signal will also be dumped; if you want to remove these records, consider using awk to do a quick filtering. Alternatively, you can use wiggletools sum to merge bigwig files, which directly handles negative values.

# first use bigWigMerge to merge files
# remember to override the default value of -threshold to a negative number
bigWigMerge -threshold=-10000.0

# use awk to remove loci with 0 signal
awk 'BEGIN{FS="\t"}{if ($4!=0) print $0}' >


Share your experience or ask a question