% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/align_target.R
\name{filter_unmapped_reads}
\alias{filter_unmapped_reads}
\title{Filter unmapped reads}
\usage{
filter_unmapped_reads(bamfile)
}
\arguments{
\item{bamfile}{Location for the .bam file to filter & remove all unmapped
reads}
}
\value{
This function will overwrite the existing .bam file with a new .bam
file in the same location that has only mapped lines. The function itself
returns the output .bam file name.
}
\description{
This function will remove all unmapped reads or lines in a .bam file
(warning: overwrites the original file!). This function is needed because
combining multiple .bam files from different microbial libraries may lead to
some reads that mapped to one library and have unmapped entries from another
library. This will remove any unmapped entries and leave all reference mapped
lines in the .bam file.
}
\details{
It is not intended for direct use.
}
