In fly genetics, genotypes are conventionally represented with a math-like notation, in which genes carried by homologous chromosomes are written on both sides of a fraction bar.1
In order to ease typesetting of fly genotypes in LaTeX documents, I
wrote a small LaTeX package, flygenet. This
package provides a \genotype
macro allowing to write a
genotype using a lighter syntax than LaTeX math-mode macros.
For example, instead of writing
$$ \frac{w\ hira^{HR1(floxed)}}{FM7h}; \frac{P\{w^+\ His2Av-mRFP1\} P\{v^+\ hs-I-CreI.R\}}{TM6,Tb\ Hu} $$
in pure LaTeX, with the \genotype
macro one can simply
write, for a similar result:
\genotype{w hira^{HR1(floxed)}/FM7h; P\{w^+ His2Av-mRFP1\} P\{v^+ hs-I-CreI.R\}/TM6,Tb Hu}
Code | Result |
\genotype{f; cn bw; TM2/Tra} |
![]() |
\genotype{C(1)RM, y^2/Y; In(2LR)O, Cy/Sco; ci^D/ey^D} |
![]() |
\males{nd/Y} \times \virgins{FM7a; In(2LR)O, Cy/Sco} |
![]() |
\virgins{In(2LR)O, Cy/+; TM3, Ser/ftz} \times \males{Sco/eve; TM6, Ubx/+} |
![]() |
\virgins{w; In(2LR)O, Cy/odd; P\{w^+ odd^+\}/+} \times \males{w/Y; In(2LR)O, Cy/odd; P\{w^+ odd^+\}/+} |
![]() |
The latest released version of the package can be found here:
flygenet-0.3.tar.gz (application/gzip, 268K)
And the latest code can always be found in the Git repository, also clonable with the following command:
$ git clone https://git.incenp.org/damien/flygenet.git