tss_import: Import TSSs

Description Usage Arguments Details Value See Also Examples

View source: R/data_import.R

Description

Import TSSs from a variety of file formats.

Usage

1
tss_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', 'bedgraph', 'bigwig', 'table', or 'ctss'.

delim

Delimiter for tabular input.

Details

TSRexploreR can import TSSs from various file formats. Currently, these are bedGraphs, bigWigs, CTSS files, delimited tables, and TSRchitect tssObjects.

To import TSSs 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 to that TSS in the TSRexploreR object. For bedGraphs and bigWigs, file_1 and file_2 should be the paths to the plus and minus strand TSS files. For CTSS or tabular import, file_1 should be the path to the file, and file_2 can be left blank or filled with NA values.

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

Value

TSRexploreR object with imported TSSs.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
data(TSSs_reduced)

# Export bedGraphs as example data.
exp <- TSSs_reduced %>%
  tsr_explorer %>%
  format_counts(data_type="tss")
tss_export(exp)

# Import the previously created bedGraphs.
samples <- data.frame(
  sample_name="S288C_D_1",
  file_1="S288C_D_1_pos.bedgraph",
  file_2="S288C_D_1_min.bedgraph"
)
tss <- tsr_explorer(sample_sheet=samples)
tss <- tss_import(tss)

## End(Not run)

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