
Create a SummarizedExperiment object from salmon output
Source:R/05_01_quantification_salmon.R
salmon2se.Rd
Create a SummarizedExperiment object from salmon output
Usage
salmon2se(
sample_info = NULL,
level = "gene",
salmondir = "results/05_quantification/salmon",
tx2gene = NULL,
countsFromAbundance = "lengthScaledTPM"
)
Arguments
- sample_info
Data frame of sample metadata created with the functions
create_sample_info
- level
Character indicating to which level expression must be quantified in the SE object. One of "gene" (default), "transcript", or "both". For "both", the SE object will have two assays named "transcript" and "gene".
- salmondir
Directory where quantification files will be stored. Default: results/05_quantification/salmon.
- tx2gene
Data frame of correspondence between genes and transcripts, with gene IDs in the first column and transcript IDs in the second column. Only required if level = 'gene' or 'both'.
- countsFromAbundance
Exactly as in
tximport::tximport
, whether ot not to generate estimated counts using abundance estimates. One of "lengthScaledTPM" (default), "scaledTPM", "no", or "dtuScaledTPM". See ?tximport for details.
Examples
data(sample_info)
data(tx2gene)
salmondir <- system.file("extdata", package="bears")
se_gene <- salmon2se(sample_info, salmondir = salmondir, tx2gene = tx2gene)
#> reading in files with read.delim (install 'readr' package for speed up)
#> 1
#>
#> summarizing abundance
#> summarizing counts
#> summarizing length