Closed ale07alvarez closed 7 years ago
Hi,
Thanks for your message. I will look into this problem and get back to you soon. Can you send me some data you try to use? It would be easier to answer your question seeing your data.
Best regards,
Csaba
2017-02-19 6:02 GMT+02:00 ale07alvarez notifications@github.com:
Hi, I'm trying to replicate the analysis in Chapter9:coexpr_net.R using my own data, my file of dimensions 18x38 (18 genes and 38 samples). The difference that I am seeing is that when I display the pcc matrix, I read the sample names in the columns and rows instead of the gene names, furthermore, on the Network Interaction plot, I also see the sample names instead of the gene names. I have checked the file format and looks the same as the file format provided in your Github site. Please help!!! Thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/csortu/MDAuR/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AEglcopXm_E0GkaG97HHXNTHFFOq-vUtks5rd77pgaJpZM4MFWb0 .
-- Csaba Ortutay, PhD Chief Executive Officer HiDucator Ltd http://www.hiducator.com/ Finland
Thank you for your answer please find sample data attached.
On Feb 18, 2017, at 9:42 PM, csortu notifications@github.com wrote:
Hi,
Thanks for your message. I will look into this problem and get back to you soon. Can you send me some data you try to use? It would be easier to answer your question seeing your data.
Best regards,
Csaba
2017-02-19 6:02 GMT+02:00 ale07alvarez notifications@github.com:
Hi, I'm trying to replicate the analysis in Chapter9:coexpr_net.R using my own data, my file of dimensions 18x38 (18 genes and 38 samples). The difference that I am seeing is that when I display the pcc matrix, I read the sample names in the columns and rows instead of the gene names, furthermore, on the Network Interaction plot, I also see the sample names instead of the gene names. I have checked the file format and looks the same as the file format provided in your Github site. Please help!!! Thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/csortu/MDAuR/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AEglcopXm_E0GkaG97HHXNTHFFOq-vUtks5rd77pgaJpZM4MFWb0 .
-- Csaba Ortutay, PhD Chief Executive Officer HiDucator Ltd http://www.hiducator.com/ Finland — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/csortu/MDAuR/issues/1#issuecomment-280897847, or mute the thread https://github.com/notifications/unsubscribe-auth/AUVPVJNkDbZXyyXO1aYXgsbalIdvcy8Rks5rd9Y0gaJpZM4MFWb0.
Please, try to upload your sample data here on github, or send me directly to: csaba.ortutay at gmail.com
The input data (your 18 genes and 38 samples) should be organized as a dataframe, where genes are in rows and samples are in columns. Individual values should be raw gene expression data. I suspect that your original dataframe contains genes in the columns and samples as rows, therefore qpPCC() function calculates correlations between samples (instead of genes). That is why you see sample names when you display the pcc matrix. You can use the t() function to transpose your original data frame like this:
pcc <- qpPCC(t(your.original.data))
Of course I send you a data that is formatted just as my original data, and I have tried everything you can think of including t(data). If you try to do the analysis using the sample data I send you you should have the same problem.
Sent from my iPhone
On Feb 20, 2017, at 1:27 AM, csortu notifications@github.com wrote:
Please, try to upload your sample data here on github, or send me directly to: csaba.ortutay at gmail.com
The input data (your 18 genes and 38 samples) should be organized as a dataframe, where genes are in rows and samples are in columns. Individual values should be raw gene expression data. I suspect that your original dataframe contains genes in the columns and samples as rows, therefore qpPCC() function calculates correlations between samples (instead of genes). That is why you see sample names when you display the pcc matrix. You can use the t() function to transpose your original data frame like this:
pcc <- qpPCC(t(your.original.data))
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi,
I have tested the issue and figured the following:
The qpPCC() function does not allow to have more samples than genes, meaning that it does not allow to calculate the correlation from all your 38 samples (if you have only 18 genes).
You have two alternatives:
1) Either you accept this and use only a maximum of 18 samples from your 38 to calculate the correlations. You can choose e.g. the first 18 samples like this:
my.data<-read.csv("totest.csv",row.names = 1) pcc <- qpPCC(my.data[,1:18])
(If you have a sensible way to partition your samples, this might be a good way to go.)
2) You can use the rcorr() function from the Hmisc package to calculate correlations and p.values for all the genes and samples as follows:
library("Hmisc") pcc.alt <- rcorr(as.matrix(t(my.data))) #rcorr() needs a matrix and it has to be transposed pcc.alt$Rsign<-pcc.alt$r pcc.alt$Rsign[pcc.alt$P>0.05]<-NA
You can even experiment with the differences of Spearman and Pearson correlations (type parameter of rcorr), if they make sense with your data.
With this, you can proceed the same way as in the coexpr_net.R script, I was able to produce very nive coexpression graphs.
I hope this helps,
Csaba
Hi, I'm trying to replicate the analysis in Chapter9:coexpr_net.R using my own data, my file of dimensions 18x38 (18 genes and 38 samples). The difference that I am seeing is that when I display the pcc matrix, I read the sample names in the columns and rows instead of the gene names, furthermore, on the Network Interaction plot, I also see the sample names instead of the gene names. I have checked the file format and looks the same as the file format provided in your Github site. Please help!!! Thanks!