Hi!
I am not sure I understand well the parameters alpha and lfc Treshold of this function : results {DESeq2}
I first understood that these parameters allows to choose a p value and log fold change threshold, for example if I chose a pvalue of 0.05 and a log fold change of two then I exptected to only keep the genes with a p-values >0.05 and an absolute log fold change >2..
I proceeded this way :
test_results=results(dds,contrast=c("Cellular_Type","Basal","LP"),lfcThreshold = 2, alpha=0.05)
Then I selected the genes passing the thresholds this way :
sresults_DE = test_results[which(test_results$padj <0.05 & abstest_results$log2FoldChange)>2),
Indeed, the function returns me all the genes without any selection so I don't really understand what are the purpose for this parameters
What will be the difference if I let them by default ?
i already read the details about these two arguments, but I didn't understood. For lfcThreshold is is writen :" a non-negative value which specifies a log2 fold change threshold." so I understood it as a threshold filter as well for alpha "the significance cutoff used for optimizing the independent filtering (by default 0.1)".
Sorry if it's a littble bit duv, I would just like to know id it commanded to define the parameters if there are different from lfc 0 and alpha 0.01 for the DE genes threshold?
Thank you,
Have a good day
hi,
A concise way to put it is that results() always gives you back a table with exactly the same number of rows as the dataset. 'alpha' sets the target FDR for the independent filtering, so this will only change the adjusted p-values. Filtered genes (due to low mean count) will get an NA in the padj column. 'lfcThreshold' changes the null hypothesis for the statistical test and so changes the p-values (which changes the adjusted p-values).
Ok thanks a lot ! So when you wannt only genes with a log FC between two conditions to be greate in absolute value than a threshold is it better to use the lfc Threshold parameter in the results function or is it ok if it's set to 0 by default ?
thanks a lot,
have a good day
I recommend using the lfcThreshold argument, which will change the p-values, and then using an FDR filter. Now you have a gene set defined with an FDR bound, and the null hypothesis includes small fold changes, not just LFC=0.