dispatch_count_lines: Count the number of lines in an input file spec and add it to...

View source: R/metadata.R

dispatch_count_linesR Documentation

Count the number of lines in an input file spec and add it to the metadata.

Description

Sometimes the number of lines of a file is a good proxy for some aspect of a sample. For example, jellyfish provides 1 line for every kmer observed in a sample. This function extracts that number and puts it into each cell of a sample sheet.

Usage

dispatch_count_lines(
  meta,
  search,
  input_file_spec,
  verbose = verbose,
  species = "*",
  basedir = "preprocessing",
  type = "genome",
  inverse = FALSE
)

Arguments

meta

Input metadata

search

Pattern to count

input_file_spec

Input file specification to hunt down the file of interest.

verbose

Print diagnostic information while running?

species

Specify a species to search for.

basedir

Root directory containing the files/logs of metadata.

type

Add columns for only the genome mapping and/or rRNA by default.

inverse

Count the lines that do _not_ match the pattern.


elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.