# Can I use chi-squared test of independence to compare base compositions of human genome?

I need to prove that a given region on the genome maintains has the same base composition proportions (20% A, 15% T, 19% C, etc…) of that genome. I thought about doing Chi-squared test of independence since I deal with exact counts. As a result, I found $p<0.05$ suggests that they are independent so I say the base composition was changed. I just wanted to get a review of my action.

mydf:
hg19      AR
A 854963149  705448
T 856055361  705519
G 593325228  482498
C 592966724  479646
N 239850802 2806685


chisq.test(mydf)

Pearson's Chi-squared test

data: mydf X-squared = 15718000, df = 4, p-value < 2.2e-16

Is this method valid ?

• Look at the data. Why are there so many Ns (presumably unknowns) particularly in the AR region? The actual genome is all TCGA, and Ns represent errors or technical difficulties in getting the correct sequence. Fix the data before you worry about how to analyze them. – EdM Mar 19 '17 at 12:57
• @EdM I did not create this data. Therefore, I dont think I can do anything with those Ns unfortunately. I used published reference genome hg19 based on genome.ucsc.edu/cgi-bin/hgGateway?db=hg19 – MorTunco Mar 19 '17 at 18:37