Convert a microhaplotype calls table into PMO microhaplotype structures
pmo_mhap_table_to_pmo.RdBuilds the representative_microhaplotypes and detected_microhaplotypes
components from a long table of microhaplotype calls. The result is a
name-based intermediate (see file notes) suitable for pmo_merge_to_pmo().
Usage
pmo_mhap_table_to_pmo(
microhaplotype_table,
bioinformatics_run_name = NULL,
library_sample_name_col = "library_sample_name",
target_name_col = "target_name",
seq_col = "seq",
reads_col = "reads",
genome_id = 1,
umis_col = NULL,
chrom_col = NULL,
start_col = NULL,
end_col = NULL,
ref_seq_col = NULL,
strand_col = NULL,
alt_annotations_col = NULL,
masking_seq_start_col = NULL,
masking_seq_segment_size_col = NULL,
masking_replacement_size_col = NULL,
masking_delim = ",",
microhaplotype_name_col = NULL,
pseudocigar_col = NULL,
pseudocigar_chrom_col = NULL,
pseudocigar_start_col = NULL,
pseudocigar_end_col = NULL,
pseudocigar_ref_seq_col = NULL,
pseudocigar_strand_col = NULL,
pseudocigar_genome_id = NULL,
pseudocigar_generation_description_col = NULL,
quality_col = NULL,
additional_representative_mhap_cols = NULL,
additional_mhap_detected_cols = NULL
)Arguments
- microhaplotype_table
A data.frame of microhaplotype calls.
- bioinformatics_run_name
Either a column name in the table (one detected set is built per unique value) or a single run name, or
NULL.- library_sample_name_col, target_name_col, seq_col, reads_col
Column names for the required fields.
- genome_id
1-based genome id for mhap locations (default 1).
- umis_col, chrom_col, start_col, end_col, ref_seq_col, strand_col
Optional column names.
- alt_annotations_col, microhaplotype_name_col, pseudocigar_col, quality_col
Optional column names.
- masking_seq_start_col, masking_seq_segment_size_col, masking_replacement_size_col
Optional masking column names (all three required together).
- masking_delim
Delimiter for masking list values.
- pseudocigar_chrom_col, pseudocigar_start_col, pseudocigar_end_col, pseudocigar_ref_seq_col, pseudocigar_strand_col, pseudocigar_genome_id, pseudocigar_generation_description_col
Columns/value used to build the
Pseudocigarobject'sref_loc(GenomicLocation) whenpseudocigar_colis set. The chromosome defaults tochrom_coland the genome id togenome_id;pseudocigar_start_colandpseudocigar_end_colare required (an error is raised ifpseudocigar_colis set without a constructable ref_loc).- additional_representative_mhap_cols, additional_mhap_detected_cols
Optional extra columns to carry through.