View source: R/scan_genomic_contigs.R
scan_genomic_contigs | R Documentation |
The default workflow for spiky is roughly as follows:
scan_genomic_contigs( bam, spike, param = NULL, bin = TRUE, binwidth = 300L, bins = NULL, standard = TRUE, genome = "hg38", ... )
bam |
the BAM or CRAM filename, or a vector of them |
spike |
the spike-in reference database (e.g. data(spike)) |
param |
a ScanBamParam object specifying which reads to count (NULL) |
bin |
Bin reads? (TRUE) |
binwidth |
width of the bins for chromosomal tiling (300) |
bins |
a pre-tiled GRanges for binning coverage (NULL) |
standard |
restrict non-spike contigs to "standard" chromosomes? (TRUE) |
genome |
Name of genome (default hg38) |
... |
additional arguments to pass to scanBamFlag() |
Identify and quantify the spike-in contigs in an experiment.
Fit a model for sequence-based abundance artifacts using the spike-ins.
Quantify raw fragment abundance on genomic contigs, and adjust per step 2.
scan_genomic_contigs addresses the first half of step 3. The assumption is
that anything which isn't a spike contig, is a genomic contig. This isn't
necessarily true, so the user can also supply a ScanBamParam object for the
param
argument and restrict scanning to whatever contigs they wish, which
also allows for non-default MAPQ, pairing, and quality filters.
If multiple BAM or CRAM filenames are provided, all indices will be checked before attempting to run through any of the files.
a CompressedGRangesList with bin- and spike-level coverage
Rsamtools::ScanBamParam
library(Rsamtools) data(spike, package="spiky") fl <- system.file("extdata", "ex1.bam", package="Rsamtools", mustWork=TRUE) scan_genomic_contigs(fl, spike=spike,standard=FALSE) # will warn user about spike contigs sb <- system.file("extdata", "example_chr21.bam", package="spiky", mustWork=TRUE) scan_genomic_contigs(sb, spike=spike) # will warn user about genomic contigs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.