This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to open bedgraph file in bedGraphtoBigWig

Hello,

I'm a RNA-seq novice trying to convert bedgraph files to BigWig files using bedGraphtoBigWig.

I installed and opened it already, but not sure how to open the local bedgraph files in my computer using the tool. Can anyone help? Thanks!

-Haiqi

rna-seq

That is a utility program that converts bedgraph format files to bigwig. I assume you are trying to do that conversion. Take a look at this tutorial to do the conversion.

I installed and opened it already

I will state the obvious just to make sure that there is not a misunderstanding here : programs like bedGraphtoBigWig do not really "open" (like by double-clicking on it). Instead, you need to run the program from a UNIX shell.

What do you mean by "opened it" ?

1 answer

Here is the help shown when running bedGraphToBigWig:

bedGraphToBigWig v 4 - Convert a bedGraph file to bigWig format.

usage:

   bedGraphToBigWig in.bedGraph chrom.sizes out.bw

where in.bedGraph is a four column file in the format:

      <chrom> <start> <end> <value>

and chrom.sizes is a two-column file/URL: 

     <chromosome name=""> <size in="" bases="">

and out.bw is the output indexed big wig file.

If the assembly <db> is hosted by UCSC, chrom.sizes can be a URL like

 http://hgdownload.cse.ucsc.edu/goldenPath/<db>/bigZips/<db>.chrom.sizes

or you may use the script fetchChromSizes to download the chrom.sizes file.

If not hosted by UCSC, a chrom.sizes file can be generated by running
twoBitInfo on the assembly .2bit file.

The input bedGraph file must be sorted, use the unix sort command:

    sort -k1,1 -k2,2n unsorted.bedGraph > sorted.bedGraph

options:

   -blockSize=N - Number of items to bundle in r-tree.  Default 256
   -itemsPerSlot=N - Number of data points bundled at lowest level. Default 1024
   -unc - If set, do not use compression.

Log in to answer this question.