[BioC] modifyWeights Problem

Gordon K Smyth smyth at wehi.EDU.AU
Thu Feb 4 23:51:53 CET 2010



> Date: Wed, 3 Feb 2010 23:31:40 -0600
> From: stephen sefick <ssefick at gmail.com>
> To: bioc-devel at stat.math.ethz.ch
> Subject: [Bioc-devel] modifyWeights Problem
> Content-Type: text/plain; charset=UTF-8
>
> I am using the limma packages for the first time, and I need help with
> the modifyWeights function.  I have about three years of experience
> with R programing, but this is the first time that I have run an
> analysis with a bioconductor package.  I have included the code below.
> I know that this is not a reproducible example and I would gladly
> give any more information requested.  I am trying to modify the
> weights of genes that I know are housekeeping genes (upweight).  I can
> not get the modifyWeights function to work to save my life.  The
> weights array is 6400, 6.  The control status vector is 12800- that
> seems like only two of the arrays are being represented???????  I
> don't know what is wrong.  Any help would be greatly appreciated
> thanks,
>
> Stephen Sefick
>
> library(limma)
> library(marray)
> library(convert)
> library(statmod)
> #read in targets file
> targets <- readTargets("targets.txt", row.names="Name")
> #weight everything with flags !cutoff=0!
> RG <- read.maimages(targets$FileName, source="genepix",
> wt.fun=wtflags(cutoff=-50 weight=0))
> #read .gal file
> #remove extra tab in file
>
> a <- readGAL()

It is highly unlikely that you need to read a GAL file.  The limma User's 
Guide tells you that you only need to do this with SPOT input, not with 
GenePix.

It is obvious from the information you give that whatever GAL file you are 
reading, it doesn't match your GenePix files, because it has twice as many 
rows.

> b <- a[,-6]
> RG$genes<-b
> #spot types file
> spottypes <- readSpotTypes()
> RG$genes$Status <- controlStatus(spottypes, RG$genes)
>
> ##################CHANGE weighting for spot types#####################
> ######################################################################
> multiply <- c(1,0,2,0,1,0,1,1,1)
> ######################################################################
> ######################################################################
>
> a <- unique(RG$genes$ID)
> status=RG$genes$Status
> w <- modifyWeights(RG$weights, RG$genes$Status, a, c(0, 1))

Have you looked at the help page for modifyWeights?  I'd think a quick 
read would tell you that your input arguments aren't the right dimensions, 
so there's no chance of this call working correctly.

I also wonder what you're trying to achieve with modifyWeights, and 
whether you need it at all?  This function is only needed for special 
situations.

Best wishes
Gordon

> -- 
> Stephen Sefick

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list