set_anc_alleles: Adjust Ancentral/Derived Alleles According to Reference

Description Usage Arguments Details Value Author(s) Examples

View source: R/set_anc_alleles.R

Description

This function uses a reference file obtained from biomart R Package, setting up ancestral alleles, and excluding SNPs without ancestral information from dataset.

Usage

1
set_anc_alleles(sfile, ref, out)

Arguments

sfile

Scalar character with the name of the dataset file on Shapeit format without extension (.haps/.sample).

ref

Scalar character with the name of reference file (obtained by biomart R Package).

out

Scalar character with desired name for the output file (without extension).

Details

To obtain the Ensembl annotation for ancestral/derived SNPs, please check the function avaialable at: https://github.com/cmcouto-silva/scripts/blob/master/ensembl_anc_allele.R

Value

Dataset with adjusted ancestral/derived alleles (.haps and .sample files).

Author(s)

CainĂ£ Max Couto-Silva

Examples

1
2
3
4
5
6
7
8
## Not run: 
haps <- "dataset/mydataset_phased"
ref <- "reference_panels/ensembl_annot.txt"
out <- "out_folder/newfile"

set_anc_alleles(sfile, ref, out)

## End(Not run)

cmcouto-silva/LD documentation built on Sept. 20, 2020, 2:46 p.m.