Hi Jerome,
Thank you for your question about converting files in SGR format to
bigWig.
From what I understand, the SGR format consists of three columns:
1. Chromosome name
2. Chromosome position
3. Score
And some example lines might look like so:
chrX 100000 1.23
chrX 100010 2.53
chrX 100020 0.27
You will need to first convert your SGR files to bedGraph and then
from bedGraph to bigWig. We do not have scripts that will convert
SGR to bedGraph for you, but it should be easy to write a short
script that will do this for you. Here is an example SGR line:
chr1 100 1.55
And here is what that same line would look like in bedGraph format:
chr1 99 100 1.55
You may find the small bit of Perl code on this genomewiki page
useful for the SGR to bedGraph conversion:
http://genomewiki.ucsc.edu/index.php/ABRF2010_Tutorial#Transforming_.sgr_into_bedGraph_for_Genome_Browser_viewing,
however, we now recommend that you convert your files to bigWig
before viewing them in the UCSC Genome Browser. Note that bedGraph,
much like BED, is 0-based start, 1-based end. In short, this means
that the position in column 2 should be one less than the actual
position you want to score. You can read more about this system on
our blog:
http://genome.ucsc.edu/blog/the-ucsc-genome-browser-coordinate-counting-systems/.
Once you have your bedGraph files, you can use our bedGraphToBigWig
utility to convert your files to bigWig format. You can download the
utility from our download server here:
http://hgdownload.soe.ucsc.edu/admin/exe/. This utility requires a
"chrom.sizes" file that can also be found on our downloads server,
http://hgdownload.soe.ucsc.edu/downloads.html, under the "Full data
set" link for each assembly.
I hope this is helpful. If you have any further questions, please
reply to
gen...@soe.ucsc.edu. All messages sent to that address are
archived on a publicly-accessible Google Groups forum. If your
question includes sensitive data, you may send it instead to
genom...@soe.ucsc.edu.
Matthew Speir
UCSC Genome Bioinformatics Group
Training videos & resources:
http://genome.ucsc.edu/training/index.html
Want to share the Browser with colleagues?
Host a workshop:
http://bit.ly/ucscTraining