View source: R/utils.vcfr2genlight.polyploid.R
utils.vcfr2genlight.polyploid | R Documentation |
WARNING: UTILITY SCRIPTS ARE FOR INTERNAL USE ONLY AND SHOULD NOT BE USED BY END USERS AS THEIR USE OUT OF CONTEXT COULD LEAD TO UNPREDICTABLE OUTCOMES.
utils.vcfr2genlight.polyploid(x, n.cores = 1, mode2 = mode)
x |
Name of the vcfR object [defined in function |
n.cores |
Number of cores [default 1] |
mode2 |
genotype: all heterozygous sites will be coded as 1 regardless ploidy level,
dosage: sites will be codes as copy number of alternate allele [defined in function |
This function uses parameters from gl.read.vcf
for conversion
Note also that this function checks to see if there are input of mode, missing input of mode
will issued the user with a error. "Dosage" mode of this function assign ploidy levels as maximum copy number of alternate alleles.
Please carefully check the data if "dosage" mode is used. (codes were modified from
'vcfR2genlight' in vcfR packge to convert polyploid data)
genlight object
Custodian: Ching Ching Lau – Post to https://groups.google.com/d/forum/dartr
Knaus, B. J., & Grunwald, N. J. (2017). vcfr: a package to manipulate and visualize variant call format data in R. Molecular ecology resources, 17(1), 44-53.
Knaus, B. J., Grunwald, N. J., Anderson, E. C., Winter, D. J., Kamvar, Z. N., & Tabima, J. F. (2023). Package 'vcfR'. vcfR
Other utilities:
gl.alf()
,
utils.check.datatype()
,
utils.collapse.matrix()
,
utils.dart2genlight()
,
utils.dist.binary()
,
utils.flag.start()
,
utils.hamming()
,
utils.het.pop()
,
utils.impute
,
utils.is.fixed()
,
utils.jackknife()
,
utils.n.var.invariant()
,
utils.plot.save()
,
utils.read.fasta()
,
utils.read.ped()
,
utils.recalc.avgpic()
,
utils.recalc.callrate()
,
utils.recalc.freqhets()
,
utils.recalc.freqhomref()
,
utils.recalc.freqhomsnp()
,
utils.recalc.maf()
,
utils.reset.flags()
,
utils.transpose()
## Not run:
datatype <- utils.vcfr2genlight.polyploid(x=vcfr, mode2="genotype")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.