GenerateCellHashingCalls: Generate Cell Hashing Calls

View source: R/CellHashing.R

GenerateCellHashingCallsR Documentation

Generate Cell Hashing Calls

Description

The primary methods to generating cell hashing calls from a filtered matrix of count data.

Usage

GenerateCellHashingCalls(
  barcodeMatrix,
  methods = c("bff_cluster", "gmm_demux", "dropletutils"),
  methodsForConsensus = NULL,
  cellbarcodeWhitelist = NULL,
  metricsFile = NULL,
  doTSNE = TRUE,
  doHeatmap = TRUE,
  perCellSaturation = NULL,
  majorityConsensusThreshold = NULL,
  chemistry = "10xV3",
  callerDisagreementThreshold = NULL,
  rawFeatureMatrixH5 = NULL,
  ...
)

Arguments

barcodeMatrix

The filtered matrix of hashing count data

methods

A vector of one or more calling methods to use. Currently supported are: htodemux, multiseq, dropletutils, gmm_demux, demuxem, demuxmix, bff_raw, and bff_cluster

methodsForConsensus

By default, a consensus call will be generated using all methods; however, if this parameter is provided, all algorithms specified by methods will be run, but only the list here will be used for the final consensus call. This allows one to see the results of a given caller without using it for the final calls.

cellbarcodeWhitelist

A vector of expected cell barcodes. This allows reporting on the total set of expected barcodes, not just those in the filtered count matrix.

metricsFile

If provided, summary metrics will be written to this file.

doTSNE

If true, tSNE will be run on the resulting hashing calls after each caller. This can be useful as a sanity check; however, adds time.

doHeatmap

If true, Seurat::HTOHeatmap will be run on the results of each caller. Not supported by all callers.

perCellSaturation

An optional dataframe with the columns cellbarcode and saturation. This will be merged into the final output.

majorityConsensusThreshold

This applies to calculating a consensus call when multiple algorithms are used. If NULL, then all non-negative calls must agree or that cell is marked discordant. If non-NULL, then the number of algorithms returning the top call is divided by the total number of non-negative calls. If this ratio is above the majorityConsensusThreshold, that value is selected. For example, when majorityConsensusThreshold=0.6 and the calls are: HTO-1,HTO-1,Negative,HTO-2, then 2/3 calls are for HTO-1, giving 0.66. This is greater than the majorityConsensusThreshold of 0.6, so HTO-1 is returned. This can be useful for situations where most algorithms agree, but a single caller fails.

chemistry

This string is passed to EstimateMultipletRate. Should be either 10xV2 or 10xV3. This is used to calculate and present the expected doublet rate and does not influence the actual calls.

callerDisagreementThreshold

If provided, the agreement rate will be calculated between each caller and the simple majority call, ignoring discordant and no-call cells. If any caller has an disagreement rate above this threshold, it will be dropped and the consensus call re-calculated. The general idea is to drop a caller that is systematically discordant.

rawFeatureMatrixH5

If either demuxem or demuxmix are used, you must provide the filepath to the 10x h5 gene expression counts file

...

Caller-specific arguments can be passed by prefixing with the method name. For example, htodemux.positive.quantile = 0.95, will be passed to the htodemux positive.quantile argument).

Value

A data frame of results.


BimberLab/cellhashR documentation built on March 20, 2024, 9:23 a.m.