isOrtholog {micropan}R Documentation

Identifies orthologs in gene clusters

Description

Finds the ortholog sequences in every cluster based on pairwise distances.

Usage

isOrtholog(clustering, dist.tbl)

Arguments

clustering

A vector of integers indicating the cluster for every sequence. Sequences with the same number belong to the same cluster. The name of each element is the tag identifying the sequence.

dist.tbl

A tibble with pairwise distances. The columns ‘⁠Query⁠’ and ‘⁠Hit⁠’ contain tags identifying pairs of sequences. The column ‘⁠Distance⁠’ contains the distances, always a number from 0.0 to 1.0.

Details

The input clustering is typically produced by bClust. The input dist.tbl is typically produced by bDist.

The concept of orthologs is difficult for prokaryotes, and this function finds orthologs in a simplistic way. For a given cluster, with members from many genomes, there is one ortholog from every genome. In cases where a genome has two or more members in the same cluster, only one of these is an ortholog, the rest are paralogs.

Consider all sequences from the same genome belonging to the same cluster. The ortholog is defined as the one having the smallest sum of distances to all other members of the same cluster, i.e. the one closest to the ‘center’ of the cluster.

Note that the status as ortholog or paralog depends greatly on how clusters are defined in the first place. If you allow large and diverse (and few) clusters, many sequences will be paralogs. If you define tight and homogenous (and many) clusters, almost all sequences will be orthologs.

Value

A vector of logicals with the same number of elements as the input ‘⁠clustering⁠’, indicating if the corresponding sequence is an ortholog (TRUE) or not (FALSE). The name of each element is copied from ‘⁠clustering⁠’.

Author(s)

Lars Snipen and Kristian Hovde Liland.

See Also

bDist, bClust.

Examples

## Not run: 
# Loading distance data and their clustering results
data(list = c("xmpl.bdist","xmpl.bclst"))

# Finding orthologs
is.ortholog <- isOrtholog(xmpl.bclst, xmpl.bdist)
# The orthologs are
which(is.ortholog)

## End(Not run)


[Package micropan version 2.1 Index]