seekSalmon: calculates differential transcript expression, using the...

Description Usage Arguments Value Examples

View source: R/altSplicing.R

Description

Imports: vst,

Usage

1
seekSalmon(files, samps, txdb, Species, noncontrol)

Arguments

files

vector of strings, specifying the locations of the Salmon output files ("/folderpath/quant.sf")

samps

data.frame containing two or three columns: sample_id, condition, library_layout (optional). sample_id must contain desired sample names in the same order as the files parameter. condition must contain identifiers (integers or strings) to put each sample in a certain group (e.g. wt & ko or 1 & 2). Optionally a "library_layout" column can be added to account for batch effects.

txdb

a TxDb object, made by makeTxDbFromGFF("folderpath/file.gtf.gz") or by loading an existing one loadDb("/folderpath/file.sqlite")

Species

a string, either "human" or "mouse". Is used to generate gene symbols from Ensembl IDs.

noncontrol

of the condition column from samps, which identifier is the non-control (ko, etc.)?

Value

A list with two data.frames and dmDSdata object. [["res"]] contains p values for the test if a gene has differentially regulated isoforms. [["res.txp"]] contains p values for the test if an isoform is differentially regulated. [["d"]] contains the dmDSdata object used to do graphs with plotProportions().

Examples

1
2
3
4
5
6
7
txdb <- GenomicFeatures::makeTxDbFromGFF("/folderpath/gencode.v32.annotation.gtf.gz", organism="Homo sapiens")
#OR
txdb <- AnnotationDbi::loadDb("/folderpath/gencode.v32.annotation.sqlite")
samps <- data.frame(sample_id=c(c1,c2,c3,t1,t2,t3), condition=c(1,1,1,2,2,2))
files <- c("/folderpath/c1/quant.sf", "/folderpath/c2/quant.sf", "/folderpath/c3/quant.sf", "/folderpath/t1/quant.sf", "/folderpath/t2/quant.sf", "/folderpath/t3/quant.sf")
myIso <- seekSalmon(files=files, samps=samps, txdb=txdb, Species="human")
plotProportions(myIso[["d"]], myIso[["res"]]$gene_id[which(res1$adj_pvalue <= 0.05)[1]], "condition")

Solatar/seeqR documentation built on Feb. 19, 2021, 8:07 p.m.