4.2.4. iolib¶
This module contains functions that parses tabular files used to store orthologs or pair values, and to format output such as making PHYLIP matrices.
created: | June 2018 |
---|---|
last modified: | August 2019 |
-
iolib.
phylip
(species, distances)¶ Make the distance matrix for the wanted species in PHYLIP format. The resulting matrix is returned as a single string object.
Warning
If not all species are present in distances, a KeyError exception is raised.
-
iolib.
read_orthos
(name)¶ Read the orthologs from a TSV file and return a set of the orthologs names (from all species) and a mapping of the ortholog names to their orthology group.
The orthologs file is described in the documentation.
-
iolib.
read_values
(orthos, groups, sp_left, sp_right, name)¶ Read the value file at name and return a dict of dict of group ids to species name to Hi-C value.
The values file is described in the documentation.
Note
Extract only the values where all four genes are present in orthos.