I would suggest using bedtools makewindows
and bedtools nuc
to compute the GC content for genomic windows as shown in Fig 2 of the linked paper.
See related question here.
This will slice the genome into 5Kbp (or whatever size specified to makewindows
) pieces and compute the GC content of each piece, which can be plotted as a distribution as in the figure.
Something like this would work for the 5000 bp example:
# assemble a bedtools compatible genome file:
# see https://www.biostars.org/p/70795/ for hints how to do this.
bedtools makewindows -w 5000 -g my_genome.genome > windows.bed # you just made this .genome file manually
bedtools nuc -bed windows.bed -fi my_genome.fasta > windows_gc.bed
The bed output file will contain the GC content of each window in the 7_pct_gc
column (according to my understanding of the output file).