View source: R/hla_df_from_xml.R
hla_df_from_xml | R Documentation |
The xml file required for this function may be downloaded from the GitHub repository of the IMGT/HLA organization: https://github.com/ANHIG/IMGTHLA/blob/Latest/xml/hla.xml.zip. The function then creates a dataframe from this xml which can be used subsequently to match reads of HLA-loci from bulk or single cell RNA seq. By default the sequence of the 2nd + 3rd exon are returned in an extra column as these will most likely be used to infer the HLA type in case of MHC-I.
hla_df_from_xml(file_path, lapply_fun = lapply, replace_none_pg = T, ...)
file_path |
path to the xml file, may be in zipped format |
lapply_fun |
function name without quotes; lapply, pbapply::pblapply or parallel::mclapply are suggested |
replace_none_pg |
replace "None" in p_group and g_group with allele_protein and allele_coding, respectively |
... |
additional argument to the lapply function; e.g. mc.cores may be passed when parallel::mclapply is chosen above |
HLA nomenclature: http://hla.alleles.org/nomenclature/naming.html
a data frame
## Not run:
hla_df_from_xml(file_path = "path/hla.xml", lapply_fun = parallel::mclapply,
mc.cores = parallel::detectCores())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.