This is a test version of Biostars. For the public version, visit https://www.biostars.org.
gene expression correlation analysis

Hi every one,

I use Hmisc package to calculate the correlation, my input file is expression matrix, (gene names in row and samples in the column), the result of the analysis contains 4 columns, (two columns are the name of the genes, a cor column, and p-value column). When the repetitions of each group are less than 4, I encounter the following error:

Error in rcorr(control) : must have >4 observations

My study groups have two replications, are there any method or package that output file similar to the Hmisc package? Thanks a lot.

r

1 answer

rcorr computes correlations between the columns of the input matrix so if your genes are in rows and samples in columns, you're computing the correlations between samples. As for the error, you're getting it because although it is possible to compute a correlation with fewer values, it doesn't make much sense. For n = 2, the correlation is either -1 or +1 (you can always draw a line between two points) and in general, for low n, it may make you think that a linear relation exists when there is none.

Log in to answer this question.