Save genetic data to plink v1 files (.bed, .bim, and .fam)
- data: pd.DataFrame
DataFrame containing GenotypeArrays to be saved.
- output: str
Name to use for the output .bed, .bim, and .fam files
- phenotype_name: str, default None
Optional column in data to be saved as the phenotype value in the .fam file.
- phenotype_case, phenotype_control
String values indicating the category to be used as “case” or “control” for binary phenotypes.
If provided, the phenotype must be categorical.
If not provided, the phenotype is not encoded at all (assumed to be quantitative).
If the data index is an integer index, this prefix will be added to generate IDs.
If the data index has the required columns (FID, IID, IID_father, IID_mother, sex, phenotype) the fam file will be created based on the index.
If a phenotype name is provided, this will override any phenotype information in the index.
If the data has a single index column this will be used (with the prefix) for FID and IID. Defaults will be used for other .fam data