Compute Tasks

The program Compute is used to compute tasks. The usage differ depending on the task and can be printed by typing

  $ java softparsmap.Compute [property file] [task did]
To define your own task, extend the abstract class Compute (or any of its sub classes) and the abstract tag found in def.xml. For more information see section Create a Tag Instance

All tasks extending ComputeFamilyGroup have following usage

  $ java softparsmap.Compute [property file] [task did]
    [family group did] [ | [family #]] 
and it is possible to compute all families in the family group or just one by adding the number last. If only one is computed, it is done in verbose mode.

Rooting Gene Trees

The task with did="root" roots free gene trees by minimizing duplications and loss while allowing weak edges to be collapsed. In-paralogous can also be removed. The final tree will be written to the file specified by the attribute template_target and if there are nodes with more then two children, these nodes are written to a file specified by the attribute template_target_non_binary. So the output of this task is one or two files per family. Below is an overview of the algorithm.

  1. Find a list of rooted gene trees using the free gene tree. It is possible to remove in-paralogous while finding the root. For details see method SpeciesNode.minimizeMutation(...) in the API.

  2. From this list the preferred tree is chosen using following criteria

    1. the tree with highest resolution is chosen (as close to binary as possible)

    2. if criteria above could not decide, the tree with highest number of strong edges is chosen

    3. if criteria above could not decide, the tree with the smallest root distance is chosen

    4. if criteria above could not decide, the first tree in the list will be chosen and a warning will be printed

    If you want to choose the preferred tree in a different manner extend the abstract class PreferredTree and change the attribute preferred_tree found in this task tag. For more information see section Create a Tag Instance

  3. If the attribute resolve_uncertainties_using_species_splits="yes" then uncertainties are resolved in the chosen tree by inserting splits from the species tree

  4. If the attribute resolve_uncertainties_using_outgroups="yes" then uncertainties are resolved by using out-groups in combination with the original tree

  5. If the method removeBeforeSaving() in the in-paralogous instance defined by the attribute inparalogous return true, in-paralogous are removed.

  6. If the attribute resolve_uncertainties_using_outgroups_before_save="yes" then uncertainties are resolved by using out-groups in combination with the original tree. This is possible because in some cases there might be more uncertainties that the out-group method can resolve after in-paralogous were removed

  7. Save final tree to file

  8. Save uncertain nodes to file

This tag must be extended to define target attributes.

Mapping a Gene Tree into a Species Tree

The task with did="map" will map gene trees onto species trees for a given family group. Duplications and losses are also computed. The result will be written to one file per family. This tag must be extended do define the target attribute.

Compare Gene Trees for Equality

The task with did="compare_gene_trees" compare gene trees from two given family groups. It will compare gene trees with the same family number and the pair will be considered rooted as well as free. This task does not have to be extended since no attribute is required.

Gene Family Numbers

The task with did="family_numbers" prints the family numbers for a given family group. This task does not have to be extended since no attribute is required.