Entering edit mode
mictadlo
▴
10
@mictadlo-10885
Last seen 5.1 years ago
Hi, Below is my current code:
y <- DGEList(counts=rawCountTable, group=group, genes = rownames(rawCountTable))
> head(y$samples)
group lib.size norm.factors
X1916.MJO.0001_1 Root_tip.1.5 33986982 0.9543329
X1916.MJO.0002_1 Root_tip.1.5 31781171 0.8787148
X1916.MJO.0003_1 Root_tip.1.5 33947433 0.9948679
X1916.MJO.0004_1 Root_tip.1.5 32704401 1.0003440
X1916.MJO.0005_1 Leaves.1.5 34431708 1.0161298
X1916.MJO.0006_1 Leaves.1.5 33036095 1.0005296
> head(y$genes)
genes
3 sp0025247
4 sp0025250
5 sp0025268
6 sp0025270
8 sp0025282
12 sp0056834
head(gene.description)
sp0090975 MutS family domain IV2.624413
sp0037632 Magnesium transporter NIPA
How would it be possible to add gene.description
column to the below table:
> res <- glmQLFTest(fit, contrast=B.LvsP)
> topTags(res)
Coefficient: -1*Leaves.2 1*Leaves.3
genes logFC logCPM F PValue FDR
56010 sp0090975 2.624413 2.847831 374.1120 3.836919e-15 2.262670e-10
73438 sp0037632 -2.984799 3.394748 317.2377 2.065153e-14 5.172707e-10
in order to recieve the following table:
tr <- glmTreat(fit, contrast=B.LvsP, coef = 2, lfc=log2(1.5))
topTags(tr)
Coefficient: -1*Leaves.2 1*Leaves.3
genes description logFC logCPM F PValue FDR
56010 sp0090975 MutS family domain IV2.624413 2.847831 374.1120 3.836919e-15 2.262670e-10
73438 sp0037632 Magnesium transporter NIPA -2.984799 3.394748 317.2377 2.065153e-14 5.172707e-10
Thank you in advance.
Will I lose the gene name column by assign
gene.description
toy$genes if yes then is there a way to keep both?
Whatever is in
y$genes
will getcbind
'ed to the front of thetopTags
output. So if you want an extra column of gene names, just add it toy$genes
at the beginning our your analysis.