Let $R$ be a local ring which is not Cohen-Macaulay, and let $I\subset R$ be an ideal.
If I know dim($R$), depth($R$) and codim($I$), can I know depth($I$)?
Let $R$ be a local ring which is not Cohen-Macaulay, and let $I\subset R$ be an ideal.
If I know dim($R$), depth($R$) and codim($I$), can I know depth($I$)?
This can depend a lot on what you know about the ideal $I$. I will write $\operatorname{depth}(R/I)$ instead of $\operatorname{depth}(I)$.
For one case, suppose that you know $I$ is generated by a regular sequence $x_1,\cdots,x_t$. Then, $\operatorname{depth}(R/I) = \operatorname{depth}(R)-t$, so no need to bring in $\dim(R)$ or $\operatorname{codim}(I)$.
For another (special) case, suppose $R/I$ has finite projective dimension (e.g., $R$ is regular). Then, $\operatorname{depth}(R/I)=\operatorname{depth}(R)-\operatorname{pd}_R(R/I)$ by the Auslander-Buchsbaum formula. I do not think the projective dimension of $R/I$ can be known just from the other pieces of data you mention -- usually, the Auslander-Buchsbaum formula is most useful to find the projective dimension, not the depth.
In general, I think nothing concrete can be said. One can nearly always cook up ideals $I$ such that $\operatorname{depth}(R/I)=0$ but $\dim(R/I)$, $\dim(R)$, and $\operatorname{depth}(R)$ can be anything you like, e.g. by finding an ideal $I$ such that $I:\mathfrak{m}^\infty\neq I$, where $\mathfrak{m}$ is the maximal ideal of $R$ and $\bullet:\mathfrak{m}^\infty = \cup_n \bullet: \mathfrak{m}^n$ is the saturation at the maximal ideal.
Even without this depth zero problem, I think the situation for a general local ring can be pretty wild.