Answers.Body: <p>You can filter out genes that do not show variation across samples, they would not differentiate samples anyway. For the specifics on how to do so, please see the <code>Subpopulation Analysis</code> section of a nice <a href="http://pklab.med.harvard.edu/scw2014/" rel="nofollow noreferrer">single cell RNA-seq workflow</a> from the <a href="http://pklab.med.harvard.edu" rel="nofollow noreferrer">Kharchenko Lab</a>. I believe there won't be fundamental differences when applying this approach to bulk RNA-seq.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-05T11:23:34.857Z
Answers.LastActivityDate: 2020-05-31T19:17:53.313Z
Answers.LastEditDate: 2020-05-31T19:17:53.313Z
Answers.UserDisplayName: haci
Answers.Body: <p>I think "the best" way to do this is going to depend on what your question is, unfortunately.</p>
  
  <p>For example, let's say you're trying to find which genes vary by tumour stage.
  Variance of a given gene might be high across all samples, in which case it has no relation to the stage and might be useless for you.
  Alternatively, you may have a lowly-to-moderately expressed gene that does not vary much between samples of the same stage, but differs between stages, which is useful for you.
  However, because it's not highly-expressed, its variance may be small compared to the variance of highly-expressed genes and skipped over.</p>
  
  <p>But if you're trying to do sequencing batch correction to identify batch effects, looking at raw sequencing counts and doing some type of quantile normalization might be all you need.</p>
  
  <p>So I don't think there's a one-size-fits-all answer to your question, unless you're able to refine it a little bit</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-08T22:38:04.400Z
Answers.LastActivityDate: 2020-06-08T22:38:04.400Z
Answers.UserDisplayName: James Hawley
Body: <p>I have a raw counts data-set of 20,502 genes and 137 samples. I want to find out Principal Components which best explain variation between samples in different stages of tumor.</p>
  
  <p>I am new to Machine learning and would like some help in selecting a criteria to reduce the number of genes before doing a PCA. </p>
  
  <p>I have tried doing a DESeq2 analysis on the data-set but I am confused as to what to do next.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-05T09:35:59.280Z
Comments.Text: You can filter our genes that do not show variation across samples, they would not be helpful in differentiating samples anyhow.
Comments.UserDisplayName: haci
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-05T09:37:09.480Z
Comments.Text: So you mean genes which do not fit the dispersion curve in DESeq2?
Comments.UserDisplayName: Pawan Verma
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-05T11:09:16.327Z
Comments.Text: More like they did here: http://pklab.med.harvard.edu/scw2014/subpop_tutorial.html
Comments.UserDisplayName: haci
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-05T11:11:25.257Z
Comments.Text: This is really helpful. Thanks a lot :)
Comments.UserDisplayName: Pawan Verma
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-05T11:17:54.843Z
Comments.Text: As you found the approach useful, I will re-write this as a formal answer for future reference.
Comments.UserDisplayName: haci
Tags: <rna-seq><pca>
Title: Pre-filtering genes for Principal Component Analysis
ThreadText: # Pre-filtering genes for Principal Component Analysis
  
  (Asked by: username_0 on 2019-12-05)
  
  I have a raw counts data-set of 20,502 genes and 137 samples. I want to find out Principal Components which best explain variation between samples in different stages of tumor.
  
  I am new to Machine learning and would like some help in selecting a criteria to reduce the number of genes before doing a PCA.
  
  I have tried doing a DESeq2 analysis on the data-set but I am confused as to what to do next.
  
  **Tags:** rna-seq, pca
  
  > **Comments:**
  > **username_1**: You can filter our genes that do not show variation across samples, they would not be helpful in differentiating samples anyhow.  
  > **username_0**: So you mean genes which do not fit the dispersion curve in DESeq2?  
  > **username_1**: More like they did here: http://pklab.med.harvard.edu/scw2014/subpop_tutorial.html  
  > **username_0**: This is really helpful. Thanks a lot :)  
  > **username_1**: As you found the approach useful, I will re-write this as a formal answer for future reference.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-12-05. Score: 3
  
  You can filter out genes that do not show variation across samples, they would not differentiate samples anyway. For the specifics on how to do so, please see the `Subpopulation Analysis` section of a nice [single cell RNA-seq workflow](http://pklab.med.harvard.edu/scw2014/) from the [Kharchenko Lab](http://pklab.med.harvard.edu). I believe there won't be fundamental differences when applying this approach to bulk RNA-seq.
  
  
  ---
  
  ### Answer by username_2 on 2020-06-08. Score: 0
  
  I think "the best" way to do this is going to depend on what your question is, unfortunately.
  
  For example, let's say you're trying to find which genes vary by tumour stage.
  Variance of a given gene might be high across all samples, in which case it has no relation to the stage and might be useless for you.
  Alternatively, you may have a lowly-to-moderately expressed gene that does not vary much between samples of the same stage, but differs between stages, which is useful for you.
  However, because it's not highly-expressed, its variance may be small compared to the variance of highly-expressed genes and skipped over.
  
  But if you're trying to do sequencing batch correction to identify batch effects, looking at raw sequencing counts and doing some type of quantile normalization might be all you need.
  
  So I don't think there's a one-size-fits-all answer to your question, unless you're able to refine it a little bit
  
  
  ---
  
  