It is actually the other way round. Very short: The first step is that you must determine what you want to know, and choose your variables accordingly. These variables and their expected values then determine the necessary sample size. If you compare groups, you must also set the p-value (usually 5 %) and the statistical power of your study (usually 10 %). This, together with the expected minimum difference between the groups will also affect sample size. There are free calculators on the internet for determining sample size.
Pharmacogenetic studies identify the genetic factors that influence the intersubject variation in drug response.
To determine sample size in pharmacogenetic studies. Simple closed form solutions for the sample size are derived for continuous and binary outcomes.
To extend the application to pharmacogenomic studies, where a large number of gene-treatment interactions are evaluated simultaneously, advocate the use of false discovery rate in controlling false positive proportion.
To facilitate adjustment for correlation among multiple tests for better control of false positives and power.
Refer: Shaoand Tseng et al publication in the year 2007
The article by Gonzalez-Vacarezza gives an equation for sample size calculation in pharmacogenomic case. Let CVw = intra-individual variability which is defined as:
(1) CVw = 100(SQRT(eMSE - 1))
From this definition, the sample size is determined by:
(2) N > [2(CVw / 0.20)2] (ta/2, N-2 + tB, N-2)2
... where N = sample size and t refers to the critical t-value at degree of freedom N - 2; a = alpha and B = beta.
See also the attached article by Rao. Rao's approach takes a different perspective via sensitivity calculation and distribution analysis, i.e. Mahanalobis distance.