interVsIntraSpeciesExpressionProfileDists: Extracts the inter- and intra-species distances from argument...

View source: R/expression_funks.R

interVsIntraSpeciesExpressionProfileDistsR Documentation

Extracts the inter- and intra-species distances from argument object expr.prof.dists which is expected to be an instance of class base::dist (See expressionProfilesDists for more details).

Description

Extracts the inter- and intra-species distances from argument object expr.prof.dists which is expected to be an instance of class base::dist (See expressionProfilesDists for more details).

Usage

interVsIntraSpeciesExpressionProfileDists(expr.prof.dists,
  gene.ids.to.specs.regex = list(ath = "^AT[0-9CM]G\\d+$", chi =
  "^CARHR\\d+$"))

Arguments

expr.prof.dists

an instance of base::dist a single result from calling expressionProfilesDists.

gene.ids.to.specs.regex

A named character where the names are species and the values are regular expressions capable of uniquely identifying which species a gene accession belongs to. Default is list( 'ath'='^AT[0-9CM]G\d+$', 'chi'='^CARHR\d+$' ) as within this package's application we only have expression data for genes of Arabidopsis and C. hirsuta and in this function's case we are dealing with genes without expression variant identifiers.

Value

A list with either data.frame or numeric values. Data.frames have three columns, two indicating gene pairs and the third the extracted distances, while numeric values point to maximum distances. Result list names are the species found as names in gene.ids.to.specs.regex, inter.species, max.inter.species, and for each species spec_i one max.spec_i. Validate input: Initialize: Validate species: Extract the requested intra-species distances: Do not extract meaningless distances for pairs of identical genes, e.g. (gene_a, gene_a): Extract the requested inter-species distances: Return result as list:


asishallab/GeneFamilies documentation built on May 22, 2023, 11:30 a.m.