binnedAFs: Estimate allelic frequency distributions in bins along the...

Description Usage Arguments Value Author(s) Examples

View source: R/coverage.R

Description

This function is used to give estimates of the ditribution of observed allelic freuqencies in a regions of the genome, use in conjunction with h5dapply

Usage

1
binnedAFs(data, sampledata, normalise = TRUE, binWidth = 0.05, minCov = 10, minCount = 2)

Arguments

data

A list object returned by a call to h5dapply or h5readBlock.

sampledata

Sample metadata describing the cohort, can be extracted from an HDF5 tally file using the getSampleData function.

normalise

Boolean flag to specify whether the counts or percentages of observed allelic frequencies should be returned.

binWidth

Width of bins in allelic frequency space, defaults to 0.05.

minCov

Minimum required coverage for a position to be considered.

minCount

Minimum required number of mismatches for a position to be considered.

Value

A matrix of AF bins times samples.

Author(s)

Paul Theodor Pyl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(h5vc)
tallyFile <- system.file( "extdata", "example.tally.hfs5", package = "h5vcData" )
sampleData <- getSampleData( tallyFile, "/ExampleStudy/16" )
afs <- h5dapply(
  filename = tallyFile,
  group = "/ExampleStudy/16",
  names = c("Counts", "Coverages"),
  range = c(29e6, 29.05e6),
  blocksize = 1e4,
  FUN = binnedAFs,
  sampledata = sampleData
)
afs[[3]]

h5vc documentation built on Nov. 8, 2020, 4:56 p.m.