Gene density and chromosome territory shape