in after effects i can drag a folder with sequences onto the comp button in the project window and it will create a comp and use the attributes of the sequences to set the comp settings.
is there a way of doing this with an expression?
Nope. Expressions are strictly for creating animation within a layer property(Position, Opacity, Rotation, etc....). Creating Folders, Comps, Assembling sequences and such can be done through scripting.