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

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

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 parameter is optional and only used to calculate the theoretical doublet rate (see EstimateMultipletRate). Should be either 10xV2, 10xV3, or NULL. This does not influence calls directly.

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

maxAllowableDoubletRate

Per caller, the doublet rate will be computed as the total doublets / total droplets (including negatives). Any individual caller with a doublet rate above this value will be converted to NoCall. Note: if 'auto' is chosen, the value will be selected as 3x the theoretical doublet rate (see EstimateMultipletRate).

minAllowableDoubletRateFilter

This is the lower bound allowed for maxAllowableDoubletRate. This is primarily used to avoid excessively low values when selecting 'auto' for maxAllowableDoubletRate.

...

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.