Example

On this page we provide an example of how to use Gene Stacker, for the input A.xml which is included in the downloadable Gene Stacker package. We will discuss some of the options such as additional constraints and different heuristics. Experiments were run on an iMac with a 2.5 GHz Intel Core i5 processor and 4 GB of DDR3 RAM.

Basics

Gene Stacker has two required parameters -g,--max-gen <g> and -s,--success-prob <p> that set the maximum number of generations and desired overall success rate, respectively. Here we apply a limit of 4 generations and a success rate of 0.95:

$ java -jar genestacker.jar -g 4 -s 0.95 examples/A.xml out
After about 7 seconds, Gene Stacker reports the following 5 schedules (scroll left to right):

Maximum linkage phase ambiguity (LPA) and expected seeds per crossing

Several of the schedules shown above have a linkage phase ambiguity of up to 28% which indicates that some selected genotypes might have an undesired linkage phase. This risk can be avoided by setting an additional constraint using -lpa,--max-linkage-phase-ambiguity <a>. We will therefore set a maximum of 10% overall linkage phase ambiguity.

Moreover, suppose that we are working with a crop where each crossing yields about 200 seeds. Then, some reported schedules contain targeted genotypes that can not be grown because of lack of seeds. To take this into account, we can use the option -S,--num-seeds <s>. We now rerun Gene Stacker with these additional settings:

$ java -jar genestacker.jar -g 4 -s 0.95 -lpa 0.1 -S 200 examples/A.xml out
Now, Gene Stacker completes in about 4 seconds and reports 4 solutions (scroll left to right):

The first solution has been discarded as its linkage phase ambiguity is too high and the first crossing of the (previously) second schedule is now performed three times to provide a sufficient amount of seeds.

Maximum crossings per plant and maximum plants per generation

Now suppose that for the considered crop, we can only perform two crossings (or one selfing) with each plant. This can be specified using the option -c,--max-crossings-with-plant <c>. Furthermore suppose that we will grow each generation of plants in a greenhouse that has enough available space for 150 plants only. Using the option -p,--max-plants-per-gen <p> we can make sure that at most 150 plants are grown in any generation. Again, we rerun Gene Stacker with these additional constraints:

$ java -jar genestacker.jar -g 4 -s 0.95 -lpa 0.1 -S 200 -c 2 -p 150 examples/A.xml out
After about 5 seconds, Gene Stacker terminates and reports these 4 solutions (scroll left to right):

The schedule with two generations was discarded because of the additional constraints, and no other valid two generation schedule was found. The non-ambiguous three generation schedule was adjusted to meet the new constraints, now having a slightly higher population size (290 instead of 275). This caused the introduction of a new three generation schedule with a small linkage phase ambiguity (8.28%) but a slightly lower total population size (280). The other two schedules remained unchanged, as they already met the new constraints before.

Homozygous ideotype parents

As the ideotype of our example input is heterozygous, it may be desired that the parents of the ideotype are homozygous, so that these can easily be reproduced. This requirement can be imposed using the constraint -hip,--homozygous-ideotype-parents. To run Gene Stacker with this option, in addition to the previous constraints, type

$ java -jar genestacker.jar -g 4 -s 0.95 -lpa 0.1 -S 200 -c 2 -p 150 -hip examples/A.xml out
Here, Gene Stacker reports that no feasible solutions were found, within the constraints. Therefore, we again remove the constraint on the maximum number of plants per generation, to assess whether we can obtain our goal if more resources are available:
$ java -jar genestacker.jar -g 4 -s 0.95 -lpa 0.1 -S 200 -c 2 -hip examples/A.xml out
Now, Gene Stacker does find three solutions (in about 5 seconds):

Note that, in the first two schedules, some plants were grown multiple times to be able to perform all scheduled crossings (because of the constraint -c 2) and that the required population sizes were updated accordingly. The parents of the ideotype are indeed homozygous in each of the reported solutions.

Other heuristic presets

Repeating the previous experiment, but now with a maximum of 5 generations

$ java -jar genestacker.jar -g 5 -s 0.95 -lpa 0.1 -S 200 -c 2 -hip examples/A.xml out
takes more than 3 hours to complete in the default setting that we have used until now. The following solutions are reported (scroll left to right):

We can also apply a different heuristic preset to reduce the runtime of Gene Stacker. Applying preset -faster

$ java -jar genestacker.jar -g 5 -s 0.95 -lpa 0.1 -S 200 -c 2 -hip -faster examples/A.xml out
takes about 8 minutes and yields exactly the same 5 solutions as the default setting (scroll left to right):

Using preset -fastest

$ java -jar genestacker.jar -g 5 -s 0.95 -lpa 0.1 -S 200 -c 2 -hip -fastest examples/A.xml out
Gene Stacker completes after only 4 seconds and reports a more rough approximation of the Pareto frontier consisting of the following 7 schedules (scroll left to right):

The figures below show the approximated Pareto frontiers obtained by the different presets, grouped into non-ambiguous schedules (left) and schedules with a linkage phase ambiguity of 8.28% (right). These plots indicate how the different combinations of heuristics provide an interesting quality-runtime tradeoff.