record_ref_alt: This function can be used to append the reference and...

View source: R/record_ref_alt.R

record_ref_altR Documentation

This function can be used to append the reference and alternate alleles back to the output data

Description

This function can be called if the input data was originally nucleotide encoded, providing ref and alt alleles Then this function will append a0 and a1 columns to 0/1 encoded outputs such that the nucleotide(s) associated with genotype 0 are recorded in a0 and the nucleotide(s) associated with genotype 1 are recorded in a1 returning the original dataframes just with two new columns

Usage

record_ref_alt(to_output_df, ref, alt)

Arguments

to_output_df

whatever dataframe you want to append the columns to

ref

a vector of the reference nucleotides (those associated with the 0 genotypes)

alt

a vector of the alternate nucleotides (those associated with the 1 genotypes)

Value

to_return a dataframe with index, pos, ref, & alt columns before the remaining 0/1 encoded genotype columns.


mccoy-lab/rhapsodi documentation built on July 27, 2022, 3:56 a.m.