This function formats a seurat object's metadata (with TCR information appended) for tcrDist3 distance caluclations.

.FormatMetadata(
  metadata,
  chains = c("TRA", "TRB"),
  organism = "human",
  calculateChainPairs = TRUE,
  spikeInDataframe = NULL,
  verbose = FALSE
)

Arguments

metadata

Data frame containing metadata.

chains

TCR chains to include in the analysis. TRA/TRB supported and tested, but others likely work.

organism

Organism to use for tcrDist3. Default is 'human'.

calculateChainPairs

If true, this will prepare the columns needed for A/B and/or G/D (depending on values of chains

spikeInDataframe

Data frame containing spike-in data. Default is NULL. See examples for formatting requirements.

verbose

Boolean controlling whether to display processing steps. Default is FALSE.

Value

a properly formatted metadata dataframe.

Examples

if (FALSE) { # \dontrun{
spikeInDataframe <- data.frame(CloneNames = rep(1:3),
                                 TRA_V = c("TRAV1-2", "TRAV1-2", "TRAV1-2"),
                                 TRA_J = c("TRAJ33", "TRAJ20", "TRAJ33"),
                                 TRA = c("CAVRDSNYQLIW", "CAVSLQDYKLSF", "CAVRDSNYQLIW"),
                                 TRB_V = c("TRBV6-4", "TRBV6-4", "TRBV6-4"),
                                 TRB_J = c("TRBJ1-1", "TRBJ2-1", "TRBJ2-3"),
                                 TRB = c("CASSAAAAAAAAFF", "CASSVVVVVVVVQF", "CASSWWWWWWWWQY"))
} # }