read_tuples: Read in list of methtuple files

Description Usage Arguments Value Examples

View source: R/read_tuples.R

Description

This function reads in a list of files obtained from the methtuple tool. It filters out tuples based on the set minimum coverage (min_cov) and the maximum allowed distance (maxGap) between two genomic positions in a tuple.

Usage

1
read_tuples(files, sampleNames, minCoverage = 2, maxGap = 20, verbose = TRUE)

Arguments

files

List of methtuple files.

sampleNames

Names of files in the list.

minCoverage

The minimum coverage per tuple. Tuples with a coverage < minCoverage are filtered out. Default = 2.

maxGap

The maximum allowed distance between two positions in a tuple. Only distances that are <= maxGap are kept. Default = 150 base pairs.

verbose

If the function should be verbose.

Value

A list of data frames, where each data frame corresponds to one file.

Examples

1
2
3
4
5
6
DATA_PATH_DIR <- system.file('extdata', '.', package = 'DAMEfinder')
get_data_path <- function(file_name) file.path(DATA_PATH_DIR, file_name)

tuple_files <- list.files(DATA_PATH_DIR, '.tsv.gz')
tuple_files <- get_data_path(tuple_files)
ASM <- read_tuples(tuple_files, c('CRC1', 'NORM1'))

DAMEfinder documentation built on Nov. 8, 2020, 11:10 p.m.