dinucleotideFrequencyTest(x, i, j, test = c("chisq", "G", "adjG"), simulate.p.value = FALSE, B = 2000)
"chisq"
(Person's chi-squared test), "G"
(G-test), or
"adjG"
(William's corrected G-test). See Details section.
i
and j
are independent
Let O and E be the observed and expected probabilities for base pair
combinations at positions i
and j
respectively. Then the
test statistics are calculated as:
test="chisq"
:
test="G"
:
test="adjG"
:
Under the null hypothesis, these test statistics are approximately distributed chi-squared(df = ((distinct bases at i) - 1) * ((distinct bases at j) - 1)).
Sokal, R.R., Rohlf, F.J. (2003) "Biometry: The Principle and Practice of Statistics in Biological Research", W.H. Freeman and Company, New York.
Tomovic, A., Oakeley, E. (2007) "Position dependencies in transcription factor binding sites", Bioinformatics, 23, 933-941.
Williams, D.A. (1976) "Improved Likelihood ratio tests for complete contingency tables", Biometrika, 63, 33-37.
nucleotideFrequencyAt
,
XStringSet-class,
chisq.test
data(HNF4alpha)
dinucleotideFrequencyTest(HNF4alpha, 1, 2)
dinucleotideFrequencyTest(HNF4alpha, 1, 2, test = "G")
dinucleotideFrequencyTest(HNF4alpha, 1, 2, test = "adjG")
Run the code above in your browser using DataLab