Question: How do I make a bigwig file from a matrix of counts?
0
gravatar for endrebak
3.0 years ago by
endrebak740
endrebak740 wrote:

Let us say I have a matrix of counts like so

chr1_10000_10199 32
chr1_10200_10400 49
...

How do I most easily convert it into a bigwig format file ?

My intention is to be able to view the data above in the genome browser.

chip-seq • 1.2k views
ADD COMMENTlink modified 3.0 years ago by dariober10.0k • written 3.0 years ago by endrebak740
1

Converstion of BED with scores into bigWig

ADD REPLYlink written 3.0 years ago by genomax65k
3
gravatar for Devon Ryan
3.0 years ago by
Devon Ryan89k
Freiburg, Germany
Devon Ryan89k wrote:

sed -e "s/_/\t/g" -e "s/ /\t/g" input.txt > output.bedGraph Then you can use bedgraphToBigWig.

ADD COMMENTlink written 3.0 years ago by Devon Ryan89k
2
gravatar for dariober
3.0 years ago by
dariober10.0k
WCIP | Glasgow | UK
dariober10.0k wrote:

You can convert your input to bedgraph first then use bedGraphToBigWig from ucsc/utilities E.g., not tested:

sed 's/_/\t/g' matrix.txt | sort -k1,1 -k2,2n > matrix.bedGraph
bedGraphToBigWig matrix.bedGraph chromSizes.txt matrix.bw

(Assuming that the space between "chr1_10000_10199" and "32" is TAB, otherwise, replace space with tab also)

ADD COMMENTlink written 3.0 years ago by dariober10.0k
Please log in to add an answer.

Help
Access

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