removeData: Remove data from recoup list object

View source: R/util.R

removeDataR Documentation

Remove data from recoup list object

Description

This function clears members of the recoup output object that must be cleared in order to apply a new set of parameters without completely rerunning recoup.

Usage

    removeData(input, type = c("ranges", "coverage", 
        "profile", "reference"))

Arguments

input

a list object created from recoup or its data member.

type

one of "ranges", "coverage", "profile", "reference".

Details

This function clears members of the recoup output object which typically take some time to be calculated but it is necessary to clean them if the user wants to change input parameters that cause recalculations of these members. For example, if the user changes the binParams, the profile matrices ("profile" object member) have to be recalculated.

type controls what data will be removed. "ranges" removes the reads imported from BAM/BED files. This is useful when for example the normalization method is changed. "coverage" removes the calculated coverages over the reference genomic regions. This is required again when the normalization method changes. "profile" removes the profile matrices derived from coverages. This is required for example when the binParams main argument changes. Finally, "reference" removes the genomic loci over which the calculations are taking place. This is required when the genome, refdb or version main arguments change.

Value

A list which is normally the output of recoup without the members that have been removed from it.

Author(s)

Panagiotis Moulos

Examples

# Load some data
data("recoup_test_data",package="recoup")

# Before removing
names(test.input)

# Remove a member
test.input <- removeData(test.input,"ranges")

# Removed
names(test.input)

pmoulos/recoup documentation built on May 20, 2024, 2:22 a.m.