When I used Deseq2 package on a Count data table, and then applied the result() function, the log2FoldChange output of this last table is dependent on the number of genes that I had chosen to put in the analysis in the Count data table.
Library size is dependent upon the genes included. In the simplest setting, for a given gene in a given sample the negative-binomial model effectively models the number of counts observed (for that gene) relative to the number of reads observed in total (for that sample). If you change the library size (by altering which genes you include) you will alter the coeficients fitted by the negbin model, and therefore alter the differences in those coeficients between different samples/groups-of-samples.
Remember, DESeq's default library normalization is based on using the gene that has the median expression, and assuming that gene is expressed the same between all the samples. If you subset the genes differently, the median gene picked will be different. If you pick a curated set of 'interesting' genes, that assumption that the median gene is not differentially expressed might be false
Remember, DESeq's default library normalization is based on using the gene that has the median expression, and assuming that gene is expressed the same between all the samples. If you subset the genes differently, the median gene picked will be different. If you pick a curated set of 'interesting' genes, that assumption that the median gene is not differentially expressed might be false