  We have revisited several interesting questions on how the rapidity-odd
directed flow is developed in relativistic $^{197}$Au+$^{197}$Au collisions at
$\sqrt{s_{NN}}$ = 200 and 39 GeV based on a multiphase transport model. As the
partonic phase evolves with time, the slope of the parton directed flow at
midrapidity region changes from negative to positive as a result of the later
dynamics at 200 GeV, while it remains negative at 39 GeV due to the shorter
life time of the partonic phase. The directed flow splitting for various quark
species due to their different initial eccentricities is observed at 39 GeV,
while the splitting is very small at 200 GeV. From a dynamical coalescence
algorithm with Wigner functions, we found that the directed flow of hadrons is
a result of competition between the coalescence in momentum and coordinate
space as well as further modifications by the hadronic rescatterings.
