| ReadHPA | R Documentation |
This function reads and format HPA files generated by HaploCharmer.
ReadHPA(
File,
MaxMarkerMissing = 0.2,
MaxIndMissing = 0.2,
TotalDepthField = "DP",
AlleleDepthField = "AD",
NbThreads = 0L,
Verbose = TRUE
)
File |
Path to HPA file |
MaxMarkerMissing |
Maximum proportion of missing values for marker above which the marker is discarded |
MaxIndMissing |
Maximum proportion of missing values for individual above which the individual is discarded (applied after marker filtering) |
TotalDepthField |
Total read depth FORMAT field in the HPA file to get allele depth proportions |
AlleleDepthField |
Alternative allele read depth FORMAT field in the HPA file to get allele depth proportions |
NbThreads |
Number of threads to be used (positive integer) with a default value of 0 setting automatically all threads available |
Verbose |
A boolean describing if detailed information should be printed |
The function ReadHPA() reads Hapotype Presence-Absence (HPA) files generated
by HaploCharmer.
This function generates genotypic data coded as haplotype read depth ratios
using the read depths from the haplotype (AlleleDepthField) and total
read depth (TotalDepthField) fields of the HPA file.
Filtering of missing data can be applied to individuals and markers by
setting the maximum percentages MaxMarkerMissing and MaxIndMissing,
respectively.
By default, all available threads/CPU cores are used but the number
can be chosen using NbThreads.
A list of three items: a filtered list of genotying matrices (Geno),
a dataframe with variant information (MarkerInfo),
and a dataframe to be used as a genetic map proxy for local admixture
inference (GeneticMap).
The genetic map proxy is based on physical positions assuming all
chromosomes are 100cM long.
ReadHPA() to read VCF files
## Read HPA
hpa_path <- system.file("extdata", "Test.hpa", package = "AdmixPoly")
DataHPA <- AdmixPoly::ReadHPA(File = hpa_path, NbThreads=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.