using the Limma package with matrix data
1
0
Entering edit mode
Markus Seto ▴ 20
@markus-seto-2879
Last seen 10.2 years ago
Hi, I'm new to R, and i want to use the R software package Limma to compute some tests for differential gene expression. However, my data is in a matrix-style format (with the Huber variance stabilization transform applied), where columns are samples, and rows are genes - what would the easiest way to use this package be? The R interface seems to only work well when the data is available in GPR format? Thanks for any help you can provide, Markus [[alternative HTML version deleted]]
limma limma • 3.0k views
ADD COMMENT
0
Entering edit mode
Mark Robinson ★ 1.1k
@mark-robinson-2171
Last seen 10.2 years ago
Markus. I encourage you to read the limma documentation. 'lmFit', which is the command you'll use to fit the linear model, will take several class types as input, including a matrix. In fact, if you look at: ?lmFit ... you'll see that some of the code examples at the bottom operate on a matrix of randomly generated numbers for illustration. Hope that helps. Mark On 26/06/2008, at 12:38 PM, Markus Seto wrote: > Hi, > > I'm new to R, and i want to use the R software package Limma to > compute some > tests for differential gene expression. However, my data is in a > matrix-style format (with the Huber variance stabilization transform > applied), where columns are samples, and rows are genes - what > would the > easiest way to use this package be? The R interface seems to only > work well > when the data is available in GPR format? > > Thanks for any help you can provide, > > Markus > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/ > gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Hi Mark, Thanks for the reply. I did look at the documentation, however, I couldn't find an example where the user simply has a matrix of normalized expression values, and fits the linear model to it - most examples use some kind of loading function with accessory image information, such as read.maimages(). I don't actually have this information because I'm trying to fit linear models to transformed data from discrete counts from EST experiments ... sorry for the troubles. Markus On Wed, Jun 25, 2008 at 10:53 PM, Mark Robinson <mrobinson@wehi.edu.au> wrote: > Markus. > > I encourage you to read the limma documentation. 'lmFit', which is the > command you'll use to fit the linear model, will take several class types as > input, including a matrix. > > In fact, if you look at: > > ?lmFit > > ... you'll see that some of the code examples at the bottom operate on a > matrix of randomly generated numbers for illustration. > > Hope that helps. > Mark > > > > > > On 26/06/2008, at 12:38 PM, Markus Seto wrote: > > Hi, >> >> I'm new to R, and i want to use the R software package Limma to compute >> some >> tests for differential gene expression. However, my data is in a >> matrix-style format (with the Huber variance stabilization transform >> applied), where columns are samples, and rows are genes - what would the >> easiest way to use this package be? The R interface seems to only work >> well >> when the data is available in GPR format? >> >> Thanks for any help you can provide, >> >> Markus >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@stat.math.ethz.ch >> 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
Think he probably mean you try > help("lmFit") On the R-window console... At the bottom of the help window generated you will see: .... # Simulate gene expression data for 100 probes and 6 microarrays # Microarray are in two groups # First two probes are differentially expressed in second group # Std deviations vary between genes with prior df=4 sd <- 0.3*sqrt(4/rchisq(100,df=4)) y <- matrix(rnorm(100*6,sd=sd),100,6) rownames(y) <- paste("Gene",1:100) y[1:2,4:6] <- y[1:2,4:6] + 2 design <- cbind(Grp1=1,Grp2vs1=c(0,0,0,1,1,1)) options(digit=3) # Ordinary fit fit <- lmFit(y,design) fit <- eBayes(fit) fit as.data.frame(fit[1:10,2]) etc ... that is lmfit .. the engine of limma, just takes a matrix... just ensure to start with log2... you are probably good to go ,just make up a design matrix -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Markus Seto Sent: Thursday, June 26, 2008 5:39 PM To: Mark Robinson Cc: bioconductor at stat.math.ethz.ch Subject: Re: [BioC] using the Limma package with matrix data Hi Mark, Thanks for the reply. I did look at the documentation, however, I couldn't find an example where the user simply has a matrix of normalized expression values, and fits the linear model to it - most examples use some kind of loading function with accessory image information, such as read.maimages(). I don't actually have this information because I'm trying to fit linear models to transformed data from discrete counts from EST experiments ... sorry for the troubles. Markus On Wed, Jun 25, 2008 at 10:53 PM, Mark Robinson <mrobinson at="" wehi.edu.au=""> wrote: > Markus. > > I encourage you to read the limma documentation. 'lmFit', which is the > command you'll use to fit the linear model, will take several class types as > input, including a matrix. > > In fact, if you look at: > > ?lmFit > > ... you'll see that some of the code examples at the bottom operate on a > matrix of randomly generated numbers for illustration. > > Hope that helps. > Mark > > > > > > On 26/06/2008, at 12:38 PM, Markus Seto wrote: > > Hi, >> >> I'm new to R, and i want to use the R software package Limma to compute >> some >> tests for differential gene expression. However, my data is in a >> matrix-style format (with the Huber variance stabilization transform >> applied), where columns are samples, and rows are genes - what would the >> easiest way to use this package be? The R interface seems to only work >> well >> when the data is available in GPR format? >> >> Thanks for any help you can provide, >> >> Markus >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> 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 stat.math.ethz.ch 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
Hi Paul, # if your data is in an object called yourData.... then is.matrix( yourData ) [1] TRUE # if the previous command is TRUE, then fit your linear model using: model <- ...................... lmFit(yourData, model) cheers, Mark ----------------------------------------------------- Mark Cowley, BSc (Bioinformatics)(Hons) Peter Wills Bioinformatics Centre Garvan Institute of Medical Research ----------------------------------------------------- On 26/06/2008, at 5:57 PM, Paul Leo wrote: > > > Think he probably mean you try >> help("lmFit") > On the R-window console... > At the bottom of the help window generated you will see: > .... > > > # Simulate gene expression data for 100 probes and 6 microarrays > # Microarray are in two groups > # First two probes are differentially expressed in second group > # Std deviations vary between genes with prior df=4 > sd <- 0.3*sqrt(4/rchisq(100,df=4)) > y <- matrix(rnorm(100*6,sd=sd),100,6) > rownames(y) <- paste("Gene",1:100) > y[1:2,4:6] <- y[1:2,4:6] + 2 > design <- cbind(Grp1=1,Grp2vs1=c(0,0,0,1,1,1)) > options(digit=3) > > # Ordinary fit > fit <- lmFit(y,design) > fit <- eBayes(fit) > fit > as.data.frame(fit[1:10,2]) > > etc > ... that is lmfit .. the engine of limma, just takes a matrix... just > ensure to start with log2... you are probably good to go ,just make > up a > design matrix > > -----Original Message----- > From: bioconductor-bounces at stat.math.ethz.ch > [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Markus > Seto > Sent: Thursday, June 26, 2008 5:39 PM > To: Mark Robinson > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] using the Limma package with matrix data > > Hi Mark, > > Thanks for the reply. I did look at the documentation, however, I > couldn't > find an example where the user simply has a matrix of normalized > expression > values, and fits the linear model to it - most examples use some > kind of > loading function with accessory image information, such as > read.maimages(). I don't actually have this information because I'm > trying > to fit linear models to transformed data from discrete counts from EST > experiments ... sorry for the troubles. > > Markus > > On Wed, Jun 25, 2008 at 10:53 PM, Mark Robinson > <mrobinson at="" wehi.edu.au=""> > wrote: > >> Markus. >> >> I encourage you to read the limma documentation. 'lmFit', which is > the >> command you'll use to fit the linear model, will take several class > types as >> input, including a matrix. >> >> In fact, if you look at: >> >> ?lmFit >> >> ... you'll see that some of the code examples at the bottom operate >> on > a >> matrix of randomly generated numbers for illustration. >> >> Hope that helps. >> Mark >> >> >> >> >> >> On 26/06/2008, at 12:38 PM, Markus Seto wrote: >> >> Hi, >>> >>> I'm new to R, and i want to use the R software package Limma to > compute >>> some >>> tests for differential gene expression. However, my data is in a >>> matrix-style format (with the Huber variance stabilization transform >>> applied), where columns are samples, and rows are genes - what would > the >>> easiest way to use this package be? The R interface seems to only > work >>> well >>> when the data is available in GPR format? >>> >>> Thanks for any help you can provide, >>> >>> Markus >>> >>> [[alternative HTML version deleted]] >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at stat.math.ethz.ch >>> 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 stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY

Login before adding your answer.

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