model_glm_pmol: Build a generalized linear model from spike-ins to correct...

View source: R/model_glm_pmol.R

model_glm_pmolR Documentation

Build a generalized linear model from spike-ins to correct bias in cfMeDIP

Description

formerly '2020_model_glm_fmol'. Note that everything in x can be had from a BAM/CRAM with spike contigs named as frag_grp (len_CpGs_GC) in the index and in fact that is what scan_spiked_bam now does.

Usage

model_glm_pmol(x, spike, conc = NULL, ...)

Arguments

x

data w/frag_grp, id, and read_count; or scan_spiked_bam result

spike

spike database, e.g. data(spike, package='spiky')

conc

concentration for each spike (will be referenced if NULL)

...

other arguments to pass to glm (e.g. family)

Value

   the model fit for the data

Examples


data(spike, package="spiky")

data(spike_read_counts, package="spiky")
fit1 <- model_glm_pmol(spike_read_counts, spike=spike)

data(spike_res) # scan_spiked_bam result
fit2 <- model_glm_pmol(spike_res, spike=spike)


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