read_snp_columns: Read the output from bcfutils into a count-table-esque

View source: R/variants.R

read_snp_columnsR Documentation

Read the output from bcfutils into a count-table-esque

Description

Previously, I put all my bcfutils output files into one directory. This function would iterate through every file in that directory and add the contents as columns to this growing data table. Now it works by accepting a list of filenames (presumably kept in the metadata for the experiment) and reading them into the data table. It is worth noting that it can accept either a column name or index – which when you think about it is pretty much always true, but in this context is particularly interesting since I changed the names of all the columns when I rewrote this functionality.

Usage

read_snp_columns(
  samples,
  file_lst,
  column = "diff_count",
  verbose = FALSE,
  reader = "readr"
)

Arguments

samples

Sample names to read.

file_lst

Set of files to read.

column

Column from the bcf file to read.

verbose

Print information about the input data.

Value

A big honking data table.

See Also

[readr]


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