readKallistoResultsOneSample: Read kallisto results for a single sample into a list

Description Usage Arguments Details Value Examples

View source: R/kallisto-wrapper.R

Description

Read kallisto results for a single sample into a list

Usage

1
2
readKallistoResultsOneSample(directory, read_h5 = FALSE,
  kallisto_version = "current")

Arguments

directory

character string giving the path to the directory containing the kallisto results for the sample.

read_h5

logical, if TRUE then read in bootstrap results from the HDF5 object produced by kallisto.

kallisto_version

character string indicating whether or not the version of kallisto to be used is "pre-0.42.2" or "current". This is required because the kallisto developers changed the output file extensions and added features in version 0.42.2.

Details

The directory is expected to contain results for just a single sample. Putting more than one sample's results in the directory will result in unpredictable behaviour with this function. The function looks for the files (with the default names given by kallisto) 'abundance.txt', 'run_info.json' and (if read_h5=TRUE) 'abundance/h5'. If these files are missing, or if results files have different names, then this function will not find them.

Value

A list with two elements: (1) a data.frame abundance with columns for 'target_id' (feature, transcript, gene etc), 'length' (feature length), 'eff_length' (effective feature length), 'est_counts' (estimated feature counts), 'tpm' (transcripts per million) and possibly many columns containing bootstrap estimated counts; and (2) a list run_info with details about the kallisto run that generated the results.

Examples

1
2
# If kallisto results are in the directory "output", then call:
# readKallistoResultsOneSample("output")

dynverse/scaterlegacy documentation built on Feb. 17, 2020, 5:07 a.m.