Learn R Programming

scater (version 1.0.4)

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

Description

Read Salmon results for a single sample into a list

Usage

readSalmonResultsOneSample(directory)

Arguments

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

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) and possibly many columns containing bootstrap estimated counts; and (2) a list run_info with details about the Salmon run that generated the results.

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.

Examples

Run this code
## Not run: 
# # If Salmon results are in the directory "output", then call:
# readSalmonResultsOneSample("output")
# ## End(Not run)

Run the code above in your browser using DataLab