How to normalise a HTSEQ combined replicate count table
1
0
Entering edit mode
8.9 years ago
rob234king ▴ 610

I have a htseq raw counts table of different tissues rna-seq counts against a custom set of sequences 300 genes. What I would like to do is normalise the counts for each tissue combining the replicates too. I have 2-4 replicates for different tissues with columns G1, G2, G3 etc for each sample followed by name and replicate. I can see code how to do it from raw individual htseq files of each sample but not an already combined table (I got this from galaxy). Any code for normalising a table like below including replicates into a normalised single value for each tissue.

row.names G1.grain_Z71 G1.grain_Z71.1 G2.Grain_Z75 G2.Grain_Z75.1

TRAES3AF032200050CFD_g. 1 2 2 29 36

TRAES3AF032200050CFD_g. 2 75 99 2 3

TRAES3AF035200150CFD_g 0 0 0 0

TRAES3AF107900020CFD_g 8 6 32 30

htseq deseq2 • 2.0k views
ADD COMMENT
1
Entering edit mode
8.9 years ago

I guess that the trick is mostly getting things into R in a convenient format for DESeq. Assuming the file is called foo.txt:

library(DESeq2)
tab = read.delim("foo.txt", header=T)
dds = DESeqDataSetFromMatrix(tab, colData=data.frame(group=rep(0, ncol(tab)), design=~1
dds = estimateSizeFactors(dds)
counts(dds, normalized=T)
ADD COMMENT

Login before adding your answer.

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