edgeR will only ever give one P-value/FDR per gene - the P-value/FDR for the contrast you asked it about. In your LRT, you set the group to be "tissue". By default edgeR uses the last coefficient in the matrix, which I believe in this case will be "spleen", so you will be testing the difference between spleen and eye (the alphabetically first term). Effectively this means that the p-value/FDR is the p-value on the hypothesis that openness differs between eye and spleen tissue (ignoring environment).
You can tell edgeR to give you different contrasts - between different groups of samples, or even more complex designs. You could for example ask for differences between liver and eye (exactTest(dge, pairs=1:2) or glmLRT(fit, coef=2)), or even, regions whose difference between clear and dark was different in different tissues (mm <- model.matrix(~ environment + tissue + environment:tissue); glmFit(dge, mm)) but you will never get 18 seperate p-values out of this experimental design.
Intrinsically, what edgeR does is compare read counts in a region for differences. The p-value/FDR gives you a measure of how likely two different groups of counts are if they were drawn from the same distribution. To do that you need two groups of counts: you need at least 3 total samples to do a comparison in edgeR (two from one condition, one from the other), but the results are only really properly valid if you have multiple samples in each group.
The fact that you want a p-value for each sample, suggests to me that the question you are trying to answer is "Is there genuinely a peak in this sample?". EdgeR is not the right tool for that job. You want to be using a tool designed to do that. The tool i've used in the past is MACS.
I guess more details on your experimental setup, and the code you used, would help. But here it seems you are just showing the DE test for 1 sample. Depending on how you ran the test, this could represent your 18 samples (but likely incorrectly), unless the 18 samples are supposed to be replicates, then this analysis may be fine.
If you share your code, and what the setup is supposed to be, then we might be able to help more specifically.
Sure, I am happy to share the code. I'll add a few comments here and there within the code:
So first I work with DESEq2. I'm working with 18 samples like I said, with 3 tissues (eye/liver/spleen). Maybe at the "DESEq ALL" step there is something I need to modify here, but it works just fine. So now we get to edgeR (see comment #2 due to character length being too long):
(Part 2)
I'm sure there's something wrong here to explain why I don't get 18 values and instead get one. I am wondering if maybe:
Might be part of it? When I look at 'lrt' I do see my 18 samples are still inside of it, under samples (a factor with 3 levels -- eye, liver, spleen). Perhaps if you want to try running this code, you can use some snippets from my original files. Here's the count matrix:
And here's the sample-info.txt:
So maybe you could copy+paste the code and make some input files based on what I pasted, assuming you want to give it a go and assuming a count matrix file this small is allowed. Thanks for the help.
You want people to help you, make it as easy as possible. Don't just dump the whole script. Pick out just the parts relevant to the issue. Your PCA and heat maps and ggplot calls are not necessary here.
That's true, my apologies for that. I'll edit this down a bit.