import_plink.pedmap: import_plink.pedmap

View source: R/IO.R

import_plink.pedmapR Documentation

import_plink.pedmap

Description

used for import regular p.link file stored in map and ped format

Usage

import_plink.pedmap(root = root,
                      sep_ped = "\t", sep_map = "\t",
                      pedfile = pedfile, mapfile = mapfile)

Arguments

root

The file name without suffix. This function only support p.link file format stored in "map" and "ped" format, the file names after removed suffix should be same with each other.

sep_ped

a character indicate the separation of ped file

sep_map

a character indicate the separation of map file

pedfile, mapfile

if root is missing then pedfile and mapfile are needed

Value

list, contains map information stored in data.frame and ped information stored in data.frame

Examples


   pedfile <- system.file("extdata",
                          "snp3kvars-CHR8-25947258-25951166-plink.ped",
                          package = "geneHapR")
   mapfile <- system.file("extdata",
                          "snp3kvars-CHR8-25947258-25951166-plink.map",
                          package = "geneHapR")
   p.link <- import_plink.pedmap(pedfile = pedfile, mapfile = mapfile,
                                 sep_map = "\t", sep_ped = "\t")
   p.link <- filter_plink.pedmap(p.link, mode = "POS",
                                 Chr = "chr08", start = 25948004,
                                 end = 25949944)
   hapResult <- plink.pedmap2hap(p.link, hapPrefix = "H",
                                 hetero_remove = TRUE,
                                 na_drop = TRUE)


geneHapR documentation built on May 29, 2024, 11:59 a.m.