get_spiked_coverage {spiky} | R Documentation

## tabulate coverage across assembly and spike contig subset in natural order

### Description

FIXME: this is wicked slow, ask Herve if a faster version exists

### Usage

    get_spiked_coverage(bf, bp, gr)

### Arguments

`bf` | the BamFile object
`bp` | the ScanBamParam object
`gr` | the GRanges with sorted seqlevels

### Details

Refactored from scan_spiked_bam, this is a very simple wrapper

### Value

a list of Rles

### See Also

scan_spiked_bam

coverage

### Examples

    sb <- system.file("extdata", "example.spike.bam", package="spiky",
                      mustWork=TRUE)
    si <- seqinfo_from_header(sb)
    genome(si) <- "spike"
    data(spike, package="spiky")
    mgr <- get_merged_gr(si, spike=spike) # note canonicalized spikes

    fl <- scanBamFlag(isDuplicate=FALSE, isPaired=TRUE, isProperPair=TRUE)
    bp <- ScanBamParam(flag=fl)
    bamMapqFilter(bp) <- 20
    get_spiked_coverage(sb, bp=bp, gr=mgr)

[Package spiky version 1.0.0 Index]