paired design with continious covariate
2
0
Entering edit mode
@fabianroger-13931
Last seen 4.2 years ago

Hej,

I am analysing data were bacterial communities were exposed to a toxin. I have paired data (before / after) for each community. However, we applied the toxin in a concentration gradient (with no replicates per level but for the control). Now I am interested in finding those OTU's where the difference (before/after exposure within each community) correlate with exposure concentration.

I tried ~BOT + Sampling + Tox but I get the error message the model matrix is not full rank, so the model cannot be fit as specified. One or more variables or interaction terms in the design formula are linear combinations of the others and must be removed.

I probably can make it work by dividing the Tox column into two or three groups (e.g. control, low, high) but this grouping would be somewhat arbitrary. Any pointers would be highly appreciated!

(ps.: I know that the data structure is not ideal but the design was not chosen primarily for DE)

The data look like:

BOT Sampling Tox
1 Mid 0
1 End 0
2 Mid 0
2 End 0
3 Mid 0
3 End 0
4 Mid 1
4 End 1
5 Mid 2
5 End 2
6 Mid 3
6 End 3
7 Mid 4
7 End 4
8 Mid 5
8 End 5
9 Mid 6
9 End 6
deseq2 r • 798 views
ADD COMMENT
0
Entering edit mode

Let me see if I understand, you want to see if the LFCs change for Tox > 0, relative to Tox = 0. Any kind of change, or are you interested in strictly increasing / decreasing change. Because of the lack of replicates, you'll need to specify a bit more about what kind of changes you're interested in over the range Tox > 0.

ADD REPLY
0
Entering edit mode

Yes, that is it. In the range for Tox > 0, I expect the LFC for those OTUs that are sensitive to the treatment to react stronger at stronger concentrations but the response can be expected to be non-linear (i.e. no reaction at low C, then increasingly stronger reactions which might reach a plateau - i.e. dose-response curve like behaviour). Both, changes in positive and negative direction are possible (some OTUs are inhibited, others could be resistant and profit from competitive release). Does this help?

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 14 hours ago
United States

This is covered in the vignette here.

ADD COMMENT
0
Entering edit mode

Ok, sry. You mean that BOTand TOX are perfectly confounded (as in the second case from the vignette) wherefore I cannot take the pairing into account, right? Is there a way to go around that? I am thinking of getting the variance-stabalized counts, calculating the differences between start and end and then check if the differences correlate with toxicity? Could that make sense?

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 20 hours ago
United States

This design will help you to find increases or decreases in the LFCs related to toxicity > 0 compared to toxicity = 0. Because you don't have replicates at the time points, you are a bit limited in what you can find. You have to specify a functional form of what you are looking for. If you want to do something more complicated than finding increases or decreases, I'd suggest working with a statistician.

Make columns of colData that look like this:

sample <- factor(rep(c(1,2,3,1),c(2,2,2,12)))
time <- factor(rep(0:1,9))
tox <- c(rep(0,6),rep(1:6,each=2)) # note: a numeric, not factor

Then you can use a design of ~sample + tox + time + tox:time, and simply run DESeq() and then you can test the interaction term using results(dds). The interaction term will be non-zero if there is an increase of decrease in the LFC due to end/mid as you have above, going along with toxicity and relative to toxicity=0. The null hypothesis for this results table includes those genes where LFCs for toxicity>0 are the same as toxicity=0.

 

ADD COMMENT

Login before adding your answer.

Traffic: 692 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6