tss_export: Export TSSs

Description Usage Arguments Details Value See Also Examples

View source: R/data_export.R

Description

Export TSSs to bedGraph, bigWig, or table format.

Usage

1
2
3
4
5
6
7
8
9
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.

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.

Value

bedGraphs or bigWigs split by strand, or a table.

See Also

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

Examples

1
2
3
4
5
6
7
8
9
data(TSSs_reduced)

## Not run: 
exp <- TSSs_reduced %>%
  tsr_explorer %>%
  format_counts(data_type="tss")
tss_export(exp)

## End(Not run)

rpolicastro/tsrexplorer documentation built on Oct. 17, 2021, 3:02 p.m.