We consider canonically conjugated generalized space and linear momentum operatorsx q andp q in quantum mechanics, associated to a generalized translation operator which produces infinitesimal deformed displacements controlled by a deformation parameter q. A canonical transformation (x,p) → (x q ,p q ) leads the Hamiltonian of a position-dependent mass particle in usual space to another Hamiltonian of a particle with constant mass in a conservative force field of the deformed space. The equation of motion for the classical phase space (x, p) may be expressed in terms of the deformed (dual) q-derivative. We revisit the problem of a q-deformed oscillator in both classical and quantum formalisms. Particularly, this canonical transformation leads a particle with positiondependent mass in a harmonic potential to a particle with constant mass in a Morse potential. The trajectories in phase spaces (x, p) and (x q , p q ) are analyzed for different values of the deformation parameter. Lastly, we compare the results of the problem in classical and quantum formalisms through the principle of correspondence and the WKB approximation.