The following TikZ picture consists of a rectangle containing two ellipses. I'm constructing this by putting a TikZ picture environment inside the node of an including TikZ picture environment. I've seen this idiom used before, but it doesn't seem particularly standard. I've also not seen any documentation on this in the PGF manual.
My main question is, what do I need to do to get the two ellipses centered in the rectangle? To be more precise I want both ellipses to be side by side, at equal distances from the top and bottom of the rectangle, and equal distances on either side of an imaginary vertical line dividing the rectangle into two equal pieces. I guess some resizing of either or both the rectangle and the ellipses will be necessary, and that's Ok. I haven't tried to do that, since I can't even get the ellipses centered correctly. I tried using at (0,0) for ellipse OUTPUT1, and at (3,0) for ellipse OUTPUT2, and experimented with changing those values. TikZ ignores the former as far as I can tell, but does move OUTPUT2 around in response to the latter, but I'm not sure what it is doing. I'm unclear overall on what this at option is doing.
A secondary question is: how do I get the text within the ellipses centered? I've been having problems with this in various contexts (within TikZ), so I must be missing something.
On a more general note, as with lots of things about TikZ, I'm unclear on how this is supposed to work. Is the sub-picture aware of the enclosing node? Is there some "natural" way we can teach the sub-ellipses to respect the bounds of the enclosing node?
I should add that I plan to be using this rectangle as an element in a matrix. Thus it needs to look like one unit. This obviates possible other strategies like using the fit library to draw around the ellipses, per How to write inside an ellipse in TikZ?. I haven't actually tried doing this, so don't know if it would work.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows, positioning}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5em}%
\begin{document}
\begin{tikzpicture}[auto]
\tikzstyle{file} = [ellipse, rounded corners, text width=12em, text height=3em, minimum height=1em, minimum width=1em, align=center, draw]
\tikzstyle{block} = [rectangle, rounded corners, text width=12em, text height=3em, minimum height=2em, minimum width=15em, align=center, draw]
\node [block, minimum height=6em, minimum width=40em] (OUTPUT)
{
\begin{tikzpicture}[anchor=center]
\node [file, inner sep=0pt, draw] (OUTPUT1) at (0,0) {MAP/PED files};
\node [file, right=2em of OUTPUT1, inner sep=0pt, draw] at (3, 0) (OUTPUT2){TFAM/TPED files};
\end{tikzpicture}
\textbf{Data files}\\
};
\end{tikzpicture}
\end{document}

