covg_to_df {spiky} | R 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(res, spike, meth = TRUE, ID = NULL)

### Arguments

`res` | the result of running scan_spiked_bam
`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(ssb_res, package="spiky")
    subsetted <- covg_to_df(ssb_res, spike=spike, meth=TRUE)
    summed <- covg_to_df(ssb_res, spike=spike, meth=FALSE)
    round((summed$read_count - subsetted$read_count) / summed$read_count, 3)

[Package spiky version 1.0.0 Index]