Helper function to remove reads matched to filter libraries
Source:R/filter_host.R
remove_matches.Rd
Using the filter_host()
function, we align our sequencing sample to
all filter libraries of interest. The remove_matches()
function allows
for removal of any target reads that are also aligned to filter libraries.
Arguments
- reads_bam
The name of a merged, sorted .bam file that has previously been aligned to a reference library. Likely, the output from running an instance of
align_target()
.- read_names
A
list
of target query names fromreads_bam
that have also aligned to a filter reference library. Eachlist
element should be a vector of read names.- output
The name of the .bam or .csv.gz file that to which the filtered alignments will be written.
- YS
yieldSize, an integer. The number of alignments to be read in from the bam file at once for chunked functions. Default is 100000.
- threads
The number of threads to be used in filtering the bam file. Default is 1.
- aligner
The aligner which was used to create the bam file.
- make_bam
Logical, whether to also output a bam file with host reads filtered out. A .csv.gz file will be created instead if
FALSE
. Creating a bam file is costly on resources over creating a compressed csv file with only relevant information, so default isFALSE
.- quiet
Turns off most messages. Default is
TRUE
.