Skip to content

Commit

Permalink
Cleaned up some of the docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Sep 6, 2024
1 parent 9c55d8e commit 0cb7796
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions R/classifySingleR.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
#' Assign labels to each cell in a test dataset, using a pre-trained classifier combined with an iterative fine-tuning approach.
#'
#' @param test A numeric matrix of single-cell expression values where rows are genes and columns are cells.
#' Each row should be named with the gene name.
#'
#' Alternatively, a \linkS4class{SummarizedExperiment} object containing such a matrix.
#' @param trained A \linkS4class{List} containing the output of the \code{\link{trainSingleR}} function.
#' If the row names of \code{test} are not exactly the same as the reference dataset, the call to \code{trainSingleR} should set \code{test.genes=rownames(test)}.
#'
#' Alternatively, a List of Lists produced by \code{\link{trainSingleR}} for multiple references.
#' @param quantile A numeric scalar specifying the quantile of the correlation distribution to use to compute the score for each label.
#' @param fine.tune A logical scalar indicating whether fine-tuning should be performed.
Expand Down
8 changes: 5 additions & 3 deletions R/trainSingleR.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@
#' The expression values are expected to be log-transformed and normalized.
#'
#' Classification with \code{classifySingleR} assumes that the test dataset contains all marker genes that were detected from the reference.
#' If the test and reference datasets do not have the same genes in the same order, we can specify \code{test.genes} to the row names of the test dataset.
#' If the test and reference datasets do not have the same genes in the same order, we can set \code{test.genes} to the row names of the test dataset.
#' This will instruct \code{trainSingleR} to only consider markers that are present in the test dataset.
#' Any subsequent call to \code{classifySingleR} will also check that \code{test.genes} is consistent with \code{rownames(test)}.
#'
#' Similarly, if \code{restrict} is specified, marker selection will only be performed using this restrictive subset of genes.
#' On a similar note, if \code{restrict} is specified, marker selection will only be performed using the specified subset of genes.
#' This can be convenient for ignoring inappropriate genes like pseudogenes or predicted genes.
#' Note that both parameters have the same effect as just subsetting the input \code{ref}.
#' It has the same effect as filtering out undesirable rows from \code{ref} prior to calling \code{trainSingleR}.
#' Unlike \code{test.genes}, setting \code{restrict} does not introduce further checks on \code{rownames(test)} in \code{classifySingleR}.
#'
#' @section Custom feature specification:
#' Rather than relying on the in-built feature selection, users can pass in their own features of interest to \code{genes}.
Expand Down
3 changes: 3 additions & 0 deletions man/classifySingleR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/trainSingleR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0cb7796

Please sign in to comment.