% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_spiked_coverage.R
\name{get_spiked_coverage}
\alias{get_spiked_coverage}
\title{tabulate coverage across assembly and spike contig subset in natural order}
\usage{
get_spiked_coverage(bf, bp, gr)
}
\arguments{
\item{bf}{the BamFile object}

\item{bp}{the ScanBamParam object}

\item{gr}{the GRanges with sorted seqlevels}
}
\value{
a list of Rles
}
\description{
FIXME: this is wicked slow, ask Herve if a faster version exists
}
\details{
Refactored from scan_spiked_bam, this is a very simple wrapper
}
\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)

}
\seealso{
scan_spiked_bam

coverage
}
