convertPQtree: Convert linearly encoded _PQ-trees_ into a two-dimensional...

Description Usage Arguments Details Value References See Also Examples

View source: R/convertPQtree.R

Description

Convert linearly encoded PQ-trees of an ancestral genome reconstruction, for example as output by the software ANGES (Jones et al. 2012), into a two-dimensional PQ-structure that can be used as compgenome input for the functions computeRearrs, summarizeBlocks, and genomeRearrPlot

Usage

1
convertPQtree(rawtree)

Arguments

rawtree

Data frame with a single column that encodes the structure of PQ-trees as strings. See Details.

Details

rawtree is a data frame with a single column encoding an ancestral genome reconstruction as strings, for example as generated by the software ANGES (Chauve & Tannier 2008; Jones et al. 2012). The first row gives the name of the ancestor (preceded by >), followed by two rows for each ancestral genome segment (CAR). The first row of each set gives the CAR ID (preceded by #CAR), and the second row provides the PQ-tree structure of that CAR. The children of each node in the PQ-tree are enclosed by _P and P_ markups for P-nodes, or by _Q and Q_ markups for Q-nodes. Markers (i.e., ortholog IDs) that belong to a particular node are located between its corresponding markups. Markers with reversed orientation are preceded by a - sign. The opening (_P or _Q) and closing (P_ or Q_) markups can be nested to allow the representation of the hierarchical structure of the PQ-tree. For details on PQ-trees see Booth & Lueker 1976, Chauve & Tannier 2008, or the package vignette.

Example of a rawtree object, corresponding to TOY24_compgenome:

>TOY24
#CAR1
_Q 1 2 3 4 5 -6 7 8 Q_
#CAR2
_Q 9 _Q 10 Q_ _Q 11 12 13 Q_ Q_
#CAR3
_Q 14 Q_
#CAR4
_Q _P 15 16 17 18 P_ _Q _Q -19 20 21 Q_ _Q -22 -23 24 Q_ Q_ Q_

Important: The function was designed to work with the ANGES *PQTREE* output file. It was not desiged to work with the ancillary *PQRTREE* or the *DOUBLED* output files.

Value

A data frame encoding PQ-trees of an ancestral genome reconstruction as a two-dimensional PQ-structure.

See the description of the "compgenome" class in the Details section of the checkInfile function for more information on the output format.

References

Booth, K.S. & Lueker, G.S. (1976). Testing for the consecutive ones property, interval graphs, and graph planarity using PQ-Tree algorithms. Journal of Computer and System Sciences, 13, 335–379. doi: 10.1016/S0022-0000(76)80045-1.

Chauve, C. & Tannier, E. (2008). A methodological framework for the reconstruction of contiguous regions of ancestral genomes and its application to mammalian genomes. PLOS Computational Biology, 4, e1000234. doi: 10.1371/journal.pcbi.1000234.

Jones, B. R. et al. (2012). ANGES: reconstructing ANcestral GEnomeS maps. Bioinformatics, 28, 2388–2390. doi: 10.1093/bioinformatics/bts457

See Also

checkInfile, computeRearrs, summarizeBlocks, genomeRearrPlot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

## Read a text file with an ancestral genome reconstruction
## from the software ANGES into R:
MSSYE_PQTREE_HEUR <- read.table("PATH/TO/MSSYE_PQTREE_HEUR",
                                sep = ",", comment.char = "",
                                as.is = TRUE)

## Convert linearly encoded PQ-trees into PQ-structure:
MSSYE_compgenome <- convertPQtree(MSSYE_PQTREE_HEUR)

## End(Not run)

dorolin/rearrvisr documentation built on Aug. 6, 2020, 1:32 a.m.