% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generalFunctions.R
\name{.validateModif}
\alias{.validateModif}
\title{Validate Modification Tag in BAM}
\usage{
.validateModif(modif, bamfile, chr, genome)
}
\arguments{
\item{modif}{Character scalar. The MM tag code to validate (e.g. "C+m?").}

\item{bamfile}{Character path to BAM (must exist plus .bai index).}

\item{chr}{Optional character vector of chromosome(s) to restrict scan.}

\item{genome}{A BSgenome, used to determine seqlengths if `chr` is set.}
}
\value{
Invisibly `TRUE` if `modif` is found among the MM tags; otherwise errors.
}
\description{
Scans the BAM for MM/ML tags in the specified region (or whole file)
and checks that `modif` is one of the observed modification codes.
}
\author{
Radu Zabet and Young Jun Kim
}
