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.

melt_mip_data(dat)

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

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)