correlation between genes
1
0
Entering edit mode
6.8 years ago
1769mkc ★ 1.2k

I have different cell type total of 5 ,im doing a pairwise comparison, I would like to show the correlation in pairwise condition between the genes. I want to plot how these certain genes are expressed. So would be be suffice to show simple correlation based calculation or i have to do something else.

Any suggestion would be appreciated.

R • 2.4k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode

I use corrplot often but my question was would it be enough to make a correlation to show which genes are coexpreseed or i have to go for WGCNA kind of thing ?

ADD REPLY
1
Entering edit mode

Your question could be better phrased. For finding co-expressed genes, I think you should go for PCIT, WGCNA or some similar method.

ADD REPLY
0
Entering edit mode

sorry for my confusing words but thats what i wanted to ask

ADD REPLY
5
Entering edit mode
6.8 years ago

It sounds like a simple pairwise correlation with cor() would suffice.

ADD COMMENT
2
Entering edit mode

Probably better to also use method="spearman" with cor(), just to be safe and avoid spurious correlations.

ADD REPLY
0
Entering edit mode

Hi, following this discussion, I've been trying to use cor() after transposing my gene/samples matrix from microarray experiment (so genes are as columns and samples are as rows) but I'm not sure how to define "y", I get this error:

cor<- cor(tm, use="pairwise.complete.obs","spearman")  Error in
 cor(tm, use = "pairwise.complete.obs", "spearman") :    'y' must be
 numeric
ADD REPLY
1
Entering edit mode

Make tm a matrix.

ADD REPLY
0
Entering edit mode

it is a matrix already, I did

tm <- as.matrix(tm)

but the only way to avoid the error is if I set "y<-tm", then I get a correlation table of 900x900 with the correlation of each gene with every other gene but I'm not sure what I'm comparing because y should be 6 samples... I don't know

anyhow I just posted the whole question here

How to calculate moderated z-score (MODZ)

ADD REPLY
0
Entering edit mode

Oh, you need method="spearman", not just "spearman". R is seeing "spearman" as the thing you want to correlate tm with otherwise.

ADD REPLY

Login before adding your answer.

Traffic: 1227 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