.SGR to BigWig

186 views
Skip to first unread message

Jerome Korzelius

unread,
Feb 9, 2018, 11:13:37 AM2/9/18
to gen...@soe.ucsc.edu
Hi there,

I have a dataset comprised of .sgr files and I would like to convert them into a BigWig (or similar) graphical display in the UCSC browsor or IGV. Is there any quick way to do this? I’ve been Googling quite a bit and I can’t seem to find anything on it. Please advise?
Many thanks in advance!

Best wishes
Jerome

Jerome Korzelius, PhD
Post-Doctoral Fellow AG Jasper
Leibniz-Institut für Alternsforschung - Fritz-Lipmann-Institut e.V. (FLI) 
Beutenbergstraße 11
07745 Jena                            

Telefon:     +49(0)3641-65-6811
E-Mail:        Jerome.K...@leibniz-fli.de 
WWW:        http://www.leibniz-fli.de/research/associated-research-groups/jasper/




Matthew Speir

unread,
Feb 12, 2018, 4:37:45 PM2/12/18
to Jerome Korzelius, gen...@soe.ucsc.edu
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
--

---
You received this message because you are subscribed to the Google Groups "UCSC Genome Browser Public Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome+un...@soe.ucsc.edu.
To post to this group, send email to gen...@soe.ucsc.edu.
Visit this group at https://groups.google.com/a/soe.ucsc.edu/group/genome/.
To view this discussion on the web visit https://groups.google.com/a/soe.ucsc.edu/d/msgid/genome/9858E61E-088E-49DD-BFA9-E850A2039E74%40leibniz-fli.de.
For more options, visit https://groups.google.com/a/soe.ucsc.edu/d/optout.

Reply all
Reply to author
Forward
0 new messages