Question: Get percentile cutoff from bigwig files
gravatar for Bade
3.1 years ago by
United States
Bade40 wrote:

Hi Members,

I have bigwig files with genome-wide signal values. And I need to compute the Xth percentile of these signal values. Is there any tool that can compute signal percentiles directly from bigwig files? For Ex - I want to know the 95th percentile of all signal values in a bigwig file.

If not, what would be the best way to compute them? I do not have much experience with bigwig files or tools to analyze them, but I can program or parse files if required.



ADD COMMENTlink modified 3.1 years ago by Alex Reynolds28k • written 3.1 years ago by Bade40
gravatar for Alex Reynolds
3.1 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

Say you are working with hg19. You can:

  1. Use UCSC Kent tools bigWigToWig to convert bigWig to wig
  2. Use BEDOPS wig2bed to convert wig to BED
  3. Use BEDOPS bedmap to map hg19 chromosome extents to signal on a per-chromosome basis, using the --kth option to generate the desired percentile cutoff:

For example:

$ bigWigToWig signal.wig
$ wig2bed < signal.wig > signal.bed
$ bedmap --echo --kth 0.95 hg19.extents.bed signal.bed > answer.bed

It is the same principle for other genomes or builds: Replace hg19.extents.bed with a BEDOPS sort-bed-sorted BED file containing chromosome extents for other genomes or builds.

ADD COMMENTlink modified 3.1 years ago • written 3.1 years ago by Alex Reynolds28k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1113 users visited in the last hour