gt.format | R Documentation |
This function generates necessary genotype count formats for BayEnv and BayPass with a subset of SNPs
gt.format(
gt,
info,
format = c("benv", "bpass"),
snp.subset = NULL,
parallel = FALSE
)
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.
|
parallel |
logical. whether to parallelize the process |
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
Piyal Karunarathne
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.