Aminotransferase; part of the gene cluster that mediates the biosynthesis of swainsonine (SW), a cytotoxic fungal alkaloid and a potential cancer therapy drug (PubMed:28381497). Swainsonine production occurs via a multibranched pathway and is dispensable for fungal colonization of plants and infection of insect hosts (By similarity). The first step of swainsonine biosynthesis is the production of the precursor pipecolic acid (PA) via conversion of L-lysine (Lys) to 1-piperideine-6-carboxylate (P6C) by the aminotransferase swnA, the latter being further reduced to PA by the reductase swnR (By similarity). The PKS-NRPS hybrid synthetase swnK uptakes and condensates PA and malonyl-CoA with and without skipping of the ketoreductase (KR) domain in order to produce 3 intermediates, 1-oxoindolizidine, (1S)-1-hydroxyindolizin, and (1R)-1-hydroxyindolizine; with the transisomer (1S)-1-hydroxyindolizin being predominant (By similarity). The terminal thioester reductase (TE) domain of swnK is involved in reduction of the thioester bond to release the intermediate aldehydes (By similarity). The oxidoreductase swnN could contribute to the reduction of 1-oxoindolizidine to (1S)-1-hydroxyindolizin and (1R)-1-hydroxyindolizine, contributing to the major route of SW production (By similarity). The dioxygenase swnH2 would be responsible for the oxidization of (1R)-1-hydroxyindolizine into (1R,2S)-1,2-dihydroxyindolizine and of (1S)-1-hydroxyindolizin to yield both (1R,2S)-1,2-dihydroxyindolizine and (1S,2S)-1,2-dihydroxyindolizine (By similarity). The dioxygenase swnH1 then performs the conversion of the 1,2-dihydroxyindolizine epimers to SW (By similarity). Mycotoxin biosynthesis. Belongs to the NmrA-type oxidoreductase family. Isoflavone reductase subfamily.