I would not use a automatic transfer switch for several circuits, unless I had a seperate emergency panel.
Steve's suggestion is what I would propose. Automatic switches require a seperate emergency panel. I would connect the genset to either the main or the sub, using an interlock kit (www.interlockkit.com)at the panel being fed. You can find other interlocks that are less money. I think the link I gave you runs about $150 and UL approved. You only need one.