I have matrix file which is basically a spearman correlation matrix between genes across various cell type. So now Im trying to find out which set of genes or group of genes whose correlation value is lets say greater than 0.6 if I set that as my threshold. How can I do that? I'm posting a subset of my data. It's a 502 x 502 matrix.
ACTL6B ACTR5 ACTR6
ACTL6B 1 0.6 -0.4
ACTR5 0.4 1 -0.3
ACTR6 -0.4 -0.3 1
So I don't want correlation between same set of genes which would be 1. I want other comparison. Like, lets say, ACTL6B and ACTR5 whose correlation is 0.6. I would like to keep those values and genes.
Any help or suggestion would be highly appreciated
This is not a bioinformatics question but rather an R programming question. Anyway try something along the line of
but next time post on StackOverflow.
Solution provided above by Jean-Karim Heriche is better and shorter :)
+1. Sorry, I missed it in the first instance.