hlaGeno2PED {HIBAG} | R Documentation

## Convert to PLINK PED format

### Description

Convert an object of `hlaSNPGenoClass` to a file of PLINK PED format.

### Usage

    hlaGeno2PED(geno, out.fn)

### Arguments

`geno` | a genotype object of `hlaSNPGenoClass`
`out.fn` | the file name of output ped file

### Details

Two files ".map" and ".ped" are created.

### Value

None.

### Author(s)

Xiuwen Zheng

### See Also

`hlaBED2Geno`

### Examples

    # make a "hlaAlleleClass" object
    hla.id <- "A"
    hla <- hlaAllele(HLA_Type_Table$sample.id,
        H1 = HLA_Type_Table[, paste(hla.id, ".1", sep="")],
        H2 = HLA_Type_Table[, paste(hla.id, ".2", sep="")],
        max.resolution="4-digit", locus=hla.id, assembly="hg19")

    # training genotypes
    region <- 500   # kb
    snpid <- hlaFlankingSNP(HapMap_CEU_Geno$snp.id, HapMap_CEU_Geno$snp.position,
        hla.id, region*1000, assembly="hg19")

    train.geno <- hlaGenoSubset(HapMap_CEU_Geno,
        snp.sel = match(snpid, HapMap_CEU_Geno$snp.id))

    hlaGeno2PED(train.geno, "test")

    # delete the temporary files
    unlink(c("test.map", "test.ped"), force=TRUE)

[Package HIBAG version 1.16.0 Index]