tsr_export: Export TSRs

View source: R/data_export.R

tsr_exportR Documentation

Export TSRs

Description

Export TSRs to table or BED

Usage

tsr_export(
  experiment,
  samples = "all",
  file_type = "bed",
  out_dir = NA,
  diff_tsr = FALSE,
  sep = "\t"
)

Arguments

experiment

TSRexploreR object.

samples

A vector of sample names to analyze.

file_type

Either 'bed' or 'table'.

out_dir

Output directory for files.

diff_tsr

If TRUE, will output differential TSSs.

sep

Delimiter for tabular output.

Details

This function will save TSRs as BED files or a delimited table.

'file_type' controls output file format. 'bed' will result in each sample being saved as a BED file. 'table' will output a file with the delimiter specified by the 'sep' argument. The resulting table will have all columns added to the TSR data in the TSRexplorer object, such as annotation information.

The output directory for the files can be set with 'out_dir'. A value of NA will save the files to the working directory.

If 'diff_tsr' is TRUE, only differential TSRs will be output.

Value

Either a BED file or a table.

See Also

tss_export to export TSSs. tss_import to import TSSs. tsr_import to import TSRs.

Examples

## Not run: 
data(TSSs_reduced)

exp <- TSSs_reduced %>%
  tsr_explorer %>%
  format_counts(data_type="tss") %>%
  tss_clustering(threshold=3)
tsr_export(exp)

## End(Not run)


zentnerlab/TSRexploreR documentation built on Dec. 30, 2022, 10:27 p.m.