I want to plot the GC content along a genome contig. And since it's not possible to estimate percentage or fractions of a single position I need to use some sort of window along the contig to estimate. I found this page which uses
bedtools makewindows and
bedtools nuc to estimate the GC-content in 1000 bp, non-overlapping windows.
In order to get a gc-content number for every nucleotide on the contig I added the option
-s 1 in
bedtools makewindows to shift the windows one nucleotide each time. And then I calculated the gc content of each window using
bedtools nuc. I was thinking that the gc content of the first window could represent the gc content of the first nucleotide, and so on. But this means that the nucleotide which is the first in each window gets the gc content of the entire window?
Any thoughts on this? Or suggestions on how to better visualize the gc content along a contig?