readall_tab: Load wiggle data

Description Usage Arguments Value Examples

Description

This function allows you to load tab-separated wiggle data. Adapted from function written by Tovah Markowitz (original function name: readAll.tab).

Usage

1
2
readall_tab(fileLocation, useReadr = TRUE, progressBar = TRUE,
  localCopy = FALSE, asBedGraph = FALSE)

Arguments

fileLocation

A string with the path to the folder containing the wiggle data. No default.

useReadr

Boolean indicating whether to use the much faster read_tsv() from Hadley Wickham's readr package instead of base R's read.table. Defaults to TRUE.

progressBar

Boolean indicating whether to display a progress bar (using R package pbapply). Defaults to TRUE.

localCopy

Boolean indicating whether to create local copy of target files before reading data. If TRUE a local folder is automatically created and deleted after use. Use this argument to avoid reading files directly from shared locations (namely LabShare). Defaults to FALSE.

asBedGraph

Boolean indicating whether to return the data in bedGraph-like format instead of R list of 16 data frames. Genomic coordinates are kept as 1-based. Defaults to FALSE.

Value

Either an R list of 16 data frames, one for each chromosome (asBedGraph=FALSE) or a bedGraph-like data frame (asBedGraph=TRUE).

Examples

1
2
3
4
5
6
7
## Not run: 
readall_tab("/Path/to/wiggles/folder/Red1_WT_reps_SacCer3_2mis_MACS_wiggle_norm/")
readall_tab("/Path/to/wiggles/", useReadr = TRUE, progressBar = TRUE)
readall_tab("/Path/to/wiggles/", useReadr = T, progressBar = T, localCopy = T)
#' readall_tab("/Path/to/wiggles/", asBedgraph = TRUE)

## End(Not run)

luisvalesilva/hwglabr documentation built on May 21, 2019, 8:56 a.m.