  For a positive integer $n$, the full transformation semigroup $T_n$ consists
of all self maps of the set $\{1,\ldots,n\}$ under composition. Any finite
semigroup $S$ embeds in some $T_n$, and the least such $n$ is called the
(minimum transformation) degree of $S$ and denoted $\mu(S)$. We find degrees
for various classes of finite semigroups, including rectangular bands,
rectangular groups and null semigroups. The formulae we give involve natural
parameters associated to integer compositions. Our results on rectangular bands
answer a question of Easdown from 1992, and our approach utilises some results
of independent interest concerning partitions/colourings of hypergraphs.
  As an application, we prove some results on the degree of a variant $T_n^a$.
(The variant $S^a=(S,\star)$ of a semigroup $S$, with respect to a fixed
element $a\in S$, has underlying set $S$ and operation $x\star y=xay$.) It has
been previously shown that $n\leq \mu(T_n^a)\leq 2n-r$ if the sandwich element
$a$ has rank $r$, and the upper bound of $2n-r$ is known to be sharp if $r\geq
n-1$. Here we show that $\mu(T_n^a)=2n-r$ for $r\geq n-6$. In stark contrast to
this, when $r=1$, and the above inequality says $n\leq\mu(T_n^a)\leq 2n-1$, we
show that $\mu(T_n^a)/n\to1$ and $\mu(T_n^a)-n\to\infty$ as $n\to\infty$.
  Among other results, we also classify the $3$-nilpotent subsemigroups of
$T_n$, and calculate the maximum size of such a subsemigroup.
