Multicompartment cell-based modeling of confined migration: regulation by cell intrinsic and extrinsic factors