Trying make a function that performs a sanity check on the results table by plotting the lfc's of genes with the lowest p-adj. Normally I would just separate the columns (my samples) in my count data (DESeq data set) into groups and then perform the necessary arithmetic
log2 (normalizedcountsgroup1 / normalizedcountsgroup2)
However things have gotten more complicated since the function wouldn't know the two groups. Is there a function that I'm not aware of that provides the group "1" or "2" or better yet the normalized counts of each group