WGCNA and corAndPvalue
0
0
Entering edit mode
5.2 years ago
Sam ▴ 150

Hello

for gene-gene pearson correlation analysis with p-value I used this code but it gave me the correlation between samples.

any help about this?

correlation_pvalueDat1=corAndPvalue(data,method="pearson",use="p")

my data format :

Geneid  1-FPKM  2-FPKM  3-FPKM  1-T-GB3-FPKM    1-T-GM58-FPKM   1-T-MB43-FPKM   34-O-GB3-FPKM   34-O-GM58-FPKM  34-O-MB43-FPKM  34-T-GB3-FPKM   34-T-GM58-FPKM  34-T-MB43-FPKM
A00218.v2.0 0   0   0   0   0   0.090523725 0   0   0   0   0   0
A00223.v2.0 0   1.09881251  0   0   0.578112669 0.337275538 0.625452544 1.409278785 0.204600602 0   0.051926075 0
A00226.v2.0  0   0   0   0   0   0   0   0   0   0   0   0
WGCNA • 3.1k views
ADD COMMENT
0
Entering edit mode

Check this for Cor function

ADD REPLY
0
Entering edit mode

thanks for your reply but I need the gene/gene correlation, should I change my matrix?

ADD REPLY
0
Entering edit mode

Transpose your data. Follow this link

ADD REPLY
0
Entering edit mode

I think this filter is useful for after getting correlation of genes :)

ADD REPLY
1
Entering edit mode

You have to create your matrix, samples as rows and Genes as columns.

Lets say you have matrix "A" like this:

         5S_rRNA   A1BG  A1BG-AS1     A2M   A2M-AS1
Sample1 3.008018 4.291537 7.417708 12.42879  8.332809
Sample2 2.725616 5.751250 8.880903 12.53955  8.452564
Sample3 2.122932 4.161207 7.137211 12.73349  9.079962
Sample4 2.888454 4.599915 7.435178 13.51183 10.767963
Sample5 3.386386 5.363815 8.083065 14.00793 10.273440

Using cor function

cor = cor(A, use="pairwise.complete.obs", method="pearson")

             5S_rRNA       A1BG     A1BG-AS1          A2M     A2M-AS1
5S_rRNA   1.00000000 0.20148932  0.086988891 -0.085049890 -0.14374289
A1BG      0.20148932 1.00000000  0.751000456  0.032157512  0.03909878
A1BG-AS1  0.08698889 0.75100046  1.000000000 -0.009258873  0.10351696
A2M      -0.08504989 0.03215751 -0.009258873  1.000000000  0.88116528
A2M-AS1  -0.14374289 0.03909878  0.103516960  0.881165283  1.00000000
ADD REPLY

Login before adding your answer.

Traffic: 1992 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6