quantify signal in a chromosomal interval in different .bw files
5
0
Entering edit mode
8.0 years ago
nibhelim • 0

hi there,

I have several bigwig files that have been normalized. is there a way to obtain the value for the signal present in a certain chromosomal interval?

I just want to get a value of the total signal between 2 chromosomal coordinates, and possibly do that for several intervals.

ChIP-Seq bw bigwig • 4.4k views
ADD COMMENT
2
Entering edit mode
8.0 years ago

One way:

Convert bigWig to Bedgraph:

$ bigWigToBedGraph signal.bw signal.bedgraph

Convert Bedgraph to BED:

$ awk '{ \
    if ($1 ~ /^chr/) { \
        print $1"\t"$2"\t"$3"\tid-"NR"\t"$4; \
    } \
}' signal.bedgraph > signal.bed

Get the total or summed signal over the region-of-interest via BEDOPS bedmap --sum:

$ echo -e "chrN\t1234\t2345" | bedmap --echo --sum - signal.bed > answer.bed

Other statistical operations are available; see bedmap --help.

If you have multiple regions of interest, you can put them into one BED file and do the map step on that file:

$ bedmap --echo --sum regions-of-interest.bed signal.bed > answer.bed
ADD COMMENT
1
Entering edit mode
8.0 years ago
Kamil ★ 2.3k

bigWigToBedGraph

Download bigWigToBedGraph from: http://hgdownload.cse.ucsc.edu/admin/exe/

You can pass genomic coordinates like this:

$ bigWigToBedGraph -chrom=chr1 -start=123 -end=456 input.bw output.bedGraph

bwtool

Ming Tang suggests trying bwtool. For example, have a look at the summary function. I haven't tried this tool, but it looks promising.

ADD COMMENT
1
Entering edit mode
8.0 years ago
Ming Tommy Tang ★ 3.9k

check bw-python https://github.com/brentp/bw-python

ADD COMMENT
0
Entering edit mode
8.0 years ago
jotan ★ 1.3k

Deeptools bigwigCompare would probably do the trick.

ADD COMMENT
0
Entering edit mode
8.0 years ago
nibhelim • 0

can you tell me how you do it?

ADD COMMENT

Login before adding your answer.

Traffic: 2478 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6