Export TSRs to table or BED

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.

Value

Either a BED file or a table.

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.

See also

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

Examples

if (FALSE) { data(TSSs_reduced) exp <- TSSs_reduced %>% tsr_explorer %>% format_counts(data_type="tss") %>% tss_clustering(threshold=3) tsr_export(exp) }