readSalmonResultsOneSample: Read Salmon results for a single sample into a list

Description Usage Arguments Details Value Examples

View source: R/salmon-wrapper.R

Description

Read Salmon results for a single sample into a list

Usage

1

Arguments

directory

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

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 Salmon) 'quant.sf', 'stats.tsv', 'libFormatCounts.txt' and the sub-directories 'logs' (which contains a log file) and 'libParams' (which contains a file detailing the fragment length distribution). If these files are missing, or if results files have different names, then this function will not find them.

This function will work for Salmon v0.7.x and greater, as the name of one of the default output directories was changed from "aux" to "aux_info" in Salmon v0.7.

Value

A list with two elements: (1) a data.frame abundance with columns for 'target_id' (feature, transcript, gene etc), 'length' (feature length), 'est_counts' (estimated feature counts), 'tpm' (transcripts per million); (2) a list, run_info, with metadata about the Salmon run that generated the results, including number of reads processed, mapping percentage, the library type used for the RNA-sequencing, including details about number of reads that did not match the given or inferred library type, details about the Salmon command used to generate the results, and so on.

Examples

1
2
3
4
5
## Not run: 
# If Salmon results are in the directory "output", then call:
readSalmonResultsOneSample("output")

## End(Not run)

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