Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stephenhart
    Member
    • Sep 2011
    • 16

    #1

    error in DESeq analysis

    Hello,

    I have RNA-seq data, which I am trying to analyze with DESeq. My file (.csv) appears to be correct

    >head(myfile)
    "
    gene_id VZ_w13 VZ_w14a VZ_w14b VZ_w15a VZ_w15b VZ_w16a
    1 ENSG00000253101 0 0 0 0 0 0
    ..."

    However, when I try

    >cds <- newCountDataSet(myfile,conds)

    I get the following error message:

    "Error in newCountDataSet(myfile, conds) : The countData is not integer."

    The problem, as far as I can tell, is that my data are numerical, not integer, because when I run

    >str(myfile)
    "'data.frame': 53507 obs. of 14 variables:
    $ VZ_w13 : num 0 0 0 0 8 0 0 0 0 0 ..."

    Does anyone have a way to make my data integer, not numerical? As you can see, the data are in fact integers.

    Thanks,
    Stephan
  • Dethecor
    Member
    • May 2010
    • 24

    #2
    What about as.integer

    If that is really the problem then applying as.integer to your columns should work (note that: as.integer(12.9) == 12)

    Cheers,
    Paul

    "You are only young once, but you can stay immature indefinitely."

    Comment

    • stephenhart
      Member
      • Sep 2011
      • 16

      #3
      Excuse my ignorance. How do I apply as.integer to my columns?

      Comment

      • Dethecor
        Member
        • May 2010
        • 24

        #4
        Example

        Hi,

        here a toy example, which you can just transfer to your data-set:

        Code:
        > data.frame(SomeValue=seq(0,2,0.4))
          SomeValue
        1       0.0
        2       0.4
        3       0.8
        4       1.2
        5       1.6
        6       2.0
        > the.data <- data.frame(SomeValue=seq(0,2,0.4))
        > the.data$SomeValue
        [1] 0.0 0.4 0.8 1.2 1.6 2.0
        > as.integer(the.data$SomeValue)
        [1] 0 0 0 1 1 2
        > the.data$SomeValue <- as.integer(the.data$SomeValue)
        > the.data$SomeValue
        [1] 0 0 0 1 1 2
        Basically you just apply the function to the column and then replace the column with the result. If you have many columns you might want to use the apply function, which you would do like this:
        Code:
        > the.data <- data.frame(SomeValue=seq(0,2,0.4), AnotherValue=seq(4,6,0.4))
        > the.data
          SomeValue AnotherValue
        1       0.0          4.0
        2       0.4          4.4
        3       0.8          4.8
        4       1.2          5.2
        5       1.6          5.6
        6       2.0          6.0
        > apply( the.data, 2, as.integer )
             SomeValue AnotherValue
        [1,]         0            4
        [2,]         0            4
        [3,]         0            4
        [4,]         1            5
        [5,]         1            5
        [6,]         2            6
        When in doubt, use the R-help system to find out about things.

        Cheers,
        Paul

        "You are only young once, but you can stay immature indefinitely."

        Comment

        • areyes
          Senior Member
          • Aug 2010
          • 165

          #5
          Hi Stephen, looks like the first column of your data are the geneIDs (not integers). Just remove this column and it should be ok. You could use the row.names option when reading the file.

          Comment

          • stephenhart
            Member
            • Sep 2011
            • 16

            #6
            Got it working now. Thanks for your help.

            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, 10-15-2026, 10:52 AM
            0 responses
            23 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            29 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-13-2026, 09:56 AM
            0 responses
            25 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-09-2026, 11:14 AM
            0 responses
            28 views
            0 reactions
            Last Post SEQadmin2  
            Working...