mutationSpectra {h5vc} | R Documentation

## Mutation spectrum analyses

### Description

These functions help in analyses of mutation spectra

### Usage

    mutationSpectrum( variantCalls, tallyFile, study, context = 1 )

### Arguments

`variantCalls` | A `data.frame` object that can be the output of a call to a `callVariantsPaired` or `callDeletionsPaired` function. The following columns are required: - `altAllele` - `refAllele` - `Sample` - `Start` - `End` - `Chrom`
`tallyFile` | filename of a tally file matching the variant calls
`study` | the study id used in the tally file
`context` | An integer specifying the size of the context that should be considered (i.e. the length of the prefix and suffix of the variant call)

### Details

This function takes a set of variant calls (SNVs/Deletions) and a tallyFile as well as a context size and tabulates the number of observed mutations stratified by type (refAllele->altAllele) and sequence context (i.e. the prefix and suffix of size `context` around the variant position in the genome)

`bases` serves to map character representations to numeric encoding of bases

`variantCalls` is an example dataset of variant calls created by running `callVariantsPaired` on the `example.tally.hfs5` file.

### Value

A table listing the counts of mutations stratified by allele, sequence context and sample.

### Author(s)

Paul Pyl

### Examples

      library(h5vc)
      tallyFile <- system.file( "extdata", "example.tally.hfs5", package = "h5vcData" )
      data( "example.variants", package = "h5vcData" )
      head( mutationSpectrum( variantCalls, tallyFile, "/ExampleStudy" ) )

[Package h5vc version 2.18.0 Index]