read_bracken: Function for reading in a bracken taxonomy table

View source: R/mg_profiling.R

read_brackenR Documentation

Function for reading in a bracken taxonomy table

Description

The table will be converted to long form (sample ~ abundance). Only "_frac" or "_num" columns will be kept (see "keep_frac"). Taxonomy will be split into separate levels (see "tax_levs"). tidytable (w/ data.table) used to speed the process up.

Usage

read_bracken(
  infile,
  nrows = Inf,
  keep_frac = TRUE,
  tax_levs = c("Domain", "Phylum", "Class", "Order", "Family", "Genus", "Species"),
  nThread = 4,
  ...
)

Arguments

infile

Path to bracken table file

nrows

Number of table rows to read. If Inf, all lines will be read.

keep_frac

If TRUE, keep all columns ending in "_frac"; otherwise, keep "_num" columns.

tax_levs

Taxonomic levels to separate the taxonomy column into.

...

Params passed to fread()

Value

data.table


leylabmpi/LeyLabRMisc documentation built on Nov. 3, 2022, 3:45 p.m.