\name{dbSearchSimilarPattern} \alias{dbSearchSimilarPattern} \title{Search for similar gene expression or regulation patterns in the database} \description{ \code{dbSearchSimilarPattern} calculates the similarity of a template gene expression or regulation pattern to all gene expression (regulation) patterns in the maDB database. } \usage{ dbSearchSimilarPattern(con,template=NULL,id=NULL,compare.ids=NULL,include.by.pk=NULL,include.by.name=NULL,exclude.by.pk=NULL,exclude.by.name=NULL,what="E",chip="hgu133plus2",include.values=TRUE,v=TRUE,distance.fun=distance.euclidian,orientation="h",column.names=c("name","tissue","exposure_time"),order=TRUE) } \arguments{ \item{con}{The database connection.} \item{template}{A expression (regulation) pattern template (if NULL the id of the gene which expression (regulation) pattern should be used as template must be submitted with the \code{id} attribute).} \item{id}{The ID of the gene that should be used as template (for Affymetrix data the probe set id).} \item{compare.ids}{A set of genes with which the template should be compared. If not submitted all genes in the database will be used.} \item{include.by.pk}{The primary keys of the signal channels (or comparisons) that should be used to build the pattern.} \item{include.by.name}{The name of the samples that should be used to build the pattern.} \item{exclude.by.pk}{The primary keys of the signal channels (or comparisons) that should be excluded.} \item{exclude.by.name}{The name of the samples that should be excluded.} \item{what}{If similar expression pattern (\code{"E"}) or regulation pattern (\code{"M"}) should be searched.} \item{include.values}{See \link{calculateSimilarity}. If TRUE the returned \code{Similarity} class will contain also the data and makes it therefore possible to draw the data.} \item{chip}{The chip (array).} \item{v}{If additional informations should be plotted to the console.} \item{distance.fun}{The function to calculate similarities between vectors.} \item{orientation}{If genes should be compared (\code{"h"}) or samples (\code{"v"}).} \item{column.names}{The columns from the \code{sample} that should be used to build the column names of the data table. By default the column names of the result consist of the sample name, the sample tissue and the sample exposure time.} \item{order}{If the data columns should be ordered in the order of the primary keys (or names) submitted.} } \details{ This function calculates similarities between a template gene expression (regulation) pattern and all available patterns in the database. The function loads the values to compare from the database and calulates the similarity between the template and the matrix using the \code{\link{calculateSimilarity} function. The user can specify the columns of the matrix by the include.by and exclude.by attributes and the rows by the compare.ids attribute (if not specified all genes will be used). If the user wants to compare a specific gene expression pattern (a custom pattern or a pattern of a gene in the database) with the expression pattern of all genes in the database, he has to specify the samples (signal channels) from which the expression values should be taken using the primary keys of the corresponding signal channels in the \code{signal\_channels} database table, or by submitting the names of the samples that are hybridized onto the signal channels. For regulation values the primary keys of the comparisons in the \code{comparisons} table have to be used. As result an instance of the \code{Similarity} class will be returned (see \code{\link{Similarity-class}} for more information).} \\ An example is shown in the package vignette (use \code{\link{openMadbVignette}} to open the documentation). } \value{ A object from the type \code{Similarity}. } \references{} \author{Johannes Rainer} \seealso{ \code{\link{distance.pearson}} \code{\link{distance.euclidian}} \code{\link{distance.spearman}} \code{\link{calculateSimilarity}} \code{\link{Similarity-class}} } \examples{ } \keyword{data}