Change Span Size In Wig And Generate New File
1
2
Entering edit mode
13.2 years ago

Hi there,

I have downloaded a GC content wig file from UCSC which is very large and has a span of 2base/line.

Is there a command in Kent's toolkit (or any other) to generate a new wig with a different span on the fly?

eg from 2base span to a 100base window with averaged GC content value for the window. This would make my file many times smaller (I know I would loose info though ;-) ).

Thanks for suggestions! Stephane

ucsc wiggle conversion • 3.9k views
ADD COMMENT
0
Entering edit mode
12.0 years ago

Hi, Is it fixed step or variable step. If you just wanna visualized can you just convert it to bigWig which is extremely compact and doesn't loads the UCSC as well but to have it working you need a webserver to place the file. From the export.wig()function of rtracklayer package

For both fixed and variable step, the span (or width) is specified in the header and thus must be the same across all features. This requirement of uniform width dramatically limits the applicability of WIG. For scored features of variable width, consider BEDGraph or BigWig, which is generally preferred over both WIG and BEDGraph.

Check this tutorial on how to do it. If you dont have a webserver, then just convert it to bigWig and use the utility bigWigToBedGraph to convert it to bedGraph which is better and compact than wig.

You can also used pyicos oonvert utility to convert and cross-convert between bed and wig (bedwiggle, variablewiggle). Check this for wiggle bed to variable bed using shell script.

Cheers

ADD COMMENT

Login before adding your answer.

Traffic: 2009 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6