mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 10:47:25 +01:00
Use median by default in adjacency methods
This commit is contained in:
parent
33cc33f81a
commit
074902b505
4 changed files with 6 additions and 8 deletions
|
|
@ -32,15 +32,14 @@ densest <- function(data) {
|
||||||
#' distance values for each gene. See [densest()] for the default
|
#' distance values for each gene. See [densest()] for the default
|
||||||
#' implementation.
|
#' implementation.
|
||||||
#' @param summarize A function that will be used to combine the different
|
#' @param summarize A function that will be used to combine the different
|
||||||
#' distances to the reference genes. By default [min()] is used. That means
|
#' distances to the reference genes. By default [stats::median()] is used.
|
||||||
#' the distance to the nearest reference gene will be scored.
|
|
||||||
#'
|
#'
|
||||||
#' @return An object of class `geposan_method`.
|
#' @return An object of class `geposan_method`.
|
||||||
#'
|
#'
|
||||||
#' @seealso [species_adjacency()]
|
#' @seealso [species_adjacency()]
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
adjacency <- function(distance_estimate = densest, summarize = min) {
|
adjacency <- function(distance_estimate = densest, summarize = stats::median) {
|
||||||
method(
|
method(
|
||||||
id = "adjacency",
|
id = "adjacency",
|
||||||
name = "Adjacency",
|
name = "Adjacency",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
#' @seealso [adjacency()]
|
#' @seealso [adjacency()]
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
species_adjacency <- function(distance_estimate = min,
|
species_adjacency <- function(distance_estimate = stats::median,
|
||||||
summarize = stats::median) {
|
summarize = stats::median) {
|
||||||
method(
|
method(
|
||||||
id = "species_adjacency",
|
id = "species_adjacency",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
\alias{adjacency}
|
\alias{adjacency}
|
||||||
\title{Score genes based on their proximity to the reference genes.}
|
\title{Score genes based on their proximity to the reference genes.}
|
||||||
\usage{
|
\usage{
|
||||||
adjacency(distance_estimate = densest, summarize = min)
|
adjacency(distance_estimate = densest, summarize = stats::median)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{distance_estimate}{A function that will be used to summarize the
|
\item{distance_estimate}{A function that will be used to summarize the
|
||||||
|
|
@ -12,8 +12,7 @@ distance values for each gene. See \code{\link[=densest]{densest()}} for the def
|
||||||
implementation.}
|
implementation.}
|
||||||
|
|
||||||
\item{summarize}{A function that will be used to combine the different
|
\item{summarize}{A function that will be used to combine the different
|
||||||
distances to the reference genes. By default \code{\link[=min]{min()}} is used. That means
|
distances to the reference genes. By default \code{\link[stats:median]{stats::median()}} is used.}
|
||||||
the distance to the nearest reference gene will be scored.}
|
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
An object of class \code{geposan_method}.
|
An object of class \code{geposan_method}.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
\alias{species_adjacency}
|
\alias{species_adjacency}
|
||||||
\title{Score genes based on their adjacency to the reference genes within species.}
|
\title{Score genes based on their adjacency to the reference genes within species.}
|
||||||
\usage{
|
\usage{
|
||||||
species_adjacency(distance_estimate = min, summarize = stats::median)
|
species_adjacency(distance_estimate = stats::median, summarize = stats::median)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{distance_estimate}{Function for combining the distance differences
|
\item{distance_estimate}{Function for combining the distance differences
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue