Learn R Programming

micropan (version 1.1.2)

isOrtholog: Identifies orthologs in gene clusters

Description

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

Usage

isOrtholog(clustering, dist.table)

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.table
A data.frame with pairwise distances. The columns Sequence.A and Sequence.B contain tags identifying pairs of sequences. The column Distance contains the distances, always a number from 0.0 to 1.0.

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.

Details

The input clustering is typically produced by bClust. The input dist.table 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.

See Also

bDist, bClust.

Examples

Run this code
## Not run: 
# # Loading distance data in the micropan package
# data(list=c("Mpneumoniae.blast.distances","Mpneumoniae.blast.clustering"),
# package="micropan")
# 
# # Finding orthologs
# is.ortholog <- isOrtholog(Mpneumoniae.blast.clustering,
# Mpneumoniae.blast.distances)
# ## End(Not run)

Run the code above in your browser using DataLab