gt.format {rCNV} | R Documentation |
Format genotype for BayEnv and BayPass
Description
This function generates necessary genotype count formats for BayEnv and BayPass with a subset of SNPs
Usage
gt.format(gt, info, format = c("benv", "bpass"), snp.subset = NULL)
Arguments
gt |
multi-vector. an imported data.frame of genotypes or genotype
data frame generated by |
info |
a data frame containing sample and population information. It must have “sample” and “population” columns |
format |
character. output format i.e., for BayPass or BayEnv |
snp.subset |
numerical. number of randomly selected subsets of SNPs.
|
Value
Returns a list with formatted genotype data: $bayenv
- snps
in horizontal format - for BayEnv (two lines per snp); $baypass
- vertical format - for BayPass
(two column per snp); $sub.bp
- subsets snps for BayPass $sub.be
- subsets of snps for BayEnv
Author(s)
Piyal Karunarathne
Examples
## Not run: vcf.file.path <- paste0(path.package("rCNV"), "/example.raw.vcf.gz")
vcf <- readVCF(vcf.file.path=vcf.file.path)
het.table<-hetTgen(vcf,"GT")
info<-unique(substr(colnames(het.table)[-c(1:3)],1,8))
GT<-gt.format(het.table,info)
## End(Not run)
[Package rCNV version 1.2.0 Index]