Limma: setting expression values to NA
3
0
Entering edit mode
@edo-plantinga-524
Last seen 10.2 years ago
Dear all, I would like to do a principal components analysis of a microarray experiment. In order to do this, I first need to set the expression values of my control spots to NA, so that this analysis is not influenced by these spots. The problem is that I do not know how to achieve this. I can list my control spots by: RG[RG$genes [, "Status"] != "Gene",] I would like to set the corresponding RG$R and RG$G expression values to NA. I can set them to zero by: RG$R <- RG$R * (RG$genes [, "Status"] == "Gene") but this is not what I want. If I try: RG$R <- RG$R * (if(RG$genes [, "Status"] == "Gene") {NA} else {1}) I get the warning message: the condition has length > 1 and only the first element will be used in: if (RG$genes[, "Status"] == "Gene") { Can anybody help me out? Kind regards, Edo Plantinga [[alternative HTML version deleted]]
• 927 views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
If you have a RG list, subsetting in limma is pretty easy, I think. See help(subsetting) with limma loaded. To get the subset of your RG list without Control spots, just do (untested): RGnocontrol <- RG[RG$genes[,"Status"]!="Gene",] Sean ----- Original Message ----- From: "Edo Plantinga" <a.e.d.plantinga@med.rug.nl> To: "Bioconductor" <bioconductor@stat.math.ethz.ch> Cc: <stephen@iwinet.rug.nl>; "Rudi Alberts" <r.alberts@cs.rug.nl> Sent: Wednesday, January 28, 2004 4:21 AM Subject: [BioC] Limma: setting expression values to NA > Dear all, > > I would like to do a principal components analysis of a microarray experiment. In order to do this, I first need to set the expression values of my control spots to NA, so that this analysis is not influenced by these spots. The problem is that I do not know how to achieve this. > I can list my control spots by: > RG[RG$genes [, "Status"] != "Gene",] > I would like to set the corresponding RG$R and RG$G expression values to NA. I can set them to zero by: > RG$R <- RG$R * (RG$genes [, "Status"] == "Gene") > but this is not what I want. If I try: > RG$R <- RG$R * (if(RG$genes [, "Status"] == "Gene") {NA} else {1}) > I get the warning message: > the condition has length > 1 and only the first element will be used in: if (RG$genes[, "Status"] == "Gene") { > Can anybody help me out? > > Kind regards, > > Edo Plantinga > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 9 hours ago
United States
How about something like this? index <- RG$genes[,"Status"]!="Gene" RG$R[index,] <- NA RG$G[index,] <- NA HTH, Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 >>> "Edo Plantinga" <a.e.d.plantinga@med.rug.nl> 01/28/04 04:21AM >>> Dear all, I would like to do a principal components analysis of a microarray experiment. In order to do this, I first need to set the expression values of my control spots to NA, so that this analysis is not influenced by these spots. The problem is that I do not know how to achieve this. I can list my control spots by: RG[RG$genes [, "Status"] != "Gene",] I would like to set the corresponding RG$R and RG$G expression values to NA. I can set them to zero by: RG$R <- RG$R * (RG$genes [, "Status"] == "Gene") but this is not what I want. If I try: RG$R <- RG$R * (if(RG$genes [, "Status"] == "Gene") {NA} else {1}) I get the warning message: the condition has length > 1 and only the first element will be used in: if (RG$genes[, "Status"] == "Gene") { Can anybody help me out? Kind regards, Edo Plantinga [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia
> Dear all, > > I would like to do a principal components analysis of a microarray > experiment. In order to do this, I first need to set the expression > values of my control spots to NA, so that this analysis is not > influenced by these spots. The problem is that I do not know how to > achieve this. I can list my control spots by: > RG[RG$genes [, "Status"] != "Gene",] > I would like to set the corresponding RG$R and RG$G expression values to > NA. I can set them to zero by: RG$R <- RG$R * (RG$genes [, "Status"] == > "Gene") > but this is not what I want. If I try: > RG$R <- RG$R * (if(RG$genes [, "Status"] == "Gene") {NA} else {1}) I get > the warning message: > the condition has length > 1 and only the first element will be used in: > if (RG$genes[, "Status"] == "Gene") { Can anybody help me out? Wouldn't it be better to remove the control spots from your data object entirely? E.g., isGene <- RG$genes$Status =="Gene" RGnocontrols <- RG[isGene,] Cheers Gordon > Kind regards, > > Edo Plantinga
ADD COMMENT

Login before adding your answer.

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