This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Correlation between gene of interest and gene list (module)

Hi,

I want to use expression datasets from TGCA to determine if there is a correlation between my gene of interest and a specific gene list (containing 40-50 different genes). Here's an example of such a expression dataset (although in reality with many more columns and rows)

      Gene    Sample1   Sample2   Sample3   Sample4
1    A    22.1470  171.2680   20.9980    6.4587
2    B   220.9870  100.6290  174.0080  151.4630
3    C     2.4178   10.1597    0.7311    1.7212
4    D   177.4080  371.3640  295.6750  127.4830
5    E 15911.5000 1494.3300 1333.5700 2424.2600
6    F     0.4836    0.4838   36.5564    6.8847
7    G   118.9560   22.2545   16.0848   75.7315
8    H     0.0000    0.4838    0.0000    0.4303

So for example I want to calculate the correlation of gene A with module1 containing genes D, E, F, H. How would I do this, for example in R?

Any help would be highly appreciated!

r rna-seq

Subset the TCGA expression for your gene of interest and then find out the correlation.

df <- read.table(file = "TCGA.expression.data.tsv", header = T, sep = "\t", row.names = 1)
cor(t(df[c("A", "D", "E", "F", "H"),]))

1 answer

Thank you very much, works perfectly!!

Log in to answer this question.