I'm looking to generate data based on the DNA composition of a region of my genomes (data is incomplete genomes from HiSeq runs in fasta format). I'm looking for software which will give me sliding windows for GC content, GC skew, codon bias etc. I would like to use something which I can use with or plug into R.


1 Answer 1


There are more R packages available that calculate GC content, for example Ape's GC.content() function.

For example:

> library(ape)
> data(woodmouse)
> GC.content(woodmouse)
[1] 0.3873347

With a sliding window is in Biostrings package.

> library(Biostrings) 
> letterFrequencyInSlidingView(DNA, view.width=4,letters="CG")

For codon usage bias, I think cubfits or sscu packages might be useful.

  • $\begingroup$ Could you please edit your question and give an example of how the OP can use this package, what kind of results it would return, the type of input data etc? As it stands, this is more of a comment than an answer. $\endgroup$
    – terdon
    Commented Aug 10, 2017 at 10:18
  • $\begingroup$ According to ape gc.content will only give a percentage. I'm looking for the overall distribution. $\endgroup$
    – AudileF
    Commented Aug 10, 2017 at 10:23
  • $\begingroup$ The definition of GC content is a percentage. $\endgroup$
    – benn
    Commented Aug 10, 2017 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.