model_glm_pmol {spiky} | R 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(ssb_res) # scan_spiked_bam result
    fit2 <- model_glm_pmol(ssb_res, spike=spike)

[Package spiky version 1.0.0 Index]