  Kontsevich and Soibelman defined the Donaldson-Thomas invariants of a 3d
Calabi-Yau category with a stability condition. Any cluster variety can produce
an example of such a category, whose corresponding Donaldson-Thomas invariants
are encoded by a special formal automorphism of the cluster variety, known as
the Donaldson-Thomas transformation.
  In this paper we prove a conjecture of Goncharov and Shen in the case of
$\mathrm{GL}_n$, which describes the Donaldson-Thomas transformation of the
double quotient of the double Bruhat cells $H \backslash \mathrm{GL}_n^{u,v}/H$
where $H$ is a maximal torus, as a certain explicit cluster transformation
related to Fomin-Zelevinsky's twist map. Our result, combined with the work of
Gross, Hacking, Keel, and Kontsevich, proves the duality conjecture of Fock and
Goncharov in the case of $H\backslash \mathrm{GL}_n^{u,v}/H$.
