Skip to contents

An observation of 0 mutations out of 1 read is a different amount of information from 0 mutations out of 1,000 reads. This function adds the coverage for mutations used in lineage_defs, which benefits all models (but adds 0-inflation).

Usage

add_coverage(coco, coverage, mutation_list)

Arguments

coco

The data set.

coverage

The coverage file, with position as the first column and coverage as the second.

mutation_list

The mutations to be added (usually colnames(lineage_defs)).

Value

coco, but with added rows. The counts are assumed to be 0 for mutations that aren't in the data.

Details

Currently assumes that the data has a column labelled "mutation" in amino acid notation.