tidytcells.tcr

Functions to clean and standardise TCR gene data.

Functions

tidytcells.tcr.standardise(gene: str | None = None, species: str = 'homosapiens', enforce_functional: bool = False, precision: str = 'allele', suppress_warnings: bool = False, gene_name: str | None = None) str

Attempt to standardise a TCR gene name to be IMGT-compliant.

Parameters:
  • gene (str) – Potentially non-standardised TCR gene name.

  • species (str) – Species to which the TCR gene belongs (see Supported species and species strings). Defaults to 'homosapiens'.

  • enforce_functional (bool) – If True, disallows TCR genes that are recognised by IMGT but are marked as non-functional (ORF or pseudogene). Defaults to False.

  • precision (str) – The maximum level of precision to standardise to. 'allele' standardises to the maximum precision possible. 'gene' standardises only to the level of the gene. Defaults to 'allele'.

  • suppress_warnings (bool) – Disable warnings that are usually emitted when standardisation fails. Defaults to False.

  • gene_name (str) – Alias for the parameter gene.

Returns:

If the specified species is supported, and gene could be standardised, then return the standardised gene name. If species is unsupported, then the function does not attempt to standardise , and returns the unaltered gene string. Else returns None.

Return type:

str or None

tidytcells.tcr.standardize(*args, **kwargs)

Alias for tidytcells.tcr.standardise().