Hi people, thank you for helping me.
I would like to ask for help because i cannot change the FDR from defalult 0.1 , to 0.05.
Briefly, my experiment is Differential Expression between Liver and Lung, and i want ,in the last step of this script, filter by FDR 0.05, but when i print the summary, it says the FDR was 0.1.
########### pulmon vs higado ################
library(DESeq2)
library("gplots")
library(RColorBrewer)
library(genefilter)
###set directory##
setwd("/home/isma/Alignment_50bp_TEST/Featurecounts/Counts/merged")
###countdata###
countData <- read.table("countData.txt", header = TRUE, dec = ".", sep
= "\t", row.names = "GeneID") colData <- read.table("colData.txt", header = TRUE, sep = "\t") head(colData)
##Create matrix
dds <- DESeqDataSetFromMatrix(countData = countData,
colData = colData,
design = ~treatment)
### Filter low counts ###
dds <- estimateSizeFactors(dds) idx <- rowSums( counts(dds, normalized=TRUE) >= 50 ) >= 12 dds <- dds[idx,]
#### RUN DEA ####
dds <- DESeq(dds)
dds
#Extract normalized counts###
normalized_counts <- counts(dds, normalized=TRUE) View(normalized_counts)
write.table(as.data.frame(normalized_counts), file = "Count_DEseqNormCount.txt", sep = "\t", dec = ".")
### Differential expression genes ###
res_HIGADOvsPULMON <- results(dds,contrast = c("treatment", "HIGADO", "PULMON"))
summary(res_HIGADOvsPULMON)
### Filter significatives genes for FDR ###
res_HIGADOvsPULMON_Sig <- res_HIGADOvsPULMON[which(res_HIGADOvsPULMON$padj < 0.05),]
summary(res_HIGADOvsPULMON_Sig)
#output from summary(res_HIGADOvsPULMON_Sig)
Out of 46 with nonzero total read count adjusted p-value < 0.1 LFC > 0 (up) : 35, 76%
> LFC < 0 (down) : 11, 24% outliers [1] : 0, 0% low counts [2]
> : 0, 0% (mean count < 64) [1] see 'cooksCutoff' argument of ?results
> [2] see 'independentFiltering' argument of ?results
For your information, I removed the script because it was very malformatted. You can simply copy and paste the script out of Rstudio and then highlight code with the code button
10101
to have it properly displayed. As from what I've seen in it you simply must do:The alpha argument indicates your FDR choice.
THank you! ive modified the post! its clearer to see it now. Thank you
Looks better but please for the future focus on the relevant parts. All the lines above this line:
res_HIGADOvsPULMON <- results(dds,contrast = c("treatment", "HIGADO", "PULMON"))
are not relevant for the question as you are interested in the
summary
function.