QGene allows you to make your own plugin of any type. Usually you will want to make a QTL-mapping plugin.
In QGene, all QTL analysis plugins must inherit from QGeneticStatsPlugin. You will need to override the following methods:
- calculate(List<QChromosome> chroms, List<QTrait> traits, IStatistic<? extends QStatsPlugin<QMultiChromValues>> stat)
This method is the main calculation method. The parameters List<QChromosome> and List<QTrait> are the list of chromosomes and list of traits. IStatistic is the requested statistic, such as F or R2. If this is a multiple-trait QTL-analysis plugin, the specified list of t traits is treated as one correlated trait input to your plugin. In this case, the plugin needs to output only one set of output. If this is a single-trait plugin, the plugin will need to output t sets, one for each trait.
This method allows you to check whether the dataset is compatible with your plugin. Return true if it is, and false otherwise. For example, although QGene has the capability to handle various mating designs, you may want to allow only backcross designs. Also, you may want to return false for datasets that contain no trait data, which are useful only for checking genotypic segregation.
In most cases, you will want QGene to handle the display of your output. So the only statement you need to put is:
This is the analog of getOutputType() for QTL interaction output. If you want QGene to handle the display of the QTL interaction output, you need to put:
Note that QGene still does not handle QTL-interaction computation. So please don't override this method yet since we may change the specification.
Returns the array of statistics that your plugin can handle.
If you are building an interval-mapping method and you would like to let QGene calculate genotypic expectation as specified in Jiang and Zeng (1997), return true here.
Return true if your plugin is a multiple-trait analysis plugin.