blacklist | R Documentation |
Produce a blacklist of genomic regions with a high ratio of duplicate to unique reads. This blacklist can be used to exclude reads for analysis in Aneufinder
, bam2GRanges
and bed2GRanges
. This function produces a pre-blacklist which has to manually be filtered with a sensible cutoff. See the examples section for details.
blacklist(files, assembly, bins, min.mapq = 10, pairedEndReads = FALSE)
files |
A character vector of either BAM or BED files. |
assembly |
Please see |
bins |
A list with one |
min.mapq |
Minimum mapping quality when importing from BAM files. Set |
pairedEndReads |
Set to |
A GRanges-class
with the same coordinates as bins
with metadata columns ratio, duplicated counts and deduplicated counts.
## Get an example BAM file with single-cell-sequencing reads
bamfile <- system.file("extdata", "BB150803_IV_074.bam", package="AneuFinderData")
## Prepare the blacklist
bins <- fixedWidthBins(assembly='mm10', binsizes=1e6, chromosome.format='NCBI')
pre.blacklist <- blacklist(bamfile, bins=bins)
## Plot a histogram to decide on a sensible cutoff
qplot(pre.blacklist$ratio, binwidth=0.1)
## Make the blacklist with cutoff = 1.9
blacklist <- pre.blacklist[pre.blacklist$ratio > 1.9]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.