DESeq input preparation
1
1
Entering edit mode
9.6 years ago
tiago211287 ★ 1.4k

I have 6 txt files that I get from HTseq-count. How can I merge the column that contains the integer results in one file using R?

DESeq • 4.9k views
ADD COMMENT
0
Entering edit mode

read.table() and cbind() I guess.

ADD REPLY
3
Entering edit mode
9.6 years ago

You can just use DESeqDataSetFromHTSeqCount() (see help(DESeqDataSet)). This is assuming that you're using DESeq2, which you should be. This will also take care of removing the last 5 lines of the input files, which should be ignored.

ADD COMMENT
0
Entering edit mode

Does DESeqDataSetFromHTSeqCount take account of the half-empty first lines of htseq-count output files?

           0
A1BG       6
A1BG-AS1   25
A1CF       0
A2M        6
A2M-AS1    383
A2ML1      0

If I leave the first row in the files, then I get an error:

> ddsHTSeqFull <- DESeqDataSetFromHTSeqCount(sampleTable=sampleTableFull, directory=directoryFullFiles, design= ~familyID+condition)
Error in `colnames<-`(`*tmp*`, value = 1:8) : 
  attempt to set 'colnames' on an object with less than two dimensions

This works fine when I use a version of the files where I have deleted the first row.

Please let me know if I have got this right, or whether there is an issue with my htseq-count files?

Thanks,
Matt

ADD REPLY
0
Entering edit mode
  1. You should post things like this as new questions in the future rather than as comments on things posted almost a year ago.
  2. You have a problem with the output of htseq-count. It does not normally produce files with half empty lines, which suggests that your GTF files has problems.
ADD REPLY

Login before adding your answer.

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