i want to identify and retrieve all DEGs from the data and set the p value<0.05 and fdr<0.01 how can i set the values for p and fdr value using R on linux suse platform? i am using the code given below but it is not showing FDR value coloumn in result and i dnt knw how to set the threshold of fdr which i want to set 0.01 .
> gse <- gse[[1]]
> fData(gse) <- fData(gse)[,c(1,2,10:12)]
> grp <- factor(sapply(strsplit(as.character(pData(gse)[,1]), " "), "[", 1))
> grp
[1] A_set A_set AS_set AS_set AS_set F_set F_set S_set S_set S_set
Levels: A_set AS_set F_set S_set
> design <- model.matrix(~grp)
> fit <- lmFit(gse, design)
> fit2 <- eBayes(fit)
**> tt<- topTable(fit2, coef = 2, adjust = "fdr",n = 50)**
> UP <- subset(tt, tt$logFC > 0)
> DOWN <- subset(tt, tt$logFC < 0)
> head(DOWN)
ID GB_ACC
210004_at 210004_at AF035776
236646_at 236646_at BE301029
1560477_a_at 1560477_a_at AK054643
Gene.Title
210004_at oxidized low density lipoprotein (lectin-like) receptor 1
236646_at transmembrane protein 52B
1560477_a_at sterile alpha motif domain containing 11
Gene.Symbol ENTREZ_GENE_ID logFC AveExpr t
210004_at OLR1 4973 -2.495755 3.516644 -14.90119
236646_at TMEM52B 120939 -1.991936 3.200324 -12.37906
1560477_a_at SAMD11 148398 -1.385055 5.790050 -11.81502
P.Value adj.P.Val B
210004_at 3.134046e-07 0.01713540 3.500307
236646_at 1.353597e-06 0.03551374 3.055998
1560477_a_at 1.948628e-06 0.03551374 2.926959
You don't need FDR if you use adj.P.val (P-value adjusted for multiple testing). It's not the same as FDR, but it has the same purpose. It's quite equivalent in usage.
I changed format for clarity.
It's simple just use order function of subset the data from of top table with for less than 0.01 and then select degs based on direction. Your selection of degs should be first on for threshold followed by logFC.