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 = "genotype")
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 [default 'genotype']. |
This function uses parameters from gl.read.vcf for conversion
The ploidy of each individual is derived from the allele count (arity) of
its genotype calls. Half-missing calls (e.g. 0/., ./1) are treated as
missing data (NA) in both modes.
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.He(),
gl.Ho(),
gl.alf(),
utils.allelic.richness(),
utils.basic.stats(),
utils.check.datatype(),
utils.collapse.matrix(),
utils.dart2genlight(),
utils.dist.binary(),
utils.fbm.amat(),
utils.fbm.blocks(),
utils.fbm.colblocks(),
utils.fbm.colwise(),
utils.fbm.copy(),
utils.fbm.count.mean(),
utils.fbm.decode(),
utils.fbm.grm(),
utils.fbm.has(),
utils.fbm.new(),
utils.fbm.pair.counts(),
utils.fbm.reader(),
utils.fbm.rowwise(),
utils.fbm.tempfile(),
utils.flag.start(),
utils.het.pop(),
utils.history.call(),
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(),
utils.vcf.depth()
## 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.