Apply a regular expression replacement to sample names and update all relevant slots consistently (counts, CNV, enrichment, zygosity, libraries, and the sampleTable).

renameQsetNames(qseaSet, pattern, replacement = "")

Arguments

qseaSet

qseaSet A qseaSet object containing methylation-enriched sequencing data.

pattern

character(1) Regular expression used to match substrings in sample names.

replacement

character(1) String to replace matches of pattern. Defaults to "" (empty string).

Value

A qseaSet object:

  • renameQsetNames(): returns the input qseaSet with sample names updated according to pattern and replacement. All dependent slots are updated consistently.

Examples

data(exampleTumourNormal, package = "mesa")

# Replace "T" with "Tumour" in sample names
renameQsetNames(exampleTumourNormal,
    pattern = "T",
    replacement = "Tumour"
)
#> qseaSet
#> =======================================
#> 10 Samples: 
#> Colon1_N, Colon1_Tumour, Colon2_N, Colon2_Tumour, Lung1_N, Lung1_Tumour, Lung2_N, Lung2_Tumour, Lung3_N, Lung3_Tumour
#> 819 Regions in 22 chromosomes of BSgenome.Hsapiens.NCBI.GRCh38