% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filterVMRsONT.R
\name{.analyseReadsInsideRegionsVMR}
\alias{.analyseReadsInsideRegionsVMR}
\title{Analyse reads inside regions (with VMR testing)}
\usage{
.analyseReadsInsideRegionsVMR(methylationData, regions)
}
\arguments{
\item{methylationData}{A \code{GRanges} of methylation calls. Must include metadata:
\describe{
  \item{readsM1, readsN1}{methylated and total read counts in condition 1}
  \item{readsM2, readsN2}{methylated and total read counts in condition 2}
  \item{ONT_Cm, ONT_C}{per-read methylation and coverage indices (character vectors)}
}}

\item{regions}{A \code{GRanges} of genomic intervals to summarise.}
}
\value{
A \code{GRanges} with the same ranges as \code{regions}, plus these metadata:
\describe{
  \item{sumReadsM1}{total methylated reads in condition 1}
  \item{sumReadsN1}{total reads in condition 1}
  \item{proportion1}{methylation proportion (sumReadsM1/sumReadsN1)}
  \item{variance1}{variance of per-read methylation proportions in condition 1}
  \item{sumReadsM2}{total methylated reads in condition 2}
  \item{sumReadsN2}{total reads in condition 2}
  \item{proportion2}{methylation proportion (sumReadsM2/sumReadsN2)}
  \item{variance2}{variance of per-read methylation proportions in condition 2}
  \item{cytosinesCount}{number of cytosines observed in each region}
  \item{wilcox_pvalue}{p-value from Wilcoxon rank-sum test comparing per-read proportions}
  \item{f_pvalue}{p-value from F-test comparing variances of per-read proportions}
  \item{var_ratio}{Ratio of variances (variance1 / variance2)}
  \item{wilcox_result}{Full \code{htest} object returned by \code{wilcox.test}}
  \item{F_test_result}{Full \code{htest} object returned by \code{var.test}}
}
}
\description{
Performs the analysis in all regions in a \code{\link[GenomicRanges]{GRanges}} object,
computing per-region summary statistics and statistical tests.
}
\author{
Radu Zabet and Young Jun Kim
}
