Category

BigWig Manipulation


Usage

bigWigMerge in1.bw in2.bw .. inN.bw out.bedGraph


Manual

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

bigWigMerge merge bigWig files by adding together the signal values.

Options

  • -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

Note

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 file1_with_negative_values.bw file2_with_negative_values.bw merged.bg

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

 


Share your experience or ask a question