read_rmats: Read rMATS Output Files and Process Splicing Event Data

View source: R/utils_rmats.R

read_rmatsR Documentation

Read rMATS Output Files and Process Splicing Event Data

Description

This function reads and processes output files generated by the rMATS (Replicate Multivariate Analysis of Transcript Splicing) software. It imports the data for different types of splicing events, scales the PSI values, and returns a combined data frame with the specified columns (if needed).

Usage

read_rmats(
  outdir,
  reads_counts_method = c("JC", "JCEC"),
  return = c("SHARED_COLS_ONLY", "SE", "ALT53SS", "MXE", "RI", "ALL"),
  max_lines = 1e+09
)

Arguments

outdir

Character. Path/to/the/directory/containing/rMATS/output/files.

reads_counts_method

Character. The method to use for reading counts. Either JC (default) for junction counts or JCEC for junction counts plus exon counts.

return

Character. Specifies the type of data to return. Options are SHARED_COLS_ONLY (default), SE, ALT53SS, MXE, RI, and ALL.

max_lines

Numeric. Maximum number of lines to read from each file. Default is 1e9.

Details

The function processes five types of splicing events: Skipped Exons (SE), Alternative 5' Splice Sites (A5SS), Alternative 3' Splice Sites (A3SS), Mutually Exclusive Exons (MXE), and Retained Introns (RI). It reads the corresponding files, scales the PSI values, and returns a tibble. The user can choose to return only the shared columns across all event types or data specific to a particular event type with return. To understand the different between JC and JCEC please refer to the rMATS manual.

Value

A data frame containing the processed splicing event data. The structure of the returned data frame depends on the value of the return parameter. If return is set to ALL a list of dataframes is returned.

Examples

# result <- read_rmats(outdir = "path/to/rmats/output", reads_counts_method = "JC", return = "SHARED_COLS_ONLY")

Ni-Ar/niar documentation built on Feb. 3, 2025, 9:25 a.m.