Is the output of bigWigSummary equivalent to the output of bigWigAverageOverBed

453 views
Skip to first unread message

Ian Yi-Feng Chang

unread,
Dec 20, 2012, 3:30:04 AM12/20/12
to gen...@soe.ucsc.edu
Dear All,
I met a problem when I applying bigWigSummary and bigWigAverageOverBed
to a big wig file.
The big wig file is composed of all CpG's methylation ratio.

chr1 468 469 0.5
chr1 470 471 0.7
...

And I want to extract the mean methylation ratio for a region, such as
chr1:1-5000.
So I used the two command to extract the ratios from big wig file.

command 1: bigWigSummary methylation.bw chr1 1 5000 1
command 2: echo "chr1 1 5000 1" | bigWigAverageOverBed methylation.bw
stdin stdout

For some regions, the outputs of commands 1 and 2 are the same
However, I found that some regions, the results are very different.

I did several calculation manually, I found that the outputs of
bigWigAverageOverBed are correct (for those inconsistant outputs).
Is it a bug for bigWigSummary or I cannot use bigWigSummary to extract
mean ratio in the way?

Thank you.

Ian Chang

Brian Raney

unread,
Jan 3, 2013, 4:55:06 PM1/3/13
to Ian Yi-Feng Chang, gen...@soe.ucsc.edu
Hello Ian Chang,

Thanks for your interest in the UCSC Genome Browser and our bigWig utilities.

I wonder if you could provide me with a URL to a bigWig file and a set of commands that illustrate this problem?  You can send it to just me, not cc'ing the list.   

Brian Raney
UCSC Genome Bioinformatics
> --
>
>
>

Brian Raney

unread,
Jan 9, 2013, 11:48:17 AM1/9/13
to Ian Yi-Feng Chang, gen...@soe.ucsc.edu
Hello Ian Chang,

As you've discovered, extracting summary information using bigWigSummary will not always give you an exact value the way that bigWigAverageOverBed will.   The reason for this is that the summary levels have some rounding error and some border conditions when extracting data over relatively small regions.   Since bigWigAverageOverBed uses the actual data, rather than the summary levels (which are designed for display not analysis), you should use it if you want the highest level of accuracy. 

Thank you for your interest in the UCSC Genome Browser.  If you have follow-up questions, please send them to gen...@soe.ucsc.edu

Brian Raney
UCSC Genome Bioinformatics
On Thu, Dec 20, 2012 at 12:30 AM, Ian Yi-Feng Chang <cif...@gmail.com> wrote:

Ian Chang

--




Reply all
Reply to author
Forward
0 new messages