shorten_clustering_names: Shorten Clustering Names

View source: R/Seurat.Utils.R

shorten_clustering_namesR Documentation

Shorten Clustering Names

Description

This function takes in a string representing a clustering name, and shortens it according to specific rules. It replaces "snn_res." with "", "best.matching.names" with "bmatch", "ordered" with "ord", "ManualNames" with "mNames", and ".long" at the end of the string with ".L".

Usage

shorten_clustering_names(str)

Arguments

str

A character string representing the clustering name to be shortened.

Value

A character string representing the shortened clustering name.

Examples

## Not run: 
shorten_clustering_names("RNA_snn_res.0.5.ordered.ManualNames") # Returns 'RNA.0.5.ord.mNames'
shorten_clustering_names("RNA_snn_res.0.3.best.matching.names.ManualNames.long") # Returns 'RNA.0.3.bmatch.mNames.L'
shorten_clustering_names("RNA_snn_res.1.7.ordered.ManualNames.Simplest") # Returns 'RNA.1.7.ord.mNames.Simplest'
shorten_clustering_names("RNA_snn_res.0.5.ordered.ManualNames.Simpler") # Returns 'RNA.0.5.ord.mNames.Simpler'

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.