Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • frymor
    Senior Member
    • May 2010
    • 151

    how to build the contingency table

    Hi all,

    I have two lists of genes as follows:
    • DEList has 282 gene names
    • AllList has 32805 gene names
    • DEList is a subset of AllList.


    In both lists I've looked for genes which have a specific parameter (e.g. binding site for pol3 and binding site for pol2). The results of this search is in the table below.
    • pol3DE 4
    • pol2DE 190
    • pol3all 85
    • pol2all 12365


    pol3DE and pol2DE are both subsets of the list DEList with the specific parameter binding site for pol3 and binding site for pol2 respectively. pol3all and pol2all are both subsets of the list AllList with the same specific parameters as above.

    I would like to calculate the p-value to see if a higher proportion of pol2-specific genes are in the DEList than the AllList, and likewise for the pol3-specific genes in DEList relative to AllList.

    If I understand it correctly I have six different parameters:
    • AllList - 32805
    • DEList - 282
    • pol3DE - 4
    • pol2DE - 190
    • pol3all - 85
    • pol2all - 12365


    How do I create the contingency table for the Fisher's exact test in this case?
    I have tried and created this one (s. attachment)?

    Can I even use the Fisher's exact test for that, or do I need to use a different one (Xi square, equality of proportion)?

    It doesn't look like it, as I don't have the sum of DEList in nowhere in the table. But does it has to be?

    What I would like to know is not the significance of each group on its own, but whether or not the proportion of of pol2 in the comparison DEList relative to AllList is higher than the proportion of pol3 for the same comparison.
    So Just making two McNemar tests wouldn't really solve the problem, unless I can compare the two p-values.
    I have run the two tests and both p-values are very low, i.e. supposedly significant, but what about against each other. Is there a way to compare this?

    Code:
    pol3 = as.table(rbind(c(32720, 0), 
                         c( 81, 4) ))
    colnames(pol3) <- rownames(pol3) <- c("No", "Yes")
    names(dimnames(pol3)) = c("all", "DE")
    pol3
    mcnemar.test(pol3, correct=FALSE)
    
    	McNemar's Chi-squared test
    
    data:  pol3
    McNemar's chi-squared = 81, df = 1, p-value < 2.2e-16
    
    pol2 = as.table(rbind(c(32720, 0), 
                         c( 81, 4) ))
    colnames(pol2) <- rownames(pol2) <- c("No", "Yes")
    names(dimnames(pol2)) = c("all", "DE")
    pol2
    mcnemar.test(pol2, correct=FALSE)
    
    	McNemar's Chi-squared test
    
    data:  pol2
    McNemar's chi-squared = 81, df = 1, p-value < 2.2e-16
    Thanks

    Assa

    PS.
    I have asked this question also in a different forum, but I still have difficulties to understand this topic.
    Attached Files
    Last edited by frymor; 03-12-2015, 05:57 AM. Reason: clarification
  • sphil
    Senior Member
    • Apr 2010
    • 192

    #2
    Hi,

    AFAIK fishers exact test tries to answer for independence between the two variables. First, I don't think this is what you want to test for (am I right?). Second, i think your groups are not independent from each other, are they? As shown here you can also think of using Mann-Whitney or KS test as they (Broad Institute) do in their GSEA analysis tool.

    HTH

    Comment

    • dpryan
      Devon Ryan
      • Jul 2011
      • 3478

      #3
      I like the suggestion of McNemar's test in your post on cross-validated. That nicely captures how I would personally think about this (assuming you don't want a rank-based approach as pointed out by sphil).

      Comment

      • frymor
        Senior Member
        • May 2010
        • 151

        #4
        Originally posted by dpryan View Post
        I like the suggestion of McNemar's test in your post on cross-validated. That nicely captures how I would personally think about this (assuming you don't want a rank-based approach as pointed out by sphil).
        No I don't need the ranking, as I have only two groups and I would like to show that there is (sort of) a shift in the transcription from the pol3- transcribed genes to the pol2-transcription.
        But What I do need, and I can't seem to figure out how to get with the McNemar's test is the comparison between the two results.

        As mentioned, I have done the test for pol3 and pol2 and both are significant by themselves.
        Is there a way to say if the proportion of pol2 in the comparison is higher than the proportion of pol3 in its own comparison?
        (I was thinking about something like a testing for equality of proportion for the results from the McNemar's test - But does something like that even exists?)

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
          by SEQadmin2


          Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


          The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
          ...
          06-02-2026, 10:05 AM
        • SEQadmin2
          Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
          by SEQadmin2


          With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


          Introduction

          Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
          05-22-2026, 06:42 AM
        • SEQadmin2
          Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
          by SEQadmin2

          Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


          Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
          05-06-2026, 09:04 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, Today, 08:59 AM
        0 responses
        4 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 06-02-2026, 12:03 PM
        0 responses
        21 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 06-02-2026, 11:40 AM
        0 responses
        14 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 05-28-2026, 11:40 AM
        0 responses
        29 views
        0 reactions
        Last Post SEQadmin2  
        Working...