makeGR: Make List of GenomicRanges Object

Description Usage Arguments Value Examples

View source: R/makeGR.R

Description

Creates a GenomicRanges object for each methclone output file

Usage

1
makeGR(files, ids, cores = 5, sve = FALSE)

Arguments

files

A vector of input files containing methclone output files, the suffix of files should be methClone_out.gz

ids

A vector of sample ids for the files

cores

The number of cores to be used for parallel execution (default: 5)

sve

A boolean to save the GenomicRanges object (default: FALSE)

Value

A list, each element is a data frame of GenomicRanges objects containing pdr, epipolymorphism, and Shannon entropy values for each input file. Saves as an epi.gr.rda extension

Examples

1
2
3
4
5
6
path <- system.file('extdata', package = 'epihet')
files <- dir(path = path, pattern = 'methClone_out.gz',
            recursive = TRUE, full.names = TRUE)
ids <- basename(dirname(files))
GR.List <- epihet::makeGR(files = files, ids = ids,
cores = 1, sve = FALSE)

epihet documentation built on Dec. 31, 2020, 2:01 a.m.