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 ;-) ).
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.