Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Markus Lindberg
    Junior Member
    • Apr 2014
    • 2

    #1

    DESeq: filtering genes by supplementary information

    Hi all,

    I have noted and read, in different threads on this forum, about filtering data in DESeq. However, the filtering I'm looking for is not primarily about the data quality or reducing hypotheses for limiting FDR.

    My situation is that I will run the nbinomTest()-function from the DESeq package,
    And I will do so on a subset of the data based on supplementary information about the genes. Namely, only those genes which are located on sex-chromosomes. Also, i will compare the result when using different conditions ('cds_object@phenoData@data$condition').

    I already know which genes are located on sex-chromosomes, so that isn't the problem - the problem arises when I want to filter out those genes in a CountDataSet-object (cds-object) in R.
    After size factor and dispersion is estimated, this is not a trivial thing to do since the 'gene-names' is now inside the cds-object, and no longer a column of the count-table.

    The walkaround is to use a different, already filtered, input data (count table) - but that will lead to another sizeFactor, and I don't wan't to call the estimateSizeFactor()-function on the filtered data set since it is genes from the sex-chromosome (we do expect a higher over-all expression in the homogametic sex, depending on the level of dosage compensation - and that should not affect the sizeFactor). So therefore, the full dataset is needed only to aquire the correct sizeFactors. And then, instead of filtering this dataset - I use another, already filtered, dataset (that really is just a subset of the first dataset) and assign the previously aquired sizeFactors to the new cds-object. This feels quite awkward and is also ineffective - especially if you would run in into a situation where different kind of filtering is to be done on the same dataset, and all the filtering is based on supplementary information.

    I feel as it is a better way of doing this. I'm new to both R and DESeq, so it might be something simple that I'm just missing. For example, lets say that I have an R-vector where each element correspond to a gene-name I want to filter out. Is there a way to grep these gene-names in the CountDataSet-object, so that I get the gene-names with corresponding samples' gene-counts, and the sizeFactor is untouched, saved in a new cds-object?

    Thanks in advance
    Markus
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Have you tried just subsetting it as normal (i.e., "cds_object[IDX,]" where IDX is an index of genes of interest)? The CountDataSet extends an eSet, and that's how you'd subset that.

    Comment

    • Markus Lindberg
      Junior Member
      • Apr 2014
      • 2

      #3
      Originally posted by dpryan View Post
      Have you tried just subsetting it as normal (i.e., "cds_object[IDX,]" where IDX is an index of genes of interest)? The CountDataSet extends an eSet, and that's how you'd subset that.
      Hi, and thank you for your quick reply.

      Using standard indexing did not help, since the actual count-table is just a part of the cds_object, not the cds_object itself. However, i did find a way to solve it: The count data can be found in cds_object@assayData$counts. So from there it shouldn't be any problem with indexing and filtering.

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        Right, but if an object offers a method for subsetting then that will typically apply to all of its components. So generally:

        Code:
        cds_sub <- cds_object[IDX,]
        table(counts(cds_sub) == counts(cds_object)[IDX,])
        (or something like that) will yield all True.

        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-22-2026, 11:13 AM
        0 responses
        21 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 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...