<p>What do the first few lines of your lmFit input variables look like (i.e. <code>dat</code> and <code>pheno</code>)? Are the rows numbered, or do they use the actual symbols?</p>

<p>By default, I don't think <code>read.csv</code> expects a file to have row numbers (even though <code>write.csv</code> puts them in by default). Try adding a <code>row.names</code> parameter to the expression matrix read call:</p>

<pre><code>dat &lt;- read.csv("expression.csv", row.names=1)
</code></pre>

CC BY-SA 3.0
2017-11-03T02:55:36.503Z
2017-11-03T02:55:36.503Z
gringer
<p>I think I have a fairly easy-to-solve problem.</p>

<p>I have an expression table generated from an Affy set. It has one row of gene names (already symbols) and then 180 sample rows. 181 rows total.</p>

<p>So I made another excel file with one row with three different phenotypes I want to compare. That row has a label ("classes") and 180 names. 181 rows total.</p>

<p>In R, I can import each of these </p>

<pre><code>dat &lt;- read.csv("expression.csv")
dat &lt;- data.matrix(dat)
pheno &lt;- read.csv("pheno.csv")
pheno &lt;- data.matrix(pheno)
</code></pre>

<p>I can then fit them</p>

<pre><code>fit &lt;- lmFit(dat,pheno)
</code></pre>

<p>And ask for an eBayes from limma</p>

<pre><code>fit &lt;- eBayes(fit)
</code></pre>

<p>Now, when I view the topTable,</p>

<pre><code>table &lt;- topTable(fit)
</code></pre>

<p>My first column has numbers (like "834","1142"), when I'd expect to have gene names there (like "ACTR", "CHRNA1").</p>

<p>What am I doing wrong? Or, rather, am I doing anything right? </p>

<p>Thanks!</p>

CC BY-SA 3.0
2017-11-03T11:22:15.667Z
What are your rownames of `pheno`? BTW are you sure that `pheno` has only the phenodata relevant for your differential expression analysis? Which is your model?
llrs
<rna-seq><bioconductor><differential-expression><microarray><rna>
Simple Affy Differential Expression
# Simple Affy Differential Expression

(Asked by: username_0 on 2017-11-03)

I think I have a fairly easy-to-solve problem.
I have an expression table generated from an Affy set. It has one row of gene names (already symbols) and then 180 sample rows. 181 rows total.
So I made another excel file with one row with three different phenotypes I want to compare. That row has a label ("classes") and 180 names. 181 rows total.
In R, I can import each of these 
dat <- read.csv("expression.csv")
dat <- data.matrix(dat)
pheno <- read.csv("pheno.csv")
pheno <- data.matrix(pheno)

I can then fit them
fit <- lmFit(dat,pheno)

And ask for an eBayes from limma
fit <- eBayes(fit)

Now, when I view the topTable,
table <- topTable(fit)

My first column has numbers (like "834","1142"), when I'd expect to have gene names there (like "ACTR", "CHRNA1").
What am I doing wrong? Or, rather, am I doing anything right? 
Thanks!

**Tags:** rna-seq, bioconductor, differential-expression, microarray, rna
> **Comments:**
> **username_1**: What are your rownames of `pheno`? BTW are you sure that `pheno` has only the phenodata relevant for your differential expression analysis? Which is your model?  

---

## 1 answers

### Answer by username_2 on 2017-11-03. Score: 1 | Accepted answer

What do the first few lines of your lmFit input variables look like (i.e. dat and pheno)? Are the rows numbered, or do they use the actual symbols?
By default, I don't think read.csv expects a file to have row numbers (even though write.csv puts them in by default). Try adding a row.names parameter to the expression matrix read call:
dat <- read.csv("expression.csv", row.names=1)


---

