CreateHpltOccTable: CreateHpltOccTable() function

View source: R/CreateHpltOccTable_func_20221010.R

CreateHpltOccTableR Documentation

CreateHpltOccTable() function

Description

CreateHpltOccTable is designed to create a haplotype-sequence occurrence matrix from the set of R lists with putative haplotypes output by the HpltFind() function. CreateHpltOccTable() assumes that data originated from a diploid species.

Usage

CreateHpltOccTable(seq_table, filepath, path_out)

Arguments

seq_table

seq_table is a sequence table as output by the 'dada2' pipeline, which has samples in rows and nucleotide sequence variants in columns.

filepath

is a user defined path to the folder where the output files from the HpltFind() function have been saved.

path_out

is a user defined path to the folder where the output files will be saved.

Details

If you publish data or results produced with MHCtools, please cite both of the following references: Roved, J. 2022. MHCtools: Analysis of MHC data in non-model species. Cran. Roved, J., Hansson, B., Stervander, M., Hasselquist, D., & Westerdahl, H. 2022. MHCtools - an R package for MHC high-throughput sequencing data: genotyping, haplotype and supertype inference, and downstream genetic analyses in non-model organisms. Molecular Ecology Resources. https://doi.org/10.1111/1755-0998.13645

Value

A binary (logical) occurrence matrix with the data set sequences (inherited from seq_table) in columns and the putative haplotypes inferred by the HpltFind() function in rows.

See Also

HpltFind; for more information about 'dada2' visit <https://benjjneb.github.io/dada2/>

Examples

seq_table <- sequence_table
filepath <- system.file("extdata/HpltFindOut/", package="MHCtools")
path_out <- tempdir()
CreateHpltOccTable(seq_table, filepath, path_out)

MHCtools documentation built on July 9, 2023, 5:13 p.m.