SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
DESeq - Error: subscript out of bounds crh Bioinformatics 6 07-28-2015 03:56 AM
DESeq error clemen Bioinformatics 22 03-27-2014 04:59 AM
DESeq Plot Error coralgirl Bioinformatics 2 11-29-2011 09:35 AM
error in DESeq analysis stephenhart General 5 11-08-2011 02:55 AM
GATK IndelRealigner Error:Code Exception HongxiangZheng Bioinformatics 1 12-14-2010 07:21 PM

Reply
 
Thread Tools
Old 11-26-2012, 06:32 PM   #1
drdna
Member
 
Location: Kentucky

Join Date: May 2012
Posts: 73
Default Error in DESeq code

I've been having a lot of problems trying to tell DESeq which samples to analyze in a CountTable. My metadata table looks like this:

condition libType
PK01 col single-end
PK02 col single-end
PK07 ctrlc single-end
PK08 ctrln single-end
PK10 nho single-end
PK13 col single-end
PK15 nho single-end
PK16 nho single-end

and I'm trying to tell DESeq to compare the three "col" datasets with the "ctrlc" set. The error comes when I try to define the newCountDataSet at the start of the analysis:

> condition = factor( c( "col", "col", "ctrlc" "col"))
> library ("DESeq")
> cds = newCountDataSet( countTable, condition)
Error: length(conditions) == ncol(countData) is not TRUE

problem is there is no "conditions" variable as I can tell, only "condition"
I checked the lengths of these variables:
> length(conditions)
[1] 1
> length(condition)
[1] 4 -> what I expected

I suspect that "conditions" is an error in the code.

Also, I was unable to find the value for ncol( countTable )

> ncol(countData)
Error in ncol(countData) :
error in evaluating the argument 'x' in selecting a method for function 'ncol': Error: object 'countData' not found

Anyone have any idea what is causing this error? Better still how does one tell the program to analyze a subset of data in a larger table?
drdna is offline   Reply With Quote
Old 11-26-2012, 11:11 PM   #2
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

You're getting an error because you're trying to assign a condition vector with only 4 elements to count data with 8 (that's what the first error message is trying to say). I'm not surprised that R is getting confused, since it has no way to know exactly what you actually want it to do! Try to subset your data (countTable) first, that'll probably solve your problem.

Alternatively, assign the full list of conditions and just use the appropriate contrasts (given the condition names, I expect just looking at the subset makes more sense).
dpryan is offline   Reply With Quote
Old 11-27-2012, 01:22 PM   #3
Wolfgang Huber
Senior Member
 
Location: Heidelberg, Germany

Join Date: Aug 2009
Posts: 109
Default

Dear Drdna,

have a look at the "An Introduction to R" on http://cran.r-project.org/manuals.html which is a very useful introduction to the R language.

Best wishes
Wolfgang
__________________
Wolfgang Huber
EMBL
Wolfgang Huber is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:08 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO