tidy_vst_psi: Reshape a wide vast-tools inclusion table into a...

View source: R/vst_utils.R

tidy_vst_psiR Documentation

Reshape a wide vast-tools inclusion table into a tidyverse-friendly long table.

Description

This function works with inclusion tables generated both by vast-tools combine or compare. In the latter case, if there's a 'dPSI' column it will be automatically detect and included in the reshaped table.

Usage

tidy_vst_psi(
  vst_psi_tbl,
  num_id_cols = 6,
  num_of_Score_Types = 5,
  quality_col_suffix = "-Q",
  return_quality_scores = TRUE,
  return_S1_only = TRUE,
  verbose = FALSE,
  add_ID_col = FALSE,
  col_ID_name = "banana"
)

Arguments

vst_psi_tbl

A dataframe generated with grep_psi() from a vast-tools inclusion table.

num_id_cols

How many first num_id_cols to consider as info/metadata/IDs of the AS event ID in the table.

num_of_Score_Types

How many quality scores are present in the columns with headers ending with quality_col_suffix.

quality_col_suffix

Suffix identifying the quality control columns. Default is "-Q".

return_quality_scores

Logical. Do you want the individual scores to be returned in the output data.frame? Defaul TRUE.

return_S1_only

Logical. Return only the first quality score, default TRUE, use FALSE for returning ALL num_of_Score_Types quality scores for each event.

verbose

Print out information

add_ID_col

Logical. Do you want to add an extra col_ID_name to the output data.frame? Default FALSE.

col_ID_name

Extra column that could be used to add a new identifier to the data. Default is "banana".

Details

This function works well in conjunction with grep_psi() function.

Value

A reshaped data.frame in long format as tibble.

Examples

grep_psi(path_to_vst_PSI_tbl, vst_id = "HsaEX0000001") |>
    tidy_vst_psi() -> psi_tbl

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