inclusion_tbl2bed: Create a bed file from events in a vast-tools inclusion table

View source: R/vst_utils.R

inclusion_tbl2bedR Documentation

Create a bed file from events in a vast-tools inclusion table

Description

The input file (specified with path), doesn't need to be specifically a vast-tools output file. As long as the first five columns of the input file match the structure of a vast-tools inclusion table, this function will work.

Usage

inclusion_tbl2bed(
  path,
  header = TRUE,
  remove_chr = FALSE,
  out_bed_name,
  out_path,
  verbose = TRUE
)

Arguments

path

Path to vast-tools inclusion file or a tab delimited file with the same first ID columns as vast-tools inclusion tables.

header

Does the vast-tools inclusion file have a header? If FALSE consider first row as an event.

remove_chr

If TRUE remove 'chr' from the first column of the bed files.

out_bed_name

Name of output bed file, without the .bed extension. If missing use input file basename.

out_path

Path to directory where to save bed file. If folder doesn't exist create it.

verbose

If TRUE print now many lines are in the bed file.

Details

This function can also report the strand for exons, in the future I might implement this also for introns.

Value

a sorted bed file without a header with EVENT ID in the 4th column and gene name in the 5th column.

Examples

inclusion_tbl2bed(path = vst_tbl_path, header = T, remove_chr = T, out_path = bed_dir)

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