indexing geneNames in exprs
2
0
Entering edit mode
Lana Schaffer ★ 1.3k
@lana-schaffer-1056
Last seen 10.2 years ago
Hi, I am trying to index into the expression array using a geneName. gcrma_exp <- gcrma(affybatch) E <- exprs(gcrma_exp) E is a matrix with the names of rows as geneNames (ie. 203508_at" ). I would like to get an index of E using a specific name such as 203508_at. Would someone be able to show how to do this? Thanks, Lana [[alternative HTML version deleted]]
• 738 views
ADD COMMENT
0
Entering edit mode
Lana Schaffer ★ 1.3k
@lana-schaffer-1056
Last seen 10.2 years ago
Hi, I am trying to index into the expression array using a geneName. gcrma_exp <- gcrma(affybatch) E <- exprs(gcrma_exp) E is a matrix with the names of rows as geneNames (ie. 203508_at" ). I would like to get an index of E using a specific name such as 203508_at. Would someone be able to show how to do this? Thanks, Lana [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Hi, Lana, I am not sure if this is what you mean: You can use which(rownames(E)=="203508_at") to get the row number. When you have list of genes, say my.gene.list you can use match(my.gene.list,rownames(E)) to get the index. Hope that helps. Best, Zhijin On Tue, 25 Jan 2005, Lana Schaffer wrote: > Hi, > I am trying to index into the expression array using a geneName. > gcrma_exp <- gcrma(affybatch) > E <- exprs(gcrma_exp) > > E is a matrix with the names of rows as geneNames (ie. 203508_at" ). > I would like to get an index of E using a specific name such as 203508_at. > Would someone be able to show how to do this? > Thanks, > Lana > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD REPLY
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
Lana, To get the index, do: which(rownames(E)=='203508_ad') You could also do: E['203508_at',] to get the row of E. Also, note that there are multiple ways of accessing data directly from an expression or affybatch object. Sean ----- Original Message ----- From: "Lana Schaffer" <schaffer@scripps.edu> To: <bioconductor@stat.math.ethz.ch> Sent: Tuesday, January 25, 2005 6:38 PM Subject: [BioC] indexing geneNames in exprs > Hi, > I am trying to index into the expression array using a geneName. > gcrma_exp <- gcrma(affybatch) > E <- exprs(gcrma_exp) > > E is a matrix with the names of rows as geneNames (ie. 203508_at" ). > I would like to get an index of E using a specific name such as 203508_at. > Would someone be able to show how to do this? > Thanks, > Lana > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT

Login before adding your answer.

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