prepareTximportFiles: Prepare quant files for tximport

Description Usage Arguments Details Value Note Examples

View source: R/prepareTximportFiles.R

Description

Prepare quant files for tximport

Usage

1
2
3
4
5
prepareTximportFiles(
  files,
  makeNames = c("makeNames", "snakeCase", "camelCase"),
  exists = TRUE
)

Arguments

files

character. Quant file paths (e.g. "quant.sf" for salmon, "abundance.h5" for kallisto). See tximport() for details.

makeNames

character(1). Syntactic name function to apply on sample names. Uses match.arg() internally. See basejump toolkit for details.

exists

logical(1). Check if requested input exists on disk. Runs realpath() internally.

Details

Runs the following internal comments:

  1. Extract sample directory name from quant file using dirname() and basename().

  2. Autopad zeros, if necessary, via autopadZeros().

  3. Sanitizes names with snakeCase().

  4. Sorts files alphabetically.

Value

character. Return quant file paths, with valid sample names automatically applied.

Note

Updated 2019-10-09.

Examples

1
2
3
4
5
6
7
files <- c(
    file.path("salmon", "1-sample-A", "quant.sf"),
    file.path("salmon", "2-sample-B", "quant.sf")
)
print(files)
files <- prepareTximportFiles(files, makeNames = "snakeCase", exists = FALSE)
print(files)

steinbaugh/DESeqAnalysis documentation built on Sept. 25, 2020, 5:21 a.m.