% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{ClosestCases}
\alias{ClosestCases}
\title{ClosestCases}
\usage{
ClosestCases(datafile, q = 5L, method = "trivial", dvalue = 0, nthreads = 0L)
}
\arguments{
\item{datafile}{A string with the name of the file containing the individuals/characteristics in jmatrix format.}

\item{q}{The name of closest related individuals to be returned. Default: 5}

\item{method}{The method to be applied to choose the closest values. It must be one of these strings: 'trivial', 'absvalue', 'FDR'.}

\item{dvalue}{The value of the absolute value of the Pearson coefficient or of the False Discovery Rate (FDR), depending on the value of the 'method' parameter}

\item{nthreads}{Number of threads to be used for the parallel calculations with this meaning:\cr
-1: don't use threads.\cr
 0: let the function choose according to the number of individuals (cells) and to the number of available cores.\cr
 Any possitive number > 1: use that number of threads. You can use even more than cores, but this is discouraged and raises a warning.\cr
Default: 0.}
}
\value{
A nxq matrix with the indices (in R notation, starting at 1) of the individuals closest to the individual i at i-th row
                 Index will be 0 in some cases if less than q individuals are found to be close according to the 'absvalue' or 'FDR' criteria
}
\description{
Gets a matrix of size nxp where each file represents an individual (gene, cell,..) and each column its characteristics (counts,...)\cr
stored in a file in jmatrix format and returns a matrix of nxp with contains, for each individual the indices of the q individuals\cr
closest to it. To do so, the Pearson correlation coefficent is calculated between each row. Then, closeness can be measured directly,\cr
as the q values with higher value, but also in a more sophisticated way using the p-values to consider null correlations.
}
\examples{
# To be done
}
