Learn R Programming

MoBPS (version 1.13.1)

get.plink: Generate binary plink-file

Description

Generate a binary plink-file for selected groups and chromosome

Usage

get.plink(
  population,
  path = NULL,
  database = NULL,
  gen = NULL,
  cohorts = NULL,
  id = NULL,
  chromosome = "all",
  non.genotyped.as.missing = FALSE,
  fam.id = FALSE,
  type = 0,
  use.id = TRUE,
  bve.pedigree.error = TRUE
)

Value

binary plink-file for in gen/database/cohorts selected individuals

Arguments

population

Population list

path

Location to save vcf-file

database

Groups of individuals to consider for the export

gen

Quick-insert for database (vector of all generations to export)

cohorts

Quick-insert for database (vector of names of cohorts to export)

id

Individual IDs to search/collect in the database

chromosome

Limit the genotype output to a selected chromosome (default: "all")

non.genotyped.as.missing

Set to TRUE to replaced non-genotyped entries with "./."

fam.id

Set TRUE to set the fam-ID to the individual ID

type

Set 1 to only write paternal haplotype, set 2 to only write maternal haplotype, set 0 for both (default)

use.id

Set to TRUE to use MoBPS ids instead of Sex_Nr_Gen based names (default: TRUE)

bve.pedigree.error

Set to FALSE to ignore/correct for any pedigree errors

Examples

Run this code
data(ex_pop)
data(ex_pop)
# \donttest{
file_path <- tempdir()
get.vcf(path=file_path, ex_pop, gen=2)
file.remove(paste0(file_path, ".vcf"))
# }

Run the code above in your browser using DataLab