  We define a new problem in comparative genomics, denoted PQ-Tree Search, that
takes as input a PQ-tree $T$ representing the known gene orders of a gene
cluster of interest, a gene-to-gene substitution scoring function $h$, integer
parameters $d_T$ and $d_S$, and a new genome $S$. The objective is to identify
in $S$ approximate new instances of the gene cluster that could vary from the
known gene orders by genome rearrangements that are constrained by $T$, by gene
substitutions that are governed by $h$, and by gene deletions and insertions
that are bounded from above by $d_T$ and $d_S$, respectively. We prove that the
PQ-Tree Search problem is NP-hard and propose a parameterized algorithm that
solves the optimization variant of PQ-Tree Search in $O^*(2^{\gamma})$ time,
where $\gamma$ is the maximum degree of a node in $T$ and $O^*$ is used to hide
factors polynomial in the input size. The algorithm is implemented as a search
tool, denoted PQFinder, and applied to search for instances of chromosomal gene
clusters in plasmids, within a dataset of 1,487 prokaryotic genomes. We report
on 29 chromosomal gene clusters that are rearranged in plasmids, where the
rearrangements are guided by the corresponding PQ-tree. One of these results,
coding for a heavy metal efflux pump, is further analysed to exemplify how
PQFinder can be harnessed to reveal interesting new structural variants of
known gene clusters. The code for the tool as well as all the data needed to
reconstruct the results are publicly available on GitHub
(github.com/GaliaZim/PQFinder).
