Filter out reads from BAM file
filtOutBAM.Rd
Function that filters out the following reads: 1) aligned no non-cannonical chromosomes, 2) not aligned, 3) aligned to ENCODE blacklisted regions and 3) duplicated reads.
Usage
filtOutBAM(
file,
path_logs,
type = "SE",
remove = c("chrM", "chrUn", "_random", "_hap", "_gl", "EBV"),
blacklist = "~/data/consensusBlacklist.bed",
cores = 6
)
Arguments
- file
Filenme and path for the BAM file to be filtered out.
- path_logs
Character indicating the output directory for the logs.
- type
Sequence type, one of "SE" (single end) or "PE" (paired end).
- remove
Character vector with chr that will be filtered out. Any chromosome name containing matches for these characters will be removed.
- blacklist
Character indicating the file containing blacklist regions in bed format. Any reads overlapping these regions will be discarded.
- cores
Number of cores to use for the analysis.