exclude flagged spots in limma
4
0
Entering edit mode
Yolande Tra ▴ 160
@yolande-tra-1821
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060802/ ef2691f0/attachment.pl
• 887 views
ADD COMMENT
0
Entering edit mode
Yolande Tra ▴ 160
@yolande-tra-1821
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060803/ e1c1710a/attachment.pl
ADD COMMENT
0
Entering edit mode
Quoting Yolande Tra <yvtsma at="" rit.edu="">: > Hi Jose, > > Thank you for your reply. One problem is that value of 1 was assigned > for bad spots and 0 for good ones. Is there a way to switch these > values? > > Yolande Of course you can switch them. If you already made a matrix from your flags (oldmatrix), and contain ONLY the value 0 or 1, and you want to switch them over... just do this: newmatrix<-abs(oldmatrix-1) done. If you have other values then you may want to use the 'if else' clauses within a loop ('for') checking every element of the matrix, and then you can specify what values to substitute for... if you have a problem with this just shout. Jose -- Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK
ADD REPLY
0
Entering edit mode
@jdelasherasedacuk-1189
Last seen 9.3 years ago
United Kingdom
Quoting Yolande Tra <yvtsma at="" rit.edu="">: > Hi Gordon, > > I have read some of your answers regarding this issue but it does not > answer mine. I have 5 separate image output files from Scanalyze (not > one of the output listed in Limma). For each file, one of the column > named FLAG contains the flagged values of 1 if bad and 0 if good. Can > you please help me, how can I exclude these spots from the analysis. > > The following commands helped me to read each file saved ast text > (tab delimiter) >> filenames <- c("gp1.dat","gp2.dat","gp3.dat","gp4.dat","gp5.dat") >> RG <- read.maimages(filenames,annotation="My_spot_labels", > columns=list(Rf="CH1I",Gf="CH2I",Rb="CH1B",Gb="CH2B")) > These are the notation in Scanalyze. > > I have used one function in the archive and got the following error > > mywtfun <- function(exclude.flags=c(1,2,3)) function(obj) 1-(obj$Flag %in% > + exclude.flags) >> RG <- read.maimages(filenames,annotation="My_spot_labels", >> columns=list(Rf="CH1I",Gf="CH2I",Rb="CH1B",Gb="CH2B"), >> wt.fun=mywtfun(c(1))) > Error in "[<-"(`*tmp*`, , i, value = numeric(0)) : > nothing to replace with > > Thank you so much for your help. > Yolande Hi Yolande, you can add "manually" a component $weights to your RG object. This is merely a matrix with values between 0 and 1, with as many columns as there are slides, and as many rows as there are genes. So each column is a "flags" column for each slide. You can use the read.table function to read the whole data file (output from Scanalyze) for each slide, and then simply pick the column containing the flags, and use them to build the matrix. Then just assign RG$weights<- yourmatrix, and you're rolling... You can create your own flags from any other parameters you wish, as long as you end up with a number between 0 and 1, where 1 is full weight (good) and 0 is bad, and different degrees in between. I hope this helps. Jose -- Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK
ADD COMMENT
0
Entering edit mode
Marcus Davy ▴ 680
@marcus-davy-374
Last seen 10.2 years ago
Here are a few of ways; > x [1] 0 1 0 0 1 > (!x)*1 [1] 1 0 1 1 0 > as.numeric(!x) [1] 1 0 1 1 0 > abs(x - 1) [1] 1 0 1 1 0 The logical operator "!" coerces the binary vector to logical and does a logical negation (NOT). A weight of 0 is equivalent to an NA, a weight between 0 and 1 will be used to do a weighted linear model using lmFit (internally lm.series etc) if the weights matrix is in your MAList and you specify to use it in the analysis. Marcus On 8/4/06 2:22 AM, "Yolande Tra" <yvtsma at="" rit.edu=""> wrote: > Hi Jose, > > Thank you for your reply. One problem is that value of 1 was assigned for bad > spots and 0 for good ones. Is there a way to switch these values? > > Yolande > > ________________________________ > > From: bioconductor-bounces at stat.math.ethz.ch on behalf of > J.delasHeras at ed.ac.uk > Sent: Thu 8/3/2006 7:43 AM > To: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] exclude flagged spots in limma > > > > Quoting Yolande Tra <yvtsma at="" rit.edu="">: > >> Hi Gordon, >> >> I have read some of your answers regarding this issue but it does not >> answer mine. I have 5 separate image output files from Scanalyze (not >> one of the output listed in Limma). For each file, one of the column >> named FLAG contains the flagged values of 1 if bad and 0 if good. Can >> you please help me, how can I exclude these spots from the analysis. >> >> The following commands helped me to read each file saved ast text >> (tab delimiter) >>> filenames <- c("gp1.dat","gp2.dat","gp3.dat","gp4.dat","gp5.dat") >>> RG <- read.maimages(filenames,annotation="My_spot_labels", >> columns=list(Rf="CH1I",Gf="CH2I",Rb="CH1B",Gb="CH2B")) >> These are the notation in Scanalyze. >> >> I have used one function in the archive and got the following error >>> mywtfun <- function(exclude.flags=c(1,2,3)) function(obj) 1-(obj$Flag %in% >> + exclude.flags) >>> RG <- read.maimages(filenames,annotation="My_spot_labels", >>> columns=list(Rf="CH1I",Gf="CH2I",Rb="CH1B",Gb="CH2B"), >>> wt.fun=mywtfun(c(1))) >> Error in "[<-"(`*tmp*`, , i, value = numeric(0)) : >> nothing to replace with >> >> Thank you so much for your help. >> Yolande > > Hi Yolande, > > you can add "manually" a component $weights to your RG object. This is > merely a matrix with values between 0 and 1, with as many columns as > there are slides, and as many rows as there are genes. So each column > is a "flags" column for each slide. > > You can use the read.table function to read the whole data file (output > from Scanalyze) for each slide, and then simply pick the column > containing the flags, and use them to build the matrix. Then just > assign RG$weights<- yourmatrix, and you're rolling... > > You can create your own flags from any other parameters you wish, as > long as you end up with a number between 0 and 1, where 1 is full > weight (good) and 0 is bad, and different degrees in between. > > I hope this helps. > > Jose > > -- > Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk > The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 > Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 > Swann Building, Mayfield Road > University of Edinburgh > Edinburgh EH9 3JR > UK > > _______________________________________________ > 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 ______________________________________________________ The contents of this e-mail are privileged and/or confidenti...{{dropped}}
ADD COMMENT
0
Entering edit mode
Yolande Tra ▴ 160
@yolande-tra-1821
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060804/ 551ab893/attachment.pl
ADD COMMENT

Login before adding your answer.

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