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
        Recent Innovations in Spatial Biology
        by seqadmin


        Spatial biology is an exciting field that encompasses a wide range of techniques and technologies aimed at mapping the organization and interactions of various biomolecules in their native environments. As this area of research progresses, new tools and methodologies are being introduced, accompanied by efforts to establish benchmarking standards and drive technological innovation.

        3D Genomics
        While spatial biology often involves studying proteins and RNAs in their...
        Yesterday, 07:30 PM
      • seqadmin
        Advancing Precision Medicine for Rare Diseases in Children
        by seqadmin




        Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
        12-16-2024, 07:57 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 12-30-2024, 01:35 PM
      0 responses
      25 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-17-2024, 10:28 AM
      0 responses
      41 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-13-2024, 08:24 AM
      0 responses
      55 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-12-2024, 07:41 AM
      0 responses
      41 views
      0 likes
      Last Post seqadmin  
      Working...
      X