vg
tools for working with variation graphs
Public Member Functions | Protected Attributes | List of all members
vg::NameMapper Class Reference

#include <name_mapper.hpp>

Inheritance diagram for vg::NameMapper:
vg::Constructor vg::VariantAdder

Public Member Functions

void add_name_mapping (const string &vcf_name, const string &fasta_name)
 
string vcf_to_fasta (const string &vcf_name) const
 
string fasta_to_vcf (const string &fasta_name) const
 

Protected Attributes

map< string, string > vcf_to_fasta_renames
 
map< string, string > fasta_to_vcf_renames
 This is the reverse map from FASTA sequence name to VCF sequence name. More...
 

Detailed Description

Class to do name mapping (or to mix in and provide name mapping functionality to other classes.

Member Function Documentation

◆ add_name_mapping()

void vg::NameMapper::add_name_mapping ( const string &  vcf_name,
const string &  fasta_name 
)

Add a name mapping between a VCF contig name and a FASTA sequence name or graph path name. Both must be unique.

◆ fasta_to_vcf()

string vg::NameMapper::fasta_to_vcf ( const string &  fasta_name) const

Convert the given FASTA sequence name or graph path name to a VCF contig name, through the rename mappings.

◆ vcf_to_fasta()

string vg::NameMapper::vcf_to_fasta ( const string &  vcf_name) const

Convert the given VCF contig name to a FASTA sequence or graph path name, through the rename mappings.

Member Data Documentation

◆ fasta_to_vcf_renames

map<string, string> vg::NameMapper::fasta_to_vcf_renames
protected

This is the reverse map from FASTA sequence name to VCF sequence name.

◆ vcf_to_fasta_renames

map<string, string> vg::NameMapper::vcf_to_fasta_renames
protected

This map maps from VCF sequence names to FASTA sequence names. If a VCF sequence name doesn't appear in here, it gets passed through unchanged.


The documentation for this class was generated from the following files: