This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Total CpG genome count

Hiya, I'm trying to get a total count of all CpGs present in a non-model organism genome. I have used bam2nuc in bismark to count dinucleotides - am I correct in thinking the count of CGs will be the total CpG count of the genome?

Best wishes,

Rebekh

rrbs bismark methylation cpg

Couldn't you also count GCs nucleotides as it will be a CpG on the reverse strand ?

I was meaning more is the programme suitable for this

A GC is a GC on the other strand, not a CpG.

Cheers :) I'll give the C program a go!

Hello rebekah_321,

Don't forget to follow up on your threads.

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.

Upvote|Bookmark|Accept

I tried emboss - but doesn't it just report CpG islands?

Yes I have used emboss to predict CpG islands - now I want all CpGs not just islands

Yes I have used emboss to predict CpG islands - now I want all CpGs not just islands

If you want to count only CGs from fasta (nt) in R:

library (Biostrings)
data(yeastSEQCHR1)
yeast1 <- DNAString(yeastSEQCHR1)
dinucleotideFrequency(yeast1)['CG']
 CG 
7089

in python:

s = 'ATATTGCGAAAGAACGTAATTTTATCGAAAAATCGATGTcgcgcg'
print(s.upper().count("CG"))

7

0 answers

No answers yet.

Log in to answer this question.