I wonder if you might be able to help with testing for heterogeneity (Cochran's q or I-squred) in meta-analysing genotypic odds ratios in two groups from two different genetic associations studies of the same phenotype. (This question pertains to genetics, but the principle, I believe, is generic).

The numbers that follow are for illustrative purposes:

In Group A, the effect of allele X on the phenotype is: odds ratio 1.07 (95% CI 1.01-1.14), N=4000 samples

In Group B, the effect of the same allele X on the phenotype is: odds ratio 1.10 (95% CI 1.05 1.08-1.12), N=20,000 samples

(I also have the effect sizes in the form of beta coefficients, standard errors and p-values).

I want to test for heterogeneity in the effect of allele X on the phenotype between groups A and B by calculating either Cochran's q or I-squared. I've scoured the internet for how to do this in R (or any other platform), and all the software that I've come across requires me to input the raw data, and I haven't found anything that can work out the heterogeneity based on the summary statistics that I have. Is it even possible?

Thank you very much for your advice.

B.