Correcting p-values in all vs all correlations My question is similar to this other one, but I would like to know if it is possible to correct the p-values for multiple testing (and how). 
I have a large 42 gene expression values which are correlated with 25 clinical variables. So I end with a matrix of  42x25 correlations coefficients and p-values. It is possible to correct the p-values for the multiple comparisons done? 
My understanding is that the FDR id for family wise corrections and in that case I have tested each gene with 25 clinical variables, but at the same time I have tested each clinical variables with 45 genes. In this case if I use p.adjust from R which n should I set? If I left is as default it corrects for more test than what I have done, I can select either 45 or 25, but I don't have any special reasoning except that selecting 45 would be more conservative (although not as conservative as setting it to n=45*25). 
 A: The biggest problem you have is that your analysis of pairwise correlations could severely limit your ability to understand the underlying issues. Seldom in biomedical research does one variable depend on exactly one other without influences from any of the rest. Yet that is all your pairwise correlations will illustrate. Also, if you have RNAseq data you presumably have information on expression of about 20,000 genes, not just 45. It might not be wise to throw out the information about the other 19,955. In terms of your intended applications, it is seldom true that a drug will affect expression of only a single gene, and altering/curing a clinical phenotype will similarly affect expression of hundreds of genes.
There is a large and well developed set of methods for assessing the relations of biologic phenotypes with large-scale gene-expression data, dating back to the dark ages of microarray methods. For binary phenotypes, Gene Set Expression Analysis (GSEA),  in the nearly 15 years since its introduction, has received a large amount of attention with respect to statistical significance testing in terms of FDR and FWER. For relations of continuous biologic variables or survival data to gene expression, LASSO, ridge regression, or their combination in elastic net can be very useful, with many questions about those approaches answered on this site.
If you for some reason need to restrict analysis to these 45 genes, consider multiple-predictor rather than pairwise approaches. For example, set up a separate model for each of your 25 phenotypes with all 45 genes considered as predictors in a linear or logistic regression or another model structure appropriate to the nature of the phenotype. Apply your favorite FDR or FWER criterion to the set of 25 models and their overall p-values to restrict false-positive models/phenotypes. Then focus on validating the models of the phenotypes that pass that first testing hurdle.
I understand that this doesn't address the question that you asked, but sometimes on this site the best solution to the underlying problem is to suggest a different approach rather than to answer the question as posed.
A: There are many lines of reasoning one could take with this type of analysis. What makes a "family of tests" is vague, and for good reason! In some cases, a "family" can be grouped in terms of tests with a common regressor or exposure. In other cases, a "family" can be grouped in terms of tests with a common outcome. I think you are right in saying it does not make sense to consider all $25 \times 45$ tests as having equal bearing to each other. 
Methods for multiple testing control either family wise error rate (FWER) or false discovery rate (FDR). FWER corrects the significance level of each test. FDR ranks tests by their statistical significance and adjusts for the overall number of statistically significant findings. Each has its plusses and minuses.
Joining the statistical reasoning with the medical/clinical application is the key here. One question you might ask: who is the audience and what will they do with this information? If they are geneticists, they may be keen to know the impact of a single gene on any number of clinical variables. I think of the apo-e allele and its overarching impact on cardiovascular health. On the other hand, clinicians may be interested in knowing if one or more genes is associated with a certain trait so that, e.g.  they can use family history or risk counseling to assess the patient's capacity to manage exposure through noninvasive means.
Unfortunately, I think that's the best I can answer with the information given. There's some detail about experimental design, which is important, but the choice of FWER/FDR control and what make a family of tests boils down to the study's purpose.
