rbind_snp_files: Combines rows of two SNP chip files and provides masking.

Description Usage Arguments Details Value See Also

View source: R/mutate_chips.R

Description

We distinguish between HD and LD (high and low density) SNP chips, were HD chips have priority over LD.

Usage

1
2
3
4
5
rbind_snp_files(hdid, ldid, hdpos, ldpos, hdfn, ldfn, fnout, outcol = NULL,
  na = 9, format = NULL, int = TRUE)

rbind_SNP_files(hdid, ldid, hdpos, ldpos, hdfn, ldfn, fnout, outcol = NULL,
  na = 9, format = NULL, int = TRUE)

Arguments

hdid

IDs of HD genotyped individuals. Corresponds to (subset of) first column of hdfn.

ldid

IDs of LD genotyped individuals. Corresponds to (subset of) first column of ldfn.

hdpos

Integer vector of where columns in hdfn are positioned in output file. Coerced to same length as columns in hdfn.

ldpos

Integer vector of where columns in ldfn are positioned in output file. Coerced to same length as columns in ldfn.

hdfn

Filename of HD genotypes.

ldfn

Filename of LD genotypes.

fnout

Filename to write merged genotypes to.

outcol

Integer, number of columns in output file. When NULL (default), uses max value of hdpos and ldpos.

na

Missing values.

format

Character, Fortran edit descriptors for output. See parseformat.

int

Logical (default TRUE), read and write integers.

Details

hdpos and ldpos: The output file is created with outcol columns. First, rows from hdfn are added to the file with positions described in hdpos. The first column is ignored as this is the ID column. If hdpos=c(2,3,NA,NA,4), the first two columns of hdfn are used for column 2 and 3 in the output, and the last column of hdfn is used as the 4th. The 3rd and 4th column in hdfn are ignored. This allows masking of genotypes. After hdfn is processed for rows in hdid, the same is repeated for ldfn. There is no restriction for hdfn=ldfn. The columns of the output file is prepopulated with na.

Value

Number of lines written, with attribute 'stat' specifying last IO status.

See Also

get_ncols, cbind_snp_files, or mask_snp_file for more flexible masking (albeit on a single file).


stefanedwards/Siccuracy documentation built on Dec. 14, 2017, 7:41 p.m.