scan_spike_contigs {spiky}R Documentation

pretty much what it says: scan spike contigs from a BAM or CRAM file

Description

default workflow is

Usage

scan_spike_contigs(bam, spike, param = NULL, ...)

Arguments

bam

the BAM or CRAM file

spike

the spike-in reference database (e.g. data(spike))

param

a ScanBamParam object, or NULL (will default to MAPQ=20 etc)

...

additional arguments to pass to scanBamFlag()

Details

  1. scan spike contigs and count fragments per contig or per bin.

  2. fit the appropriate model for adjusting genomic contigs based on spikes.

  3. scan and adjust binned fragment tallies along genomic contigs per above.

scan_spike_contigs implements step 1.

add CRAM example here – tested & works with reheadered spike CRAMs. Slower than one might like however.

Value

     a CompressedGRangesList with bin- and spike-level coverage

See Also

    Rsamtools::ScanBamParam

Examples

library(GenomicRanges)
data(spike, package="spiky")
sb <- system.file("extdata", "example.spike.bam", package="spiky",
                  mustWork=TRUE) # switch to a CRAM
res <- scan_spike_contigs(sb, spike=spike) # use default ScanBamParam
summary(res)


[Package spiky version 0.99.999 Index]