This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Calculation of CpG ratio within X nucleotides

Hello again,

I need to calculate the CpG ratio within certain DNA sequences in order to correlate them with several properties and for different other reasons. Can somebody explain me how this is done for the following artificial example sequence?

ATGCGTGCAGTGATCGCGATTTA
  ^^^ ^^ ^ ^  ^^^^

As far as I understand, the GC-basepair ratio is the number of C's + G's divided by the length of the above sequence. In the example we have:

  • Seq-length: 23
  • Number of C's: 4
  • Number of G's: 7

If the definition I found for GC content is correct, then in the above example the GC content would be:

  • (4+7) / 23 = 47,83% (rounded value).

How is the CpG ratio defined? I am not searching for CpG islands.

Best regards

cpg

1 answer

For this, only need to know what a CpG is. You would want the percentage of bases in CpGs.

So for the above example:

ATGCGTGCAGTGATCGCGATTTA
___^^_________^^^^

would it be 6/23 bases --> 26,08%?

Best regards

Log in to answer this question.