covg_to_df: reshape 'scan_spiked_bam' results into data.frames for...

View source: R/covg_to_df.R

covg_to_dfR Documentation

reshape scan_spiked_bam results into data.frames for model_glm_pmol

Description

reshape scan_spiked_bam results into data.frames for model_glm_pmol

Usage

covg_to_df(spike_gr, spike, meth = TRUE, ID = NULL)

Arguments

spike_gr

GRanges of spike contigs (e.g. output object from scan_spiked_bam, scan_spike_contigs, or scan_spike_bedpe)

spike

spike database (as from data(spike, package="spiky"))

meth

only keep methylated spike reads? (TRUE; if FALSE, sum both)

ID

an identifier for this sample, if running several (autogenerate)

Value

 a data.frame with columns 'frag_grp', 'id', and 'read_count'

See Also

scan_spiked_bam

Examples

data(spike, package="spiky")
data(spike_res, package="spiky")
subsetted <- covg_to_df(spike_res, spike=spike, meth=TRUE)
summed <- covg_to_df(spike_res, spike=spike, meth=FALSE)
round((summed$read_count - subsetted$read_count) / summed$read_count, 3)


trichelab/spiky documentation built on Sept. 17, 2022, 8:44 a.m.