bigWigAverageOverBed, mean == mean0

23 views
Skip to first unread message

Jinrui Xu

unread,
Jan 9, 2023, 12:43:56 PM1/9/23
to gen...@soe.ucsc.edu
Hello,

I am a user of bigWigAverageOverBed. For my data, it always generates equal mean and mean0, no matter how I modify genomic regions in the bed file. Is this a bug or how can I fix this it?
Thanks very much!

Jinrui

Jinrui Xu

unread,
Jan 9, 2023, 12:44:57 PM1/9/23
to gen...@soe.ucsc.edu
A bit more detail is that (1) there are indeed genomic regions without any bigWig signals; (2) I enlarged several genomic regions with bigWig signals to an extreme, but bigWigAverageOverBed still reports that the whole regions are covered by bigWig signals, and thus mean = mean0.
The bigWig file I use contains fold changes between histone modification signals and control signals.
Thanks.
Jinrui

Jairo Navarro Gonzalez

unread,
Jan 10, 2023, 7:56:02 PM1/10/23
to Jinrui Xu, gen...@soe.ucsc.edu

Hello,

Thank you for using the UCSC Genome Browser and sending your inquiry.

To better help debug your issues, could you send us a URL to the bigWig file you are using on the Genome Browser? If the file contains sensitive information, you can send the URL to genom...@soe.ucsc.edu or directly to me.

I hope this is helpful. If you have any further questions, please reply to gen...@soe.ucsc.edu.
All messages sent to that address are archived on a publicly accessible Google Groups forum.
If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Jairo Navarro

UCSC Genome Browser


--

---
You received this message because you are subscribed to the Google Groups "UCSC Genome Browser Public Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome+un...@soe.ucsc.edu.
To view this discussion on the web visit https://groups.google.com/a/soe.ucsc.edu/d/msgid/genome/CAGzk_hMFbs%2BWeAEAfHZ2%3D%3Dv6da25pgCQLR-iERs-5cL696BtiA%40mail.gmail.com.

Jinrui Xu

unread,
Jan 12, 2023, 12:53:10 PM1/12/23
to Jairo Navarro Gonzalez, gen...@soe.ucsc.edu
Hi Jairo,

Actually, I tried five bigWig files from ENCODE. They all have problematic results.
Thanks a lot!

Best,
Jinrui


Jinrui Xu

unread,
Jan 18, 2023, 12:05:12 PM1/18/23
to Jairo Navarro Gonzalez, gen...@soe.ucsc.edu
Hi Jairo,

I am wondering whether you got time to look into this weird result. I guess there may be a bug in the code or the ENCODE data is problematic, e.g., every nucleotide site has a very small signal. Thanks.

Best,
Jinrui

Jinrui Xu

unread,
Jan 23, 2023, 12:24:33 PM1/23/23
to Jairo Navarro Gonzalez, gen...@soe.ucsc.edu
Hi Jairo,

Could you let me know whether I use bigWigAverageOverBed wrong or the program needs an update or the bigWig file is problematic? 
Thanks!

Jinrui

Gerardo Perez

unread,
Jan 26, 2023, 12:11:29 PM1/26/23
to Jinrui Xu, gen...@soe.ucsc.edu

Hello, Jinrui.

We apologize for the delay in our response. We were able to replicate your issue and have created an internal ticket to fix the bigWigAverageOverBed output. Unfortunately, we cannot provide an estimated release date for the fix.

Thank you again for bringing this to our attention. If you would like email updates about the UCSC Genome Browser, you can subscribe to our Announcements Mailing List:

If you have any further questions, please reply to gen...@soe.ucsc.edu. All messages sent to that address are archived on a publicly-accessible Google Groups forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Gerardo Perez
UCSC Genomics Institute


Jinrui Xu

unread,
Jan 26, 2023, 12:53:43 PM1/26/23
to Gerardo Perez, gen...@soe.ucsc.edu
Hi Gerardo,

Is it due to a bug in the program or because the data is special? 
I kinda need the correct results for my project so if I may fix the latter case.

Jinrui 

Gerardo Perez

unread,
Jan 27, 2023, 2:56:31 PM1/27/23
to Jinrui Xu, gen...@soe.ucsc.edu

Hello, Jinrui.

We took a look at the bigWigAverageOverBed utility, and we did see the same behavior using a different dataset. This has led to some ongoing internal discussions and we haven't yet reached a consensus about it. We will try to get back to you next week.

We apologize for any inconvenience this may have caused.

I hope this is helpful. If you have any further questions, please reply to gen...@soe.ucsc.edu. All messages sent to that address are archived on a publicly-accessible Google Groups forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Gerardo Perez
UCSC Genomics Institute

Jinrui Xu

unread,
Jan 27, 2023, 4:00:46 PM1/27/23
to Gerardo Perez, mhae...@ucsc.edu, gen...@soe.ucsc.edu
Hi Gerardo,

Thanks for the update. 
I also tried to install bwtools and wiggletools but failed with my hpc, so it would be great if you could fix bigWigAverage program. 
Thanks again!

Jinrui


Jairo Navarro Gonzalez

unread,
Feb 17, 2023, 7:00:20 PM2/17/23
to Jinrui Xu, Gerardo Perez, mhae...@ucsc.edu, gen...@soe.ucsc.edu

Hello,

Thank you for using the UCSC Genome Browser and sending your inquiry.

For many files, mean and mean0 will be the same. For example, if the bigWig file has no undefined regions, then mean0 will be the same as the mean. This may be the case for ENCODE files, as these are coverage files, and their pipeline looks at the entire genome.

Looking at ENCFF469WVA.bigWig referenced above, it generally doesn't have missing data, so in general, mean0 should always equal mean. Most of the "missing data" is filled with zeroes, which isn't considered missing by the tool.

As an example that the tool is working as intended:

$ echo 'chr21 0 1000000 1.0' > test.bedgraph
$ bedGraphToBigWig test.bedgraph /hive/data/genomes/hg38/chrom.sizes test.bw
$ echo 'chr21 0 46709983 wholeChrom' > test2.bed
$ bigWigAverageOverBed test.bw test2.bed stdout

wholeChrom 46709983 1000000 1e+06 0.0214087 1

In the defined region, the mean is 1, but if you take the entire chromosome, the mean is 0.0214087.

I hope this is helpful. If you have any further questions, please reply to gen...@soe.ucsc.edu.
All messages sent to that address are archived on a publicly accessible Google Groups forum.
If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Jairo Navarro

UCSC Genome Browser

Reply all
Reply to author
Forward
0 new messages