I have a bedgraph file which I have loaded up into R and I am wanting to convert it to a wig file for further analysis. In R, my bedgraph file looks like this:
1 0
2 0
3 0
4 0
I am wanting to add the header variableStep chrom=1
as the first line. I then want to convert this bedgraph file to wig. Does anyone know how to do this?
I want my output file to look like this:
variableStep chrom=1
1 0
2 0
3 0
4 0