This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Creating a bedgraph

Hello, I have a file in bed format (chr, start, stop) and also a value associated with each peak. I would like to scale my peaks by the assigned value when viewing them in IGV. I was told bedgraph was the way to do this. I currently can get the peaks to appear in IGV but they have the values listed on them rather than being scaled by the values.

Here is the head of my data:

track type=bedGraph visibility=full color=200,100,0 altColor=0,100,200
chr1    3194229 3194770 0.820725192760532
chr1    3322147 3322363 3.40485219484551
chr1    3359127 3359401 1.19925752671024
chr1    3360854 3361302 1.71199532834814
chr1    3372567 3373354 4.32663857651088
chr1    3395581 3395814 0.375395500099934
chr1    3429439 3429702 5.58078390994333
chr1    3447229 3447693 1.39031988778784
chr1    3449335 3449914 2.08738145068814

I referenced USC here when formatting: http://genome.ucsc.edu/goldenPath/help/bedgraph.html

atac-seq

Changing the extension worked. Thanks!

1 answer

What you have is already a bedGraph. bedGraph is a BED-file (so chr-start-end) with a 4th numeric column that represents any metric associated with the interval, be it read count, a p-value, an enrichment etc. What is the file extension you have on that file? IGV recognizes them. If this is simply .bed then column4 is interpreted as a name field and printed in the track. I suggest you rename into .bedGraph or even better, make a bigwig file from the bedGraph which is a binary compressed file that is smaller and easier to load. See e.g. bedGraphToBigWig.

Changing the extension worked. Thanks

Log in to answer this question.