melt_mip_data: Melt mip data

Description Usage Arguments Value Examples

View source: R/main.R

Description

Melt the mip data into a data frame with one column per locus. The read depth for each locus, denoted by 'chr<x>_<pos>', is given for each sample. An NA is given at loci where there is no read depth.

Usage

1

Arguments

dat

MIP data. The data must have the following variables:

  • Chrom : The chromosome number of the MIP read

  • Pos : The chromosome position of the MIP read

  • Sample_ID : The name of the sample

  • Coverage : The total read coverage as numerics

  • Barcode_Count : The total barocdes recovered

Value

Invisibly returns the melted data frame

Examples

1
2
3
4
5
6
7
8
9
dat <- data.frame(
"Sample_ID" = c(rep("a", 3), rep("b", 2)),
"Chrom" = c(1, 1, 2, 1, 1),
"Pos" = c(100, 200, 50, 100, 200),
"Coverage" = c(47, 95, 100, 52, 100),
"Barcode_Count" = c(47, 0, 40, 52, 70)
)

melt_mip_data(dat = dat)

mrc-ide/mipmapper documentation built on May 20, 2019, 3:27 p.m.