convert_plinkA: Convert PLINK recoded A to SNP file.

Description Usage Arguments Value Assigning new IDs References See Also

Description

Facilitates converting a PLINK binary file to simplified SNP file format. Requires using PLINK to recode it to the A format by using command line plink -bfile <file stem> --recode A. This function then swiftly strips of first 6 columns (family ID, sample ID, paternal ID, maternal ID, sex, phenotypic record) and inserts an integer-based ID column. NA's outputted from PLINK are replaced with na argument.

Usage

1
2
convert_plinkA(rawfn, outfn, newID = 0, ncol = NULL, nlines = NULL,
  na = 9)

Arguments

rawfn

Plink output filename. Most likely plink.raw if PLINK command line argument --out is not used.

outfn

Filename of new file.

newID

Integer scalar (default 0) for automatically assigning new IDs. See description for more.

ncol

Integer,number of SNP columns in rawfn. When NULL, automagically detected with get_ncols(rawfn)-6.

nlines

Number of lines to process.

na

Missing value,

Value

Data.frame with columns famID, sampID, and newID.

Assigning new IDs

The new integer IDs can be supplied. If not, they will be made for you. newID may be an integer vector and will be used as is. If data.frame with columns famID, sampID, and newID, they will be reordered to match input file.

References

See Also

convert_plink is a direct conversion that does not rely on PLINK.


stefanedwards/Siccuracy documentation built on May 30, 2019, 10:44 a.m.