Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fernas
    Member
    • Apr 2013
    • 74

    #1

    Analysis of Variance between Biological Samples

    Hi all,

    I have a gene expression data matrix consists of about 10000 rows that represent genes and 20 columns represent 20 samples belonging to 2 different groups (10 samples per group).

    I want to prove that the variance between the 10 samples of the first group is more than the variance between the 10 samples of the second group.

    Analysis of Variance (ANOVA) methods may not work here (not sure of that) because it gives bad p-value as the number of variables (genes) are much much more than the number of observations (samples). Do I need to remove correlated genes, or cluster genes? is there any better solution for that?

    Thanks in advance.
  • dariober
    Senior Member
    • May 2010
    • 311

    #2
    Originally posted by Fernas View Post
    Hi all,

    I have a gene expression data matrix consists of about 10000 rows that represent genes and 20 columns represent 20 samples belonging to 2 different groups (10 samples per group).

    I want to prove that the variance between the 10 samples of the first group is more than the variance between the 10 samples of the second group.
    Hi there,

    Here's my suggestion, quite simple really. First count how many genes have variance in the 1st group greater than the variance in the 2nd group. Then apply a binomial test the null hypothesis that this count is equal to 50%. This is a sample R code:

    Code:
    ## Some test data: 100 genes (rows), 20 samples (columns)
    set.seed(1234)
    ngenes<- 100
    grp1<- 1:10
    grp2<- 11:20
    grp<- cbind(
        matrix(nrow= ngenes, ncol= length(grp1), data= rnorm(ngenes * length(grp1), sd= 1.1)),
        matrix(nrow= ngenes, ncol= length(grp2), data= rnorm(ngenes * length(grp2), sd= 1))
    )
    
    grpvar<- apply(grp, 1, function(x) ifelse(var(x[grp1]) > var(x[grp2]), TRUE, FALSE))
    btest<- binom.test(table(grpvar))
    btest
    
    	Exact binomial test
    
    data:  table(grpvar)
    number of successes = 39, number of trials = 100, p-value = 0.0352
    alternative hypothesis: true probability of success is not equal to 0.5
    95 percent confidence interval:
     0.2940104 0.4926855
    sample estimates:
    probability of success 
                      0.39
    I would check that there is no particular sample that gives a lot of variation to either group. Do this by repeating the above but leaving out one sample at a time and checking that the output p-values are in the same range as the initial p-value:

    Code:
    jkn<- vector(length= ncol(grp))
    for(i in 1:ncol(grp)){
        if(i <= max(grp1)){
            grp1b<- grp1[which(grp1 != i)]
        } else {
            grp2b<- grp2[which(grp2 != i)]
        }
        grpvar<- apply(grp, 1, function(x) ifelse(var(x[grp1b]) > var(x[grp2b]), TRUE, FALSE))
        xtest<- binom.test(table(grpvar))
        jkn[i]<- xtest$p.value
    }
    ## Dots should align more or less on a straight line
    qqnorm(-log10(c(btest$p.value, jkn)))
    Similarly, I would leave out groups of genes or sample genes to assess whether the initial result is due to a particular set of genes. However, I guess you would expect most of the genes to have the same variance?

    Just a thought...

    Dario

    Comment

    • Fernas
      Member
      • Apr 2013
      • 74

      #3
      Thank you very much indeed dariober for this clear explanation and suggestion.

      I like the idea and I found it (kind of) comparable to (Rank Sum) test. In this test we calculate the variance of each gene in each group. So, we have to column of variances (column 1 contains variances of all genes in group1, and column 2 has variances of all genes in group2). Then, apply Rank Sum test to test whether both vectors (columns) come from continuous distributions with the same median against the alternative hypothesis that one significantly differ than the other.
      What do you think? which of these two methods looks more related to the question I want to answer?

      Regarding your suggestion: Do I need to normalize the expression matrix row-wise in the beginning or it will not change the results.?

      Thanks again for the informative suggestion.

      Comment

      • Jean
        Member
        • Nov 2008
        • 37

        #4
        Hi.
        We have an RNAseq tool we are working on called ALDEx (ANOVA-like Differential Expression) which will infer variance per sample and per group. If you'd like to give it a try it is available as an R package here:

        Comment

        • Jean
          Member
          • Nov 2008
          • 37

          #5
          Hi.
          We have an RNAseq tool we are working on called ALDEx (ANOVA-like Differential Expression) which will infer expression and variance per group. If you'd like to give it a try it is available as an R package here:

          Comment

          • Fernas
            Member
            • Apr 2013
            • 74

            #6
            Originally posted by Jean View Post
            Hi.
            We have an RNAseq tool we are working on called ALDEx (ANOVA-like Differential Expression) which will infer expression and variance per group. If you'd like to give it a try it is available as an R package here:

            https://code.google.com/p/aldex/
            Thanks Jean for your reply.
            I went quickly through the manual of ALDEx. As the purpose is to study variance between samples within a group (not differentialy expressed genes between two groups), I am not sure if ALDEx tool's functions can provide such information.

            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, 11:13 AM
            0 responses
            17 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, Yesterday, 10:48 AM
            0 responses
            18 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-15-2026, 10:52 AM
            0 responses
            36 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            42 views
            0 reactions
            Last Post SEQadmin2  
            Working...