View source: R/genotypeInfoUpdate.R
removedWrongAnceInst | R Documentation |
Remove samples with the incorrect ancestry or keep samples at your own chioce.
removedWrongAnceInst( plink, inputPrefix, metaDataFile, ancestrySymbol, outputPrefix )
plink |
an executable program in either the current working directory or somewhere in the command path. |
inputPrefix |
the prefix of the input PLINK binary files. |
metaDataFile |
a pure text file that stores the meta information of the samples. This file must contain at least the following content (column names are in parentheses): family ID in the PLINK files (FID), individual ID in the PLINK files (IID), ID in the description files (descID), self identified ancestry (ance; e.g. AFR: African, AMR: Ad Mixed American, EAS: East Asian, EUR: European, SAS: South Asian), sex (sex; 1 = male, 2 = female, 0 = missing), age (age), group (group; 0 = control/unaffected, 1 = case/affected). All unknown and missing values are represented by the value NA. Lines with a missing value for FID or IID are not contained. |
ancestrySymbol |
an indicator that shows the symbol of genetic ancestry. If it is null, then all samples are selected. |
outputPrefix |
the prefix of the output PLINK binary files. |
ancestrySymbol, such as 'EUR' stands for the European, 'EAS' for East Asian. See the metaDataFile for more details.
The output PLINK binary files after checking the ancestry information.
Junfang Chen
## In the current working directory bedFile <- system.file("extdata", "controlData.bed", package="Gimpute") bimFile <- system.file("extdata", "controlData.bim", package="Gimpute") famFile <- system.file("extdata", "controlData.fam", package="Gimpute") metaDataFile <- system.file("extdata", "1_01_metaData.txt", package="Gimpute") system(paste0("scp ", bedFile, bimFile, famFile, " .")) inputPrefix <- "controlData" ## Specify the input PLINK file prefix ancestrySymbol <- "EAS" outputPrefix <- "1_05_removedWrongAnceInst" ## Not run: Requires an executable program PLINK, e.g. ## plink <- "/home/tools/plink" ## removedWrongAnceInst(plink, inputPrefix, metaDataFile, ## ancestrySymbol, outputPrefix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.