tsr_import: Import TSRs

tsr_importR Documentation

Import TSRs

Description

Function to import TSRs from various sources.

Usage

tsr_import(experiment, sample_sheet = NULL, file_type = "auto", delim = "\t")

Arguments

experiment

TSRexploreR object.

sample_sheet

A sample sheet data.frame or tab delimited file. Must have the columns 'sample_name', 'file_1', and 'file_2'. Additional meta-data columns can be added with sample information such as condition and batch.

file_type

Either 'auto', 'table', or 'bed'.

delim

Delimiter for tabular input.

Details

TSRexploreR can import TSRs from various sources. Currently, these are BED files, delimited tables, and TSRchitect tssObjects.

To import TSRs from files, a sample sheet must first be created. The sample sheet can be a data.frame or tabular file. It should have three columns: sample_name, file_1, and file_2. sample_name specifies the sample name that will be added for that TSR in the TSRexploreR object. file_1 should be the path to the file, and file_2 can be left blank or filled with NA values.

To import TSRs directly from a TSRchitect tssObject, the TSRchitect workflow must first be run up to the 'determineTSR' step.

Value

TSRexploreR object with added TSRs.

See Also

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

Examples

## Not run: 
data(TSSs_reduced)

# Export BED as example data.
exp <- TSSs_reduced %>%
  tsr_explorer %>%
  format_counts(data_type="tss") %>%
  tss_clustering(threshold=3)
tsr_export(exp)

# Import the previously created BED.
samples <- data.frame(
  sample_name="S288C_D_1",
  file_1="S288C_D_1.bed",
  file_2=NA
)
tsr <- tsr_explorer(sample_sheet=samples)
tsr <- tsr_import(tsr)

## End(Not run)


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