  Many-body localization for a system of bosons trapped in a one dimensional
lattice is discussed. Two models that may be realized for cold atoms in optical
lattices are considered. The model with a random on-site potential is compared
with previously introduced random interactions model. While the origin and
character of the disorder in both systems is different they show interesting
similar properties. In particular, many-body localization appears for a
sufficiently large disorder as verified by a time evolution of initial density
wave states as well as using statistical properties of energy levels for small
system sizes. Starting with different initial states, we observe that the
localization properties are energy-dependent which reveals an inverted
many-body localization edge in both systems (that finding is also verified by
statistical analysis of energy spectrum). Moreover, we consider computationally
challenging regime of transition between many body localized and extended
phases where we observe a characteristic algebraic decay of density
correlations which may be attributed to subdiffusion (and Griffiths-like
regions) in the studied systems. Ergodicity breaking in the disordered
Bose-Hubbard models is compared with the slowing-down of the time evolution of
the clean system at large interactions.
