read_counts_expt: Read a bunch of count tables and create a usable data frame...

View source: R/expt.R

read_counts_exptR Documentation

Read a bunch of count tables and create a usable data frame from them.

Description

It is worth noting that this function has some logic intended for the elsayed lab's data storage structure. It shouldn't interfere with other usages, but it attempts to take into account different ways the data might be stored.

Usage

read_counts_expt(
  ids,
  files,
  header = FALSE,
  include_summary_rows = FALSE,
  all.x = TRUE,
  all.y = FALSE,
  merge_type = "merge",
  suffix = NULL,
  countdir = NULL,
  tx_gene_map = NULL,
  file_type = NULL,
  ignore_tx_version = TRUE,
  ...
)

Arguments

ids

List of experimental ids.

files

List of files to read.

header

Whether or not the count tables include a header row.

include_summary_rows

Whether HTSeq summary rows should be included.

all.x

When merging (as opposed to join), choose the x data column.

all.y

When merging (as opposed to join), choose the y data column.

merge_type

Choose one, merge or join.

suffix

Optional suffix to add to the filenames when reading them.

countdir

Optional count directory to read from.

tx_gene_map

Dataframe which provides a mapping between transcript IDs and gene IDs.

file_type

Short circuit the file format autodetection.

ignore_tx_version

Pass along TRUE to tximport's parameter ignoreTxIds to alleviate the headaches associated with salmon's stupid transcript ID .x suffix.

...

More options for happy time!

Details

Used primarily in create_expt() This is responsible for reading count tables given a list of filenames. It tries to take into account upper/lowercase filenames and uses data.table to speed things along.

Value

Data frame of count tables.

See Also

[data.table] [create_expt()] [tximport]

Examples

## Not run: 
 count_tables <- hpgl_read_files(as.character(sample_ids), as.character(count_filenames))

## End(Not run)

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