View source: R/get_spike_depth.R
get_spike_depth | R Documentation |
get the (max, median, or mean) coverage for spike-in contigs from a BAM/CRAM
get_spike_depth(covg, spike_gr = NULL, spike = NULL, how = c("max", "mean"))
covg |
the coverage RleList |
spike_gr |
the spike-in GRanges (default: figure out from seqinfo) |
spike |
information about the spikes (default: load |
how |
how to summarize the per-spike coverage (max) |
a GRanges with summarized coverage and features for each
sb <- system.file("extdata", "example.spike.bam", package="spiky", mustWork=TRUE) data(spike, package="spiky") si <- seqinfo_from_header(sb) genome(si) <- "spike" mgr <- get_merged_gr(si,spike=spike) fl <- scanBamFlag(isDuplicate=FALSE, isPaired=TRUE, isProperPair=TRUE) bp <- ScanBamParam(flag=fl) bamMapqFilter(bp) <- 20 covg <- get_spiked_coverage(sb, bp=bp, gr=mgr) get_spike_depth(covg, spike_gr=mgr, spike=spike)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.