getLogitFracMeth {biscuiteer} | R Documentation

## Helper function for compartment inference

### Description

Want an object with nominally Gaussian error for compartment inference, so this function uses 'suitable' (defaults to to 3 or more reads in 2 or more samples) measurements. Using Dirichlet smoothing (adding 'k' reads to M and U), these measurements are then turned into lightly moderated, logit-transformed methylated-fraction estimates for compartment calling.

### Usage

    getLogitFracMeth(x, minCov = 3, minSamp = 2, k = 0.1, r = NULL)

    getMvals(x, minCov = 3, minSamp = 2, k = 0.1, r = NULL)

### Arguments

`x` | A bsseq object with methylated and total reads
`minCov` | Minimum read coverage for landmarking samples (DEFAULT: 3)
`minSamp` | Minimum landmark samples with at least minCov (DEFAULT: 2)
`k` | Pseudoreads for smoothing (DEFAULT: 0.1)
`r` | Regions to collapse over - if NULL, do it by CpG (DEFAULT: NULL)

### Value

        Smoothed logit(M / Cov) GRanges with coordinates as row names

### Functions

- `getMvals`: Alias for getLogitFracMeth

### Examples

      orig_bed <- system.file("extdata", "MCF7_Cunha_chr11p15.bed.gz",
                              package="biscuiteer")
      orig_vcf <- system.file("extdata", "MCF7_Cunha_header_only.vcf.gz",
                              package="biscuiteer")
      bisc <- readBiscuit(BEDfile = orig_bed, VCFfile = orig_vcf,
                          merged = FALSE)

      reg <- GRanges(seqnames = rep("chr11",5),
                     strand = rep("*",5),
                     ranges = IRanges(start = c(0,2.8e6,1.17e7,1.38e7,1.69e7),
                                      end= c(2.8e6,1.17e7,1.38e7,1.69e7,2.2e7))
                     )

      frac <- getLogitFracMeth(bisc, minSamp = 1, r = reg)

[Package biscuiteer version 1.2.0 Index]