dot-makeLabels: Perform the checks and return the labels

.makeLabelsR Documentation

Perform the checks and return the labels

Description

Checks for the presence of labels and returns defaults

Usage

.makeLabels(
  x,
  labels,
  pattern = ".(fast|fq|bam|sam|cram).*",
  col = "Filename",
  ...
)

Arguments

x

A data.frame with a column titled "Filename"

labels

Named vector of labels for plotting

pattern

character Regular expression to remove from filenames

col

character Column to use for generating labels

...

Not used

Details

Takes a named vector of labels and checks for the correct fields. If no vector is supplied, returns the file names missing the specified pattern, which defaults to removing the suffixes fastq(.gz), fq(.gz), bam, sam or cram.

Value

Named character vector

Examples

f <- paste0(c("File1", "File2"), ".fastq")
df <- data.frame(Filename = f, stringsAsFactors = FALSE)
ngsReports:::.makeLabels(df)


UofABioinformaticsHub/fastqcReports documentation built on July 23, 2024, 3:26 p.m.