Entering edit mode
rbronste
▴
60
@rbronste-12189
Last seen 5.2 years ago
Wondering if there is a way to filter the following output:
resOrdered <- res[(res$padj < 0.01),]
write.csv(as.data.frame(resOrdered$padj < 0.01),file="test.csv")
so as to get as an output .csv only (something below a padj, with a fold-change cutoff, as well as a minimum baseMean) simultaneously without subsetting? Some internal function within DESeq2?
Thanks!
So something along these lines:
However one question I have, maybe Im missing something but this is from the vignette:
Two arguments to the results function allow for threshold-based Wald tests:
lfcThreshold
, which takes a numeric of a non-negative threshold value, andaltHypothesis
, which specifies the kind of test.So does this mean that the following is not amenable to this lfc adjustment?
Thanks again!
Are you interested in finding genes with large LFC (in absolute value)? If so, you should use the default value for altHypothesis. See the DESeq2 paper or vignette for more details.
So I am actually doing this with converted ChIP-seq counts representing a vehicle or treatment condition, so thought there may be a more nuanced method of approaching those with:
Let's go from the other direction: what kind of LFC are you interested in finding when you compare treatment to vehicle?
So I am just trying to compile a list of DE peaks where for instance LFC < -2 would be considered treatment enhanced and LFC > 2 would be vehicle enhanced. With those between the two LFC values being considered as shared.
Usually we do treated / vehicle, which you can obtain by setting the reference level of the condition variable before you run DESeq(), see this section:
https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#note-on-factor-levels
You can get beta > 2, beta < -2 or |beta| > 2 using these settings:
https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#tests-of-log2-fold-change-above-or-below-a-threshold