Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

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


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

      • seqadmin
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin




        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
        04-22-2024, 07:01 AM
      • seqadmin
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 11:49 AM
      0 responses
      15 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-24-2024, 08:47 AM
      0 responses
      16 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      61 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      60 views
      0 likes
      Last Post seqadmin  
      Working...
      X