This is a test version of Biostars. For the public version, visit https://www.biostars.org.
gene symbol in r

I am having a problem in getting gene symbol after analysis GEO data.

I can get logFC, P.value but in gene.symbol only show <NA>

gr<-as.factor(gr)
gset$description <- gr
design <- model.matrix(~ description + 0, gset)
colnames(design) <- levels(gr)
fit <- lmFit(gset, design)
cont.matrix <- makeContrasts("cp-np", levels=design)
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit2, 0.01)
tT <- topTable(fit2, adjust="fdr", sort.by="B", number=Inf)

tT <- subset(tT, select=c("adj.P.Val","P.Value","logFC","Gene.symbol"))
write.table(tT, file=stdout(), row.names=F, sep="\t")

Output:

 Gene.symbol
 <NA>
  <NA>
<NA>
 FBXL21
      <NA>
   <NA>
gene r

I think if you set gene symbols as data frames' rownames, It is not a problem.

This question lacks the required information to answer this. You should at least add some commands you ran, how can we guess what's wrong without?

gr<-as.factor(gr)
gset$description <- gr
design <- model.matrix(~ description + 0, gset)
colnames(design) <- levels(gr)
fit <- lmFit(gset, design)
cont.matrix <- makeContrasts("cp-np", levels=design)
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit2, 0.01)
tT <- topTable(fit2, adjust="fdr", sort.by="B", number=Inf)

tT <- subset(tT, select=c("adj.P.Val","P.Value","logFC","Gene.symbol"))
write.table(tT, file=stdout(), row.names=F, sep="\t")
.................................................................................................................................
 Gene.symbol
 <NA>
  <NA>
<NA>
 FBXL21
      <NA>
   <NA>

0 answers

No answers yet.

Log in to answer this question.