<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>

CC BY-SA 4.0
2019-12-05T11:23:34.857Z
2020-05-31T19:17:53.313Z
2020-05-31T19:17:53.313Z
haci
<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>

CC BY-SA 4.0
2020-06-08T22:38:04.400Z
2020-06-08T22:38:04.400Z
James Hawley
<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>

CC BY-SA 4.0
2019-12-05T09:35:59.280Z
You can filter our genes that do not show variation across samples, they would not be helpful in differentiating samples anyhow.
haci
CC BY-SA 4.0
2019-12-05T09:37:09.480Z
So you mean genes which do not fit the dispersion curve in DESeq2?
Pawan Verma
CC BY-SA 4.0
2019-12-05T11:09:16.327Z
More like they did here: http://pklab.med.harvard.edu/scw2014/subpop_tutorial.html
haci
CC BY-SA 4.0
2019-12-05T11:11:25.257Z
This is really helpful. Thanks a lot :)
Pawan Verma
CC BY-SA 4.0
2019-12-05T11:17:54.843Z
As you found the approach useful, I will re-write this as a formal answer for future reference.
haci
<rna-seq><pca>
Pre-filtering genes for Principal Component Analysis
# 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


---

