Entering edit mode
Hi,
I'm hoping to use "tximport" to convert an RNA-Seq count data file for downstream analysis such as DESeq2. But I got an error as you can see below. I think everything I have is current (R3.3.1 etc). Any input will be much appreciated !!
> datafileName <- "test.txt" ## Replace the file name with the correct one
> table=read.delim(datafileName,header=T)
>
> countsCol=colnames(table[,4:11])
> abundanceCol=colnames(table[,12:ncol(table)])
> RefSeqID=table[,3]
> Symbol=table[,2]
> tx2gene = data.frame(RefSeqID,Symbol)
> txin = tximport(datafileName, type="none", tx2gene = tx2gene, countsCol = countsCol,
+ abundanceCol=abundanceCol, lengthCol=NULL, txIdCol=NULL,
+ importer = read_tsv)
reading in files
1 Error in .subset2(x, i, exact = exact) :
attempt to select less than one element in get1index
Thank you very much for quick reply. I was trying to find a solution to my problem with DESeqDataSetFromMatrix(). I tried but it did not take a matrix as you can see below. Only way so far was to put count columns without the row name column (in this case Symbol). What am I doing wrong?
Sorry! I found a solution myself for the input for DESeqDataSetFromMatrix(). Simple matrix didn't work, but adding rownames to a count-data-only table solved it.
Thanks for taking time for your reply!
You got it. countData should be only a matrix of counts.
The correct error message was not coming through due to some recent code additions.
I've fixed the error message in the next version to say:
Error: ncol(countData) == nrow(colData) is not TRUE