condenseSampleNames: Simplify sample names for a bsseq object

View source: R/condenseSampleNames.R

condenseSampleNamesR Documentation

Simplify sample names for a bsseq object

Description

Utility function for extracting sample names from tabix'ed sample columns, assuming a VCF-naming scheme (such as Sample_1.foo, Sample_1.bar or Sample1_foo, Sample1_bar).

Usage

condenseSampleNames(tbx, stride, trailing = "\\.$")

Arguments

tbx

A TabixFile instance to parse

stride

How many columns per sample

trailing

Trailing character to trim (DEFAULT: "\.$")

Value

     A character vector of sample names (longest common
               substrings)

Examples


  library(Rsamtools)
  orig_bed <- system.file("extdata", "MCF7_Cunha_chr11p15.bed.gz",
                          package="biscuiteer")
  if (length(headerTabix(orig_bed)$header) > 0) {
    condenseSampleNames(orig_bed, 2)
  }


trichelab/biscuitEater documentation built on March 2, 2024, 6:57 p.m.