Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • drdna
    Member
    • May 2012
    • 76

    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?
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    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).

    Comment

    • Wolfgang Huber
      Senior Member
      • Aug 2009
      • 109

      #3
      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

      Comment

      Latest Articles

      Collapse

      • GATTACAT
        Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by GATTACAT
        Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
        07-01-2026, 11:43 AM
      • SEQadmin2
        Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by SEQadmin2


        I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

        Here are nine questions we think about, in roughly the order they matter, before...
        06-18-2026, 07:11 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 07-02-2026, 11:08 AM
      0 responses
      22 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-30-2026, 05:37 AM
      0 responses
      23 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-26-2026, 11:10 AM
      0 responses
      22 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-17-2026, 06:09 AM
      0 responses
      55 views
      0 reactions
      Last Post SEQadmin2  
      Working...