FRASER: FRASER: Find RAre Splicing Events in RNA-seq data

Description Usage Arguments Details Value Functions Author(s) See Also Examples

View source: R/Fraser-pipeline.R

Description

This help page describes the FRASER function which can be used run the default FRASER pipeline. This pipeline combines the beta-binomial fit, the computation of Z scores and p values as well as the computation of delta-PSI values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
FRASER(
  fds,
  q,
  implementation = c("PCA", "PCA-BB-Decoder", "AE-weighted", "AE", "BB"),
  iterations = 15,
  BPPARAM = bpparam(),
  correction,
  ...
)

calculateZscore(fds, type = currentType(fds), logit = TRUE)

calculatePvalues(
  fds,
  type = currentType(fds),
  implementation = "PCA",
  BPPARAM = bpparam(),
  distributions = c("betabinomial"),
  capN = 5 * 1e+05
)

calculatePadjValues(fds, type = currentType(fds), method = "BY")

Arguments

fds

A FraserDataSet object

q

The encoding dimensions to be used during the fitting proceadure. Should be fitted using optimHyperParams if unknown. If a named vector is provided it is used for the different splicing types.

implementation

The method that should be used to correct for confounders.

iterations

The maximal number of iterations. When the autoencoder has not yet converged after these number of iterations, the fit stops anyway.

BPPARAM

A BiocParallel object to run the computation in parallel

correction

Deprecated. The name changed to implementation.

...

Additional parameters passed on to the internal fit function

type

The type of PSI (psi5, psi3 or theta for theta/splicing efficiency)

logit

Indicates if z scores are computed on the logit scale (default) or in the natural (psi) scale.

distributions

The distribution based on which the p-values are calculated. Possible are beta-binomial, binomial and normal.

capN

Counts are capped at this value to speed up the p-value calculation

method

The p.adjust method that should be used.

Details

All computed values are returned as an FraserDataSet object. To have more control over each analysis step, one can call each function separately.

Available methods to correct for the confounders are currently: a denoising autoencoder with a BB loss ("AE" and "AE-weighted"), PCA ("PCA"), a hybrid approach where PCA is used to fit the latent space and then the decoder of the autoencoder is fit using the BB loss ("PCA-BB-Decoder"). Although not recommended, it is also possible to directly fit the BB distrbution to the raw counts ("BB").

Value

FraserDataSet

Functions

Author(s)

Christian Mertes mertes@in.tum.de

Ines Scheller scheller@in.tum.de

See Also

fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# set default parallel backend
register(SerialParam())

# preprocessing
fds <- createTestFraserDataSet()

# filtering not expressed introns
fds <- calculatePSIValues(fds)
fds <- filterExpressionAndVariability(fds)

# Run the full analysis pipeline: fits distribution and computes p values
fds <- FRASER(fds, q=2, implementation="PCA")

# afterwards, the fitted fds-object can be saved and results can 
# be extracted and visualized, see ?saveFraserDataSet, ?results and 
# ?plotVolcano
 
# The functions run inside the FRASER function can also be directly 
# run themselves. 
# To directly run the fit function:
fds <- fit(fds, implementation="PCA", q=2, type="psi5")

# To directly run the nomial and adjusted p value and z score 
# calculation, the following functions can be used:
fds <- calculatePvalues(fds, type="psi5")
head(pVals(fds, type="psi5"))
fds <- calculatePadjValues(fds, type="psi5", method="BY")
head(padjVals(fds, type="psi5"))
fds <- calculateZscore(fds, type="psi5")
head(zScores(fds, type="psi5")) 

FRASER documentation built on Feb. 3, 2021, 2:01 a.m.