Export TSSs to bedGraph, bigWig, or table format.

tss_export(
  experiment,
  samples = "all",
  file_type = "bedgraph",
  out_dir = NA,
  diff_tss = FALSE,
  sep = "\t",
  genome_assembly = NULL
)

Arguments

experiment

TSRexploreR object.

samples

A vector of sample names to analyze.

file_type

Either 'bedgraph', 'table', or 'bigwig'.

out_dir

Output directory for files.

diff_tss

If TRUE, will output differential TSSs.

sep

Delimiter for tabular output.

genome_assembly

Genome assembly in FASTA or BSgenome format.

Value

bedGraphs or bigWigs split by strand, or a table.

Details

This function will save TSSs as bedGraphs, bigWigs, or a delimited table

'file_type' controls output file format. 'bedgraph' will result in each sample being saved as two bedGraph files, one for each strand. The bigwig' argument provides a similar result. 'table' will output a file with the delimiter specified by the 'sep' argument. The resulting table will have all columns added to the TSSs 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_tss' is TRUE, only differential TSSs will be output.

See also

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

Examples

data(TSSs_reduced) if (FALSE) { exp <- TSSs_reduced %>% tsr_explorer %>% format_counts(data_type="tss") tss_export(exp) }