A gene cluster is defined as the k nearest genes surrounding a reference gene according to the rank matrix. The rank matrix is a gene-by-species matrix, where each column contains the genomic ranks of genes for a given species.
getGeneCluster(queryGR, queryGeneName, homologsList, k = 10, radius = 0)The query GRanges outputted by grangesFromEnsemblIDs.
The center gene used to search.
The homologs list outputted by getHomologGeneList.
The maximum number of nearest genes.
The maximum number of gap genes for the search. If radius is set to greater than 0, k parameter will be ignored.
The ids of the cluster for the center gene.
fish <- readRDS(system.file('extdata', 'fish.rds',
package = 'geneClusterPattern'))
homologs <- readRDS(system.file('extdata', 'homologs.rds',
package = 'geneClusterPattern'))
queryGene <- 'inhbaa'
nearestNeighbors <- getGeneCluster(fish, queryGene, homologs)