symlink.raw.fastqs: Create symlinks to fastq(.gz) files

View source: R/symlink_raw_fastqs.R

symlink.raw.fastqsR Documentation

Create symlinks to fastq(.gz) files

Description

This function creates symlinks in the current directory to fastq OR fastq.gz files in the provided directory.

Usage

symlink.raw.fastqs(
  fastq.dirs,
  delim,
  sample.field,
  pattern = "lane.*fastq\\.gz",
  split = "--",
  replacements = NULL,
  save.sample.names = TRUE
)

Arguments

fastq.dirs

character; path to raw FASTQs directory or a named vector of paths to raw FASTQs directories. If a vector, function will preppend name of path to sample names to keep them distinct.

delim

character; delimiter for finding sample names in fastq file names.

sample.field

integer; field (after cutting) in which to find sample names.

pattern

character; matching pattern for files you want to link. Default is 'lane.*fastq\.gz'.

split

character; character(s) to split the sample name from the read ID in link name, e.g. sample01-R1.fastq.gz OR sample01–R1.fastq.gz. Default is '–'".

replacements

list; a named list of patterns and replacements for file names, e.g. =list(to.replace = c("A", "B"), replace.by = c("a", "b")). Default is NULL.

save.sample.names

logical, whether to grab sample names from file names (TRUE) let user supply sample names directly (FALSE). Default is TRUE.

See Also

system, str_split, list.files, create.processing.env


kstagaman/sharpton-lab-metaGTx.processing documentation built on Oct. 2, 2022, 4:39 p.m.