  We study particle trapping at the edge of a gap opened by a planet in a
protoplanetary disk. In particular, we explore the effects of turbulence driven
by the magnetorotational instability on particle trapping, using global
three-dimensional magnetohydrodynamic (MHD) simulations including Lagrangian
dust particles. We study disks either in the ideal MHD limit or dominated by
ambipolar diffusion (AD) that plays an essential role at the outer regions of a
protoplanetary disk. With ideal MHD, strong turbulence (the equivalent
viscosity parameter $\alpha\sim 10^{-2}$) in disks prevents vortex formation at
the edge of the gap opened by a 9 $M_{J}$ planet, and most particles (except
the particles that drift fastest) pile up at the outer gap edge almost
axisymmetrically. When AD is considered, turbulence is significantly suppressed
($\alpha\lesssim 10^{-3}$), and a large vortex forms at the edge of the planet
induced gap, which survives $\sim$ 1000 orbits. The vortex can efficiently trap
dust particles that span 3 orders of magnitude in size within 100 planetary
orbits. We have also carried out two-dimensional hydrodynamical simulations
using viscosity as an approximation to MHD turbulence. These hydrodynamical
simulations can reproduce vortex generation at the gap edge as seen in MHD
simulations. Finally, we use our simulation results to generate synthetic
images for ALMA dust continuum observations on Oph IRS 48 and HD 142527, which
show good agreement with existing observations. Predictions for future ALMA
cycle 2 observations have been made. We conclude that the asymmetry in ALMA
observations can be explained by dust trapping vortices and the existence of
vortices could be the evidence that the outer protoplanetary disks are
dominated by ambipolar diffusion with $\alpha<10^{-3}$ at the disk midplane.
