getReadMatrix: Extract methylation matrix from alignment file

View source: R/bam2methMats.R

getReadMatrixR Documentation

Extract methylation matrix from alignment file

Description

Extract methylation matrix from alignment file

Usage

getReadMatrix(
  bamFile,
  genomeFile,
  bedFile,
  region,
  samtoolsPath = "",
  maxDepth = 10000
)

Arguments

bamFile

String with path to bam file with alignments of reads to genome

genomeFile

String with path to fasta file with genome sequence

bedFile

String with path to .bed file with locations of Cs to be evaluated

region

Genomic range of region for which to extract reads. It can also be a string denoting the region, e.g. "X:8069396-8069886"

samtoolsPath

Path to samtools executable (default="") if not in unix $PATH

maxDepth

Maximum number of reads to take for a given region (default=10,000)

Value

A matrix with reads as row names and C positions as column names. Every position in matrix has a value of 0 (non-converted C = methylated), 1 (converted C (T) = not methylated) or NA (undetermined)


jsemple19/methMatrix documentation built on Aug. 19, 2022, 3:57 p.m.