Description Usage Arguments Value Assigning new IDs References See Also
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.
1 2 | convert_plinkA(rawfn, outfn, newID = 0, ncol = NULL, nlines = NULL,
na = 9)
|
rawfn |
Plink output filename. Most likely |
outfn |
Filename of new file. |
newID |
Integer scalar (default |
ncol |
Integer,number of SNP columns in |
nlines |
Number of lines to process. |
na |
Missing value, |
Data.frame with columns famID
, sampID
, and newID
.
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.
PLINK. Purcell and Chang. https://www.cog-genomics.org/plink2
Chang CC, Chow CC, Tellier LCAM, Vattikuti S, Purcell SM, Lee JJ (2015) Second-generation PLINK: rising to the challenge of larger and richer datasets. GigaScience, 4. doi: 10.1186/s13742-015-0047-8 link.
convert_plink
is a direct conversion that does not rely on PLINK.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.