Question: AF comparison between two population.
0
gravatar for always_learning
7 months ago by
Doha, Qatar
always_learning960 wrote:

Hi,

I have Allele Frequenct frequency data for Population A and I wanted to compare this with Population B. Below is the script that I wrote for Chi Square test between AF for these two population.


library("dplyr") 

input = fread("GENE_PANEL_MUTATION.tsv", sep = "\t") inputTtest = filter(input, !complete.cases(gnomadWGS_AF, new_AF))

inputTtest = input %>% select(gnomadWGS_AF,new_AF) %>%
        filter(complete.cases("NA")) %>%
        na.omit() %>%
        filter(!is.na(as.numeric(gnomadWGS_AF)))


inputTtest$gnomadWGS_AF=as.numeric(inputTtest$gnomadWGS_AF) inputTtest$new_AF=as.numeric(inputTtest$new_AF)

chisq <- function(a,b){   data <- matrix(c(a,b),ncol=2)   mode(data) = "numeric"   print (data)   c(p = chisq.test(data)$p.value,
    OR = chisq.test(data)$estimate) }


inputTtest %>%   rowwise() %>%   mutate(p=chisq(gnomadWGS_AF,new_AF)[[1]])

I am not getting any significant P-value while I can see that I have SNP's where frequencies are significantly different between both populations. Can someone help me with this? Which test I should apply?

af r statistical test • 243 views
ADD COMMENTlink written 7 months ago by always_learning960
1

Please provide example data. You might be inspired by How to ask good questions in technical and scientifc forums.

ADD REPLYlink written 7 months ago by ATpoint15k

What is not clear in my Question?

ADD REPLYlink written 7 months ago by always_learning960

Please provide example data.

ADD REPLYlink written 7 months ago by WouterDeCoster38k

Please find dropbox link for example file. https://www.dropbox.com/s/1gjnoh1ft6k0aat/example.txt?dl=0

ADD REPLYlink written 7 months ago by always_learning960

Please find dropbox link for example data.

https://www.dropbox.com/s/1gjnoh1ft6k0aat/example.txt?dl=0

ADD REPLYlink written 7 months ago by always_learning960

Do the Chi Square test. While you're at it, calculate the OR, confidence intervals, and Z-score, too: A: SNP dataset and Z Score

ADD REPLYlink written 7 months ago by Kevin Blighe41k

Thanks !! But I have just frequencies !! So I don't think that I can do similar to that.

ADD REPLYlink written 7 months ago by always_learning960
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1084 users visited in the last hour