translateGenotypes: Translate genotypes

Description Usage Arguments Details

View source: R/translateGenotypes.R

Description

Translate genotypes

Usage

1
translateGenotypes(input, ref_tbl, long = FALSE, output = NA, ...)

Arguments

input

A data.frame or a (relative) path to a file of alleles to be translated. Fixed columns are name of the laboratory, which should match those from ref_tbl and sample name (this is for your viewing pleasure only). The varying columns represent genotypes. Make sure columns match names from the ref_tbl. Each locus should be written in two columns and names should have a suffix of _1 and _2.

ref_tbl

A data.frame which holds the translation table. Structure is fixed and the columns are lab_from, locus, allele_from, allele_ref and delta. First two columns are self explanatory. Columns that start with allele_ have actual allele values in laboratory of question and the reference (right now the reference is laboratory from Slovenia). The last column is the amount an allele should be shifted relative to the reference. A reference could also be a relative or absolute path to an xlsx file with columns as described above. Note that names are case sensitive.

long

Logical. If TRUE, the result will be returned as a long table instead of wide. If FALSE (default), wide table will be provided.

output

Character. Relative or absolute path to the file the data should be written to. The result will have tab separated columns and no row names. Default is NA.

...

Parameters passed to read_excel.

Details

The shift (delta) can be possibly calculated for some loci. If alleles for a certain locus are missing and there's only a delta parameter, this means that all so far examined alleles behave properly and can be offset safely. For those that also have mapping table in allele_from and allele_ref, the mapping is done 1:1.


romunov/transgt documentation built on Aug. 1, 2020, 7:28 p.m.