scan_spike_contigs {spiky} | R Documentation |
default workflow is
scan_spike_contigs(bam, spike, param = NULL, ...)
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() |
scan spike contigs and count fragments per contig or per bin.
fit the appropriate model for adjusting genomic contigs based on spikes.
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.
a CompressedGRangesList with bin- and spike-level coverage
Rsamtools::ScanBamParam
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)