Gene-Metabolite correlation network
3
0
Entering edit mode
pankaj borah ▴ 120
@pankaj-borah-3804
Last seen 9.6 years ago
Hi All, I have two matrices   A and B. A contains expression values for 1000 genes in 10 conditions A[1:1000,1:10] B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] Is there a way that I can calculate gene-metabolite correlation OR co- variance  matrix using A and B ? Thanks Pankaj2k3 [[alternative HTML version deleted]]
• 1.9k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Fri, Mar 2, 2012 at 6:53 AM, pankaj borah <pankajborah2k3 at="" yahoo.co.in=""> wrote: > Hi All, > > I have two matrices ? A and B. > A contains expression values for 1000 genes in 10 conditions ?A[1:1000,1:10] > B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] > > Is there a way that I can calculate gene-metabolite correlation OR co-variance ?matrix using A and B ? corVals = cor(t(A),t(B)) Sean
ADD COMMENT
0
Entering edit mode
B Usadel ▴ 30
@b-usadel-5142
Last seen 9.6 years ago
Hi Pankaj if it is the same 10 conditions, I would merge the matrices. (Otherwise subset both matrices on the identical conditions) And then calculate the whole correlation/covariance matrix and extract the relevant regions, With this small number of genes, it will be done almost instantaneously. Cheers, björn > Hi All, > > I have two matrices A and B. > A contains expression values for 1000 genes in 10 conditions A[1:1000,1:10] > B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] > > Is there a way that I can calculate gene-metabolite correlation OR co-variance matrix using A and B ? > > Thanks > > Pankaj2k3 > [[alternative HTML version deleted]] > > > -------------------------------------------------------------------- ---- > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Make the (Gabi) primary database better by just taking a short questionaire: https://www.surveymonkey.com/s/RK3GMPC Prof. Dr. Björn Usadel RWTH Aachen University Institute for Biology I Worringer Weg 1 52056 Aachen phone: +49 (0)241 80 26634 fax: +49 (0)241 80 22637 web: http://www.usadellab.org --- [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
pankaj borah ▴ 120
@pankaj-borah-3804
Last seen 9.6 years ago
Thank you Prof. Björn, Yes they are are 10 identical conditions. But two matrices are of not the same dimension. A has 1000 genes (rows) and B has 100 metabolites(rows). Is there any package available in Bio-conductor or R for generating gene -metabolite correlation network ? Regards, Pankaj2k3 Pankaj Barah Department of Biology, Norwegian University of Science & Technology (NTNU) Realfagbygget, N-7491 Trondheim, Norway Telephone: (+47) 73 59 86 92 Mobile: (+47) 45063435 Fax: (+47) 73 59 61 00 E.mail: pankaj.barah@bio.ntnu.no Homepage:http://www.ntnu.no/employees/pankaj.barah ________________________________ From: B Usadel <b.usadel@bio1.rwth-aachen.de> Cc: "bioconductor@r-project.org" <bioconductor@r-project.org> Sent: Friday, 2 March 2012 4:13 PM Subject: Re: [BioC] Gene-Metabolite correlation network Hi Pankaj if it is the same 10 conditions, I would merge the matrices. (Otherwise subset both matrices on the identical conditions) And then calculate the whole correlation/covariance matrix and extract the relevant regions, With this small number of genes, it will be done almost instantaneously. Cheers, björn Hi All, I have two matrices   A and B. A contains expression values for 1000 genes in 10 conditions A[1:1000,1:10] B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] Is there a way that I can calculate gene-metabolite correlation OR co-variance  matrix using A and B ? Thanks Pankaj2k3 [[alternative HTML version deleted]] > >________________________________ > _______________________________________________ Bioconductor mailing list Bioconductor@r-project.org https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Make the (Gabi) primary database better by just taking a short questionaire: https://www.surveymonkey.com/s/RK3GMPC Prof. Dr. Björn Usadel RWTH Aachen University Institute for Biology I Worringer Weg 1 52056 Aachen phone: +49 (0)241 80 26634 fax: +49 (0)241 80 22637 web: http://www.usadellab.org --- [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
This would be a crude solution but will do the job m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c(1:1 00)))) g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen",c(1 :1000)))) mg<-rbind(m,g) cm<-cor(t(mg)) res<-cm[1:100,101:1100] For networks, you can try the GeneNet package using the mixed matrix. Or just use res above with some sensible threshold and then make an adjacency matrix out of it and convert it into a graphNEL object. (This is all assuming Pearson correlation (or derivatives thereof) is the way to go between metabolites and transcripts) Cheers, -björn > Thank you Prof. Björn, > > Yes they are are 10 identical conditions. But two matrices are of > not the same dimension. A has 1000 genes (rows) and B has 100 > metabolites(rows). > > Is there any package available in Bio-conductor or R for generating > gene -metabolite correlation network ? > > Regards, > > Pankaj2k3 > > Pankaj Barah Department of Biology, Norwegian University of Science & > Technology (NTNU) Realfagbygget, N-7491 Trondheim, Norway Telephone: > (+47) 73 59 86 92 Mobile: (+47) 45063435 Fax: (+47) 73 59 61 00 > E.mail: pankaj.barah@bio.ntnu.no > Homepage:http://www.ntnu.no/employees/pankaj.barah > -------------------------------------------------------------------- ---- > *From:* B Usadel <b.usadel@bio1.rwth-aachen.de> > *To:* pankaj borah <pankajborah2k3@yahoo.co.in> > *Cc:* "bioconductor@r-project.org" <bioconductor@r-project.org> > *Sent:* Friday, 2 March 2012 4:13 PM > *Subject:* Re: [BioC] Gene-Metabolite correlation network > > Hi Pankaj > > if it is the same 10 conditions, I would merge the matrices. > (Otherwise subset both matrices on the identical conditions) > And then calculate the whole correlation/covariance matrix and extract > the relevant regions, With this small number of genes, it will be done > almost instantaneously. > > Cheers, > björn >> Hi All, >> >> I have two matrices A and B. >> A contains expression values for 1000 genes in 10 conditions A[1:1000,1:10] >> B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] >> >> Is there a way that I can calculate gene-metabolite correlation OR co-variance matrix using A and B ? >> >> Thanks >> >> Pankaj2k3 >> [[alternative HTML version deleted]] >> >> >> ------------------------------------------------------------------- ----- >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@r-project.org <mailto:bioconductor@r-project.org> >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > > -- > Make the (Gabi) primary database better by just taking a short questionaire: > https://www.surveymonkey.com/s/RK3GMPC > > Prof. Dr. Björn Usadel > RWTH Aachen University > Institute for Biology I > Worringer Weg 1 > 52056 Aachen > > phone: +49 (0)241 80 26634 > fax: +49 (0)241 80 22637 > web: http://www.usadellab.org > --- > > > -- Make the (Gabi) primary database better by just taking a short questionaire: https://www.surveymonkey.com/s/RK3GMPC Prof. Dr. Björn Usadel RWTH Aachen University Institute for Biology I Worringer Weg 1 52056 Aachen Forschungszentrum Jülich IBG-2: Plant Sciences 52425 Jülich Germany phone: +49 (0)241 80 26634 fax: +49 (0)241 80 22637 web: http://www.usadellab.org --- [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
On Fri, Mar 2, 2012 at 9:35 AM, B Usadel <b.usadel at="" bio1.rwth-="" aachen.de=""> wrote: > This would be a crude solution but will do the job > m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c(1 :100)))) > g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen",c (1:1000)))) cm <- cor(t(m),t(g)) No need for the rbind, I don't think. Sean > mg<-rbind(m,g) > cm<-cor(t(mg)) > > res<-cm[1:100,101:1100] > > For networks, you can try the GeneNet package using the mixed matrix. Or > just use res above with some sensible threshold and then make an > adjacency matrix out of it and convert it into a graphNEL object. > > (This is all assuming Pearson correlation (or derivatives thereof) is > the way to go between metabolites and transcripts) > > Cheers, > -bj?rn > >> Thank you Prof. Bj?rn, >> >> Yes they are are ?10 identical conditions. But two matrices ?are of >> not the same dimension. A has 1000 genes (rows) and B has 100 >> metabolites(rows). >> >> Is there any package available in Bio-conductor or R ?for generating >> gene -metabolite correlation network ? >> >> Regards, >> >> Pankaj2k3 >> >> Pankaj Barah Department of Biology, Norwegian University of Science & >> Technology (NTNU) Realfagbygget, N-7491 Trondheim, Norway Telephone: >> (+47) 73 59 86 92 Mobile: (+47) 45063435 Fax: (+47) 73 59 61 00 >> E.mail: pankaj.barah at bio.ntnu.no >> Homepage:http://www.ntnu.no/employees/pankaj.barah >> ------------------------------------------------------------------- ----- >> *From:* B Usadel <b.usadel at="" bio1.rwth-aachen.de=""> >> *To:* pankaj borah <pankajborah2k3 at="" yahoo.co.in=""> >> *Cc:* "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> >> *Sent:* Friday, 2 March 2012 4:13 PM >> *Subject:* Re: [BioC] Gene-Metabolite correlation network >> >> Hi Pankaj >> >> if it is the same 10 conditions, I would merge the matrices. >> (Otherwise subset both matrices on the identical conditions) >> And then calculate the whole correlation/covariance matrix and extract >> the relevant regions, With this small number of genes, it will be done >> almost instantaneously. >> >> Cheers, >> bj?rn >>> Hi All, >>> >>> I have two matrices ? A and B. >>> A contains expression values for 1000 genes in 10 conditions ?A[1:1000,1:10] >>> B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] >>> >>> Is there a way that I can calculate gene-metabolite correlation OR co-variance ?matrix using A and B ? >>> >>> Thanks >>> >>> Pankaj2k3 >>> ? ? ?[[alternative HTML version deleted]] >>> >>> >>> ------------------------------------------------------------------ ------ >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org <mailto:bioconductor at="" r-project.org=""> >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> >> -- >> Make the (Gabi) primary database better by just taking a short questionaire: >> https://www.surveymonkey.com/s/RK3GMPC >> >> Prof. Dr. Bj?rn Usadel >> RWTH Aachen University >> Institute for Biology I >> Worringer Weg 1 >> 52056 Aachen >> >> phone: +49 (0)241 80 26634 >> fax: ? +49 (0)241 80 22637 >> web: ? http://www.usadellab.org >> --- >> >> >> > > > -- > Make the (Gabi) primary database better by just taking a short questionaire: > https://www.surveymonkey.com/s/RK3GMPC > > Prof. Dr. Bj?rn Usadel > RWTH Aachen University > Institute for Biology I > Worringer Weg 1 > 52056 Aachen > > Forschungszentrum J?lich > IBG-2: Plant Sciences > 52425 J?lich > Germany > > phone: +49 (0)241 80 26634 > fax: ? +49 (0)241 80 22637 > web: ? http://www.usadellab.org > --- > > > ? ? ? ?[[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Dear Prof. Björn Usadel, I could generate the Adjacency out of the gene metabolite correlation. > m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c(1 :100)))) > g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen",c (1:1000)))) > cm<-cm <- cor(t(m),t(g)) > cm<-cor(t(m),t(g)) > ADJ<-ifelse(c(cm)>0.75,1,0) > dim(ADJ)<-dim(cm) > str(ADJ)  num [1:100, 1:1000] 0 0 0 0 0 0 0 0 0 0 ... Now need to convert the ADJ to a edge list or sif. I have tried igraph package. But, it can convert square Adjacency matrix to edge list or a graphNEL object. Is there a way that I can convert my non square AM to a graph object or edge list ? Thanks, Pankaj ________________________________ From: Sean Davis <sdavis2@mail.nih.gov> To: B Usadel <b.usadel@bio1.rwth-aachen.de> <bioconductor@r-project.org> Sent: Saturday, 3 March 2012 1:23 PM Subject: Re: [BioC] Gene-Metabolite correlation network On Fri, Mar 2, 2012 at 9:35 AM, B Usadel <b.usadel@bio1.rwth- aachen.de=""> wrote: > This would be a crude solution but will do the job > m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c(1 :100)))) > g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen",c (1:1000)))) cm <- cor(t(m),t(g)) No need for the rbind, I don't think. Sean > mg<-rbind(m,g) > cm<-cor(t(mg)) > > res<-cm[1:100,101:1100] > > For networks, you can try the GeneNet package using the mixed matrix. Or > just use res above with some sensible threshold and then make an > adjacency matrix out of it and convert it into a graphNEL object. > > (This is all assuming Pearson correlation (or derivatives thereof) is > the way to go between metabolites and transcripts) > > Cheers, > -björn > >> Thank you Prof. Björn, >> >> Yes they are are  10 identical conditions. But two matrices  are of >> not the same dimension. A has 1000 genes (rows) and B has 100 >> metabolites(rows). >> >> Is there any package available in Bio-conductor or R  for generating >> gene -metabolite correlation network ? >> >> Regards, >> >> Pankaj2k3 >> >> ------------------------------------------------------------------- ----- >> *From:* B Usadel <b.usadel@bio1.rwth-aachen.de> >> *Cc:* "bioconductor@r-project.org" <bioconductor@r-project.org> >> *Sent:* Friday, 2 March 2012 4:13 PM >> *Subject:* Re: [BioC] Gene-Metabolite correlation network >> >> Hi Pankaj >> >> if it is the same 10 conditions, I would merge the matrices. >> (Otherwise subset both matrices on the identical conditions) >> And then calculate the whole correlation/covariance matrix and extract >> the relevant regions, With this small number of genes, it will be done >> almost instantaneously. >> >> Cheers, >> björn >>> Hi All, >>> >>> I have two matrices   A and B. >>> A contains expression values for 1000 genes in 10 conditions A[1:1000,1:10] >>> B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] >>> >>> Is there a way that I can calculate gene-metabolite correlation OR co-variance  matrix using A and B ? >>> >>> Thanks >>> >>> Pankaj2k3 >>>      [[alternative HTML version deleted]] >>> >>> >>> ------------------------------------------------------------------ ------ >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor@r-project.org <mailto:bioconductor@r-project.org> >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> >> -- >> Make the (Gabi) primary database better by just taking a short questionaire: >> https://www.surveymonkey.com/s/RK3GMPC >> >> Prof. Dr. Björn Usadel >> RWTH Aachen University >> Institute for Biology I >> Worringer Weg 1 >> 52056 Aachen >> >> phone: +49 (0)241 80 26634 >> fax:   +49 (0)241 80 22637 >> web:   http://www.usadellab.org >> --- >> >> >> > > > -- > Make the (Gabi) primary database better by just taking a short questionaire: > https://www.surveymonkey.com/s/RK3GMPC > > Prof. Dr. Björn Usadel > RWTH Aachen University > Institute for Biology I > Worringer Weg 1 > 52056 Aachen > > Forschungszentrum Jülich > IBG-2: Plant Sciences > 52425 Jülich > Germany > > phone: +49 (0)241 80 26634 > fax:   +49 (0)241 80 22637 > web:   http://www.usadellab.org > --- > > >        [[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
On Sat, Mar 24, 2012 at 6:07 PM, pankaj borah <pankajborah2k3 at="" yahoo.co.in=""> wrote: > Dear Prof. Bj?rn Usadel, > > > I could generate the?Adjacency?out of the gene?metabolite?correlation. > >> m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c( 1:100)))) >> g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen", c(1:1000)))) >> cm<-cm <- cor(t(m),t(g)) >> cm<-cor(t(m),t(g)) >> ADJ<-ifelse(c(cm)>0.75,1,0) >> dim(ADJ)<-dim(cm) >> str(ADJ) > ?num [1:100, 1:1000] 0 0 0 0 0 0 0 0 0 0 ... Hi, Pankaj. I have made a few adjustments to your code and then tried to give you some guidance on where to go next. cm = cor(t(m),t(g)) adj = cm>0.75 g = new("graphNEL",nodes=c(colnames(adj),rownames(adj))) # get the edges from the adj matrix # The next line returns a two-column matrix with the first # column being the metabolite entry and the second column # being the gene entry edgeMatrix = which(adj,arr.ind=TRUE) # Each edge reported twice, so get unique entries edgeMatrix = unique(edgeMatrix) g = addEdge(from=paste('met',edgeMatrix[,1]), to = paste('gen',edgeMatrix[,2]),g) Now g returns: A graphNEL graph with undirected edges Number of Nodes = 1100 Number of Edges = 588 Hopefully, that gets you close to where you want to be. Sean > Now need to convert the ADJ to a edge list or sif. I have tried igraph package. But, it can convert square?Adjacency matrix to edge list or a graphNEL object. Is there a way that I can convert my non square AM to a graph?object?or edge list ? > > Thanks, > > Pankaj > > > ________________________________ > ?From: Sean Davis <sdavis2 at="" mail.nih.gov=""> > To: B Usadel <b.usadel at="" bio1.rwth-aachen.de=""> > > ?<bioconductor at="" r-project.org=""> > Sent: Saturday, 3 March 2012 1:23 PM > Subject: Re: [BioC] Gene-Metabolite correlation network > > On Fri, Mar 2, 2012 at 9:35 AM, B Usadel <b.usadel at="" bio1.rwth-="" aachen.de=""> wrote: >> This would be a crude solution but will do the job >> m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c( 1:100)))) >> g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen", c(1:1000)))) > > cm <- cor(t(m),t(g)) > > No need for the rbind, I don't think. > > Sean > > >> mg<-rbind(m,g) >> cm<-cor(t(mg)) >> >> res<-cm[1:100,101:1100] >> >> For networks, you can try the GeneNet package using the mixed matrix. Or >> just use res above with some sensible threshold and then make an >> adjacency matrix out of it and convert it into a graphNEL object. >> >> (This is all assuming Pearson correlation (or derivatives thereof) is >> the way to go between metabolites and transcripts) >> >> Cheers, >> -bj?rn >> >>> Thank you Prof. Bj?rn, >>> >>> Yes they are are ?10 identical conditions. But two matrices ?are of >>> not the same dimension. A has 1000 genes (rows) and B has 100 >>> metabolites(rows). >>> >>> Is there any package available in Bio-conductor or R ?for generating >>> gene -metabolite correlation network ? >>> >>> Regards, >>> >>> Pankaj2k3 >>> > >>> ------------------------------------------------------------------ ------ >>> *From:* B Usadel <b.usadel at="" bio1.rwth-aachen.de=""> > >>> *Cc:* "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> >>> *Sent:* Friday, 2 March 2012 4:13 PM >>> *Subject:* Re: [BioC] Gene-Metabolite correlation network >>> >>> Hi Pankaj >>> >>> if it is the same 10 conditions, I would merge the matrices. >>> (Otherwise subset both matrices on the identical conditions) >>> And then calculate the whole correlation/covariance matrix and extract >>> the relevant regions, With this small number of genes, it will be done >>> almost instantaneously. >>> >>> Cheers, >>> bj?rn >>>> Hi All, >>>> >>>> I have two matrices ? A and B. >>>> A contains expression values for 1000 genes in 10 conditions ?A[1:1000,1:10] >>>> B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] >>>> >>>> Is there a way that I can calculate gene-metabolite correlation OR co-variance ?matrix using A and B ? >>>> >>>> Thanks >>>> >>>> Pankaj2k3 >>>> ? ? ?[[alternative HTML version deleted]] >>>> >>>> >>>> ----------------------------------------------------------------- ------- >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at r-project.org <mailto:bioconductor at="" r-project.org=""> >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >>> >>> -- >>> Make the (Gabi) primary database better by just taking a short questionaire: >>> https://www.surveymonkey.com/s/RK3GMPC >>> >>> Prof. Dr. Bj?rn Usadel >>> RWTH Aachen University >>> Institute for Biology I >>> Worringer Weg 1 >>> 52056 Aachen >>> >>> phone: +49 (0)241 80 26634 >>> fax: ? +49 (0)241 80 22637 >>> web: ? http://www.usadellab.org >>> --- >>> >>> >>> >> >> >> -- >> Make the (Gabi) primary database better by just taking a short questionaire: >> https://www.surveymonkey.com/s/RK3GMPC >> >> Prof. Dr. Bj?rn Usadel >> RWTH Aachen University >> Institute for Biology I >> Worringer Weg 1 >> 52056 Aachen >> >> Forschungszentrum J?lich >> IBG-2: Plant Sciences >> 52425 J?lich >> Germany >> >> phone: +49 (0)241 80 26634 >> fax: ? +49 (0)241 80 22637 >> web: ? http://www.usadellab.org >> --- >> >> >> ? ? ? ?[[alternative HTML version deleted]] >> >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > ? ? ? ?[[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Dear Pankaj none (packaged) that I would be aware of, as you don't even have an AM matrix (this should be square by definition. Now the best would probably be to write yourself something to convert your special matrix into an edge list. Or if you feel lazy just bring the matrix up to full size by padding with zeroes (as you seem to be only interested in metabolite transcript correlations) Cheers, Björn > Dear Prof. Björn Usadel, > > > I could generate the Adjacency out of the gene metabolite correlation. > > >> m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c( 1:100)))) >> g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen", c(1:1000)))) >> cm<-cm <- cor(t(m),t(g)) >> cm<-cor(t(m),t(g)) >> ADJ<-ifelse(c(cm)>0.75,1,0) >> dim(ADJ)<-dim(cm) >> str(ADJ) >> > num [1:100, 1:1000] 0 0 0 0 0 0 0 0 0 0 ... > > Now need to convert the ADJ to a edge list or sif. I have tried igraph package. But, it can convert square Adjacency matrix to edge list or a graphNEL object. Is there a way that I can convert my non square AM to a graph object or edge list ? > > Thanks, > > Pankaj > > > ________________________________ > From: Sean Davis <sdavis2@mail.nih.gov> > To: B Usadel <b.usadel@bio1.rwth-aachen.de> > Cc: pankaj borah <pankajborah2k3@yahoo.co.in>; "bioconductor@r-project.org" <bioconductor@r-project.org> > Sent: Saturday, 3 March 2012 1:23 PM > Subject: Re: [BioC] Gene-Metabolite correlation network > > On Fri, Mar 2, 2012 at 9:35 AM, B Usadel <b.usadel@bio1.rwth- aachen.de=""> wrote: > >> This would be a crude solution but will do the job >> m<-matrix(rnorm(1000),nrow=100,ncol=10,dimnames=list(paste("met",c( 1:100)))) >> g<-matrix(rnorm(10000),nrow=1000,ncol=10,dimnames=list(paste("gen", c(1:1000)))) >> > > cm <- cor(t(m),t(g)) > > No need for the rbind, I don't think. > > Sean > > > >> mg<-rbind(m,g) >> cm<-cor(t(mg)) >> >> res<-cm[1:100,101:1100] >> >> For networks, you can try the GeneNet package using the mixed matrix. Or >> just use res above with some sensible threshold and then make an >> adjacency matrix out of it and convert it into a graphNEL object. >> >> (This is all assuming Pearson correlation (or derivatives thereof) is >> the way to go between metabolites and transcripts) >> >> Cheers, >> -björn >> >> >>> Thank you Prof. Björn, >>> >>> Yes they are are 10 identical conditions. But two matrices are of >>> not the same dimension. A has 1000 genes (rows) and B has 100 >>> metabolites(rows). >>> >>> Is there any package available in Bio-conductor or R for generating >>> gene -metabolite correlation network ? >>> >>> Regards, >>> >>> Pankaj2k3 >>> >>> > > >>> ------------------------------------------------------------------ ------ >>> *From:* B Usadel <b.usadel@bio1.rwth-aachen.de> >>> *To:* pankaj borah <pankajborah2k3@yahoo.co.in> >>> *Cc:* "bioconductor@r-project.org" <bioconductor@r-project.org> >>> *Sent:* Friday, 2 March 2012 4:13 PM >>> *Subject:* Re: [BioC] Gene-Metabolite correlation network >>> >>> Hi Pankaj >>> >>> if it is the same 10 conditions, I would merge the matrices. >>> (Otherwise subset both matrices on the identical conditions) >>> And then calculate the whole correlation/covariance matrix and extract >>> the relevant regions, With this small number of genes, it will be done >>> almost instantaneously. >>> >>> Cheers, >>> björn >>> >>>> Hi All, >>>> >>>> I have two matrices A and B. >>>> A contains expression values for 1000 genes in 10 conditions A[1:1000,1:10] >>>> B contains metabolic profiles of 100 metabolites in 10 conditions B[1:100,1:10] >>>> >>>> Is there a way that I can calculate gene-metabolite correlation OR co-variance matrix using A and B ? >>>> >>>> Thanks >>>> >>>> Pankaj2k3 >>>> [[alternative HTML version deleted]] >>>> >>>> >>>> ----------------------------------------------------------------- ------- >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor@r-project.org <mailto:bioconductor@r-project.org> >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >>>> >>> -- >>> Make the (Gabi) primary database better by just taking a short questionaire: >>> https://www.surveymonkey.com/s/RK3GMPC >>> >>> Prof. Dr. Björn Usadel >>> RWTH Aachen University >>> Institute for Biology I >>> Worringer Weg 1 >>> 52056 Aachen >>> >>> phone: +49 (0)241 80 26634 >>> fax: +49 (0)241 80 22637 >>> web: http://www.usadellab.org >>> --- >>> >>> >>> >>> >> -- >> Make the (Gabi) primary database better by just taking a short questionaire: >> https://www.surveymonkey.com/s/RK3GMPC >> >> Prof. Dr. Björn Usadel >> RWTH Aachen University >> Institute for Biology I >> Worringer Weg 1 >> 52056 Aachen >> >> Forschungszentrum Jülich >> IBG-2: Plant Sciences >> 52425 Jülich >> Germany >> >> phone: +49 (0)241 80 26634 >> fax: +49 (0)241 80 22637 >> web: http://www.usadellab.org >> --- >> >> >> [[alternative HTML version deleted]] >> >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> -- Make the (Gabi) primary database better by just taking a short questionaire: https://www.surveymonkey.com/s/RK3GMPC Prof. Dr. Björn Usadel RWTH Aachen University Institute for Biology I Worringer Weg 1 52056 Aachen Forschungszentrum Jülich IBG-2: Plant Sciences 52425 Jülich Germany phone: +49 (0)241 80 26634 fax: +49 (0)241 80 22637 web: http://www.usadellab.org --- [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

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