Skip to contents

Detect sequencing lanes

Usage

detectLanes(path, pattern = "_L([[:digit:]]{3})")

Arguments

path

character. Sequencing file paths, e.g. FASTQs.

pattern

character(1). Lane grep pattern. Defaults to lanePattern global variable.

Value

integer. Lane numbers.

Note

Updated 2023-10-03.

Examples

## Matching lanes 1-4 for paired-end FASTQ files.
files <- paste0(
    "sample1",
    paste0("_R", seq_len(2L)),
    paste0("_L00", seq_len(4L)),
    ".fastq.gz"
)
x <- detectLanes(files)
print(x)
#> [1] 1 2 3 4