src/c++/lib/genotyping/GraphGenotyper.cpp
/**
 * Set the graph we genotype on
 * @param graph our graph to genotype
 */
Set the graph we genotype on
@param graph our graph to genotype
Set the graph we genotype on @param graph our graph to genotype
void GraphGenotyper::reset(Graph const* graph)
{
    _impl.reset(new GraphGenotyperImpl());
    _impl->graph = graph;
    const auto bp_map = createBreakpointMap(*_impl->graph);
    set<string> allele_names;
    for (const auto& bp : bp_map)
    {
        _impl->breakpointnames.push_back(bp.first);
        auto const& bp_info = bp.second;
        for (auto const& an : bp_info.canonicalAlleleNames())
        {
            allele_names.insert(an);
        }
    }
    _impl->allelenames.resize(allele_names.size());
    std::copy(allele_names.begin(), allele_names.end(), _impl->allelenames.begin());
}
void GraphGenotyper :: reset ( Graph const * graph ) { _impl . reset ( new GraphGenotyperImpl ( ) ) ; _impl -> graph = graph ; const auto bp_map = createBreakpointMap ( * _impl -> graph ) ; set < string > allele_names ; for ( const auto & bp : bp_map ) { _impl -> breakpointnames . push_back ( bp . first ) ; auto const & bp_info = bp . second ; for ( auto const & an : bp_info . canonicalAlleleNames ( ) ) { allele_names . insert ( an ) ; } } _impl -> allelenames . resize ( allele_names . size ( ) ) ; std :: copy ( allele_names . begin ( ) , allele_names . end ( ) , _impl -> allelenames . begin ( ) ) ; }
Set the graph we genotype on
 @param graph our graph to genotype
Set the graph we genotype on @param graph our graph to genotype
// reset all counts // work out allele and edge names