Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KHubbard
    Junior Member
    • May 2011
    • 8

    #1

    Creating a data.frame for DESeq2

    Hey All,

    I am a novice R user and am having a difficult time getting a data.frame set up for DESeq2. I have done the following:

    datafile <- "E:/Longitudinal Paper/DESeq/0 to 1.txt"

    > datafile

    [1] "E:/Longitudinal Paper/DESeq/0 to 1.txt"

    > countTable = read.delim(datafile, header=TRUE, row.names=1)

    > head(countTable)

    C1 C2 C3 D1 D2 D3 D4
    COX1 244969 257554 243872 235001 237881 178634 202627
    Hsp90ab1 185595 200135 228766 143571 147350 99427 116190
    CYTB 149810 151470 148100 129141 140353 86705 107290
    Eef2 142818 151153 163043 140762 134884 94678 99470
    Col4a1 126366 130972 227447 126424 122709 83403 77633
    ND1 116379 117694 111396 91746 99802 62038 76769

    > ExpDesign = data.frame(row.names=colnames(countTable),
    + condition=c("C1", "C2", "C3", "D1", "D2", "D3", "D4"),
    + libType = c("paired-end","paired-end","paired-end","paired-end","paired-end","paired-end","paired-end"))

    > ExpDesign

    condition libType
    C1 C1 paired-end
    C2 C2 paired-end
    C3 C3 paired-end
    D1 D1 paired-end
    D2 D2 paired-end
    D3 D3 paired-end
    D4 D4 paired-end

    I then try to do the following and get the subsequent errors:

    > data("countTable")
    Warning message:
    In data("countTable") : data set ‘countTable’ not found

    > countData <- counts(countTable)
    Error in (function (classes, fdef, mtable) :
    unable to find an inherited method for function ‘counts’ for signature ‘"data.frame"’

    > colData <- pData(countTable)[,c("condition", "type")]
    Error: could not find function "pData"

    What steps am I missing in between? Thanks for any help!
    Last edited by KHubbard; 10-11-2013, 12:50 PM.
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    data("countTable") doesn't mean what you think. It tries to load an R dataset called "countTable", not convert your data.frame into a format for DESeq2. In the vignette, that works, since it's just loading a specific dataset that comes with an R package. Instead, just use:

    Code:
    cds <-DESeqDataSetFromMatrix(countData = countTable, colData=ExpDesign$condition, design=~ExpDesign$condition)
    BTW, your experimental design is really just ExpDesign$condition, since they're all paired-end (so you needn't include it). Also, are your groups really unreplicated?

    Comment

    • KHubbard
      Junior Member
      • May 2011
      • 8

      #3
      Thanks for the reply!

      In answer to your question, all the "C's" are replicates of one another as are the "D's".

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        Ah, good. Then you want instead:
        Code:
        condition=c("C", "C", "C", "D", "D", "D", "D")

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
          by SEQadmin2



          Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

          Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
          ...
          10-14-2026, 09:55 AM
        • SEQadmin2
          New Genomics Technologies Take Aim at Long-Standing Limits
          by SEQadmin2


          Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

          We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
          ...
          09-28-2026, 10:25 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, Yesterday, 10:52 AM
        0 responses
        10 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-14-2026, 05:39 AM
        0 responses
        19 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-13-2026, 09:56 AM
        0 responses
        17 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-09-2026, 11:14 AM
        0 responses
        27 views
        0 reactions
        Last Post SEQadmin2  
        Working...