**3.1k**wrote:

Hi,

I know it is too naive but when I tried to extract genes with fold-change >2.0 or <0.5 alterations I faced error.

I tried so

```
results <- t[which(abs(t$logFC) > 1 & t$adj.P.Val < 0.05),]
```

This gives me only `fold-change >2.0`

, then how I add `fold-change < 0.5`

to this code please??

Thank you

Try if following works:

I am not sure if it is good to filter the genes by statistical significance and fc at the same time.

9.0kSorry, do you mean I should first filter for statistical significance and then FC or vice versa instead of performing both at the same time????

3.1kI think that it's quite standard to filter based on both fold-change and FDR-adjusted P value. Filtering on just one of these could be problematic.

28kThank you, you are saving me from re-performing because today morning I had completed filtering based on both

3.1kI think that it's generally accepted that fold-changes in RNA-seq can be exaggerated (particularly when based on FPKM-normalised counts), but I think that you would face more criticism by

notusing a combination of fold-change and FDR-adjusted P value.28kIMO, first filter by statistical significance and then by fc. Double filtering (using both p-value and fc at the same time) in microarray analysis is contested multiple times and infact Limma toptable function (for microarray analysis) suggests not to filter by fc and p-value at the same time (https://www.rdocumentation.org/packages/limma/versions/3.28.14/topics/toptable). Double filtering (filtering by fc and p-value from statistical test simultaneous) issue is discussed clearly, way back (PMID:19995439 PMCID:PMC2801685). Here is a long discussion on this on researchgate: https://www.researchgate.net/post/FDR_or_log_fold_change_which_one_is_the_priority_for_selecting_the_DEGs. Here (https://support.bioconductor.org/p/62286/) and here (https://support.bioconductor.org/p/64787/), Gordon Smyth (from EdgeR) discourages filtering by FC and P-value simultaneously (unless I misunderstood the post) for RNAseq data and microarray data. One should be filtering (by fc) within some statistical limits (frame)

In addition, In most of the RNAseq, Exon arrays and Microarray data analysis (recently), I have seen filtering/sorting by p-values first, followed by fc. Please note that this doesn't mean that what you are doing is incorrect and should not do what you are doing. But there is enough literature to support filter the results by (adj)p-values first.

9.0kSo you were just implying not to filter using both at the

exactsame time, but instead one after the other in a sequential process.Edit: indeed, I fail to see how this is different from filtering at the same time, provided that the actual function used for filtering is functioning as expected. Also, the end user has to ensure that they know what they're doing. I have seen frequent situations in which a highly statistically significant adjusted P value can be obtained with extremely low fold changes due to a reasonably high level of variation in the data being tested. Equally, one can obtain extremely large fold-changes on other types of data but where the the statistical significance can be almost approaching 1.

28kThank you, I am working with seven independent microarray GSE series with limma top tables in my hand, now I am going to filter first by adj.P.Val then by fold change.

3.1kOkay. For the record, as per cpad, I never actually use the lfc parameter in

`limma()`

when filtering (lfc allows filtering on log2 fold change). I just filter based on adjusted P value and work from there. I rely on other QC and filtering to ensure that the data is properly normalised and that variance will not be an issue in biasing statistics. As I think back in the past, I have only used fold-change cut-offs if asked by a superior to apply it.All that said, again, it's not wrong to filter by both at the same time provided you understand what's happening, and the potential pitfalls.

28kif you are using limma toptable function, read about treat and toptreat. Copy/pasted from toptable function:

9.0kThanks a lot both of you Kevin and cpad0112 for your time and considerations.

3.1k