ContextSV v1.0.0
Loading...
Searching...
No Matches
CNVCaller Class Reference

#include <cnv_caller.h>

Collaboration diagram for CNVCaller:
Collaboration graph

Public Member Functions

 CNVCaller (std::shared_mutex &shared_mutex)
 
Genotype getGenotypeFromCNState (int cn_state) const
 
std::tuple< double, SVType, Genotype, int > runCopyNumberPrediction (std::string chr, const CHMM &hmm, uint32_t start_pos, uint32_t end_pos, double mean_chr_cov, const std::vector< uint32_t > &pos_depth_map, const InputData &input_data) const
 
void runCIGARCopyNumberPrediction (std::string chr, std::vector< SVCall > &sv_candidates, const CHMM &hmm, double mean_chr_cov, const std::vector< uint32_t > &pos_depth_map, const InputData &input_data) const
 
void calculateMeanChromosomeCoverage (const std::vector< std::string > &chromosomes, std::unordered_map< std::string, std::vector< uint32_t > > &chr_pos_depth_map, std::unordered_map< std::string, double > &chr_mean_cov_map, const std::string &bam_filepath, int thread_count) const
 
void readSNPAlleleFrequencies (std::string chr, uint32_t start_pos, uint32_t end_pos, std::vector< uint32_t > &snp_pos, std::unordered_map< uint32_t, double > &snp_baf, std::unordered_map< uint32_t, double > &snp_pfb, const InputData &input_data) const
 
void saveSVCopyNumberToTSV (SNPData &snp_data, std::string filepath, std::string chr, uint32_t start, uint32_t end, std::string sv_type, double likelihood) const
 
void saveSVCopyNumberToJSON (SNPData &before_sv, SNPData &after_sv, SNPData &snp_data, std::string chr, uint32_t start, uint32_t end, std::string sv_type, double likelihood, const std::string &filepath) const
 

Public Attributes

const std::unordered_map< int, GenotypeStateGenotypeMap
 

Constructor & Destructor Documentation

◆ CNVCaller()

CNVCaller::CNVCaller ( std::shared_mutex &  shared_mutex)
inline

Member Function Documentation

◆ calculateMeanChromosomeCoverage()

void CNVCaller::calculateMeanChromosomeCoverage ( const std::vector< std::string > &  chromosomes,
std::unordered_map< std::string, std::vector< uint32_t > > &  chr_pos_depth_map,
std::unordered_map< std::string, double > &  chr_mean_cov_map,
const std::string &  bam_filepath,
int  thread_count 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGenotypeFromCNState()

Genotype CNVCaller::getGenotypeFromCNState ( int  cn_state) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readSNPAlleleFrequencies()

void CNVCaller::readSNPAlleleFrequencies ( std::string  chr,
uint32_t  start_pos,
uint32_t  end_pos,
std::vector< uint32_t > &  snp_pos,
std::unordered_map< uint32_t, double > &  snp_baf,
std::unordered_map< uint32_t, double > &  snp_pfb,
const InputData input_data 
) const
Here is the call graph for this function:

◆ runCIGARCopyNumberPrediction()

void CNVCaller::runCIGARCopyNumberPrediction ( std::string  chr,
std::vector< SVCall > &  sv_candidates,
const CHMM &  hmm,
double  mean_chr_cov,
const std::vector< uint32_t > &  pos_depth_map,
const InputData input_data 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runCopyNumberPrediction()

std::tuple< double, SVType, Genotype, int > CNVCaller::runCopyNumberPrediction ( std::string  chr,
const CHMM &  hmm,
uint32_t  start_pos,
uint32_t  end_pos,
double  mean_chr_cov,
const std::vector< uint32_t > &  pos_depth_map,
const InputData input_data 
) const
Here is the call graph for this function:

◆ saveSVCopyNumberToJSON()

void CNVCaller::saveSVCopyNumberToJSON ( SNPData before_sv,
SNPData after_sv,
SNPData snp_data,
std::string  chr,
uint32_t  start,
uint32_t  end,
std::string  sv_type,
double  likelihood,
const std::string &  filepath 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveSVCopyNumberToTSV()

void CNVCaller::saveSVCopyNumberToTSV ( SNPData snp_data,
std::string  filepath,
std::string  chr,
uint32_t  start,
uint32_t  end,
std::string  sv_type,
double  likelihood 
) const

Member Data Documentation

◆ StateGenotypeMap

const std::unordered_map<int, Genotype> CNVCaller::StateGenotypeMap
Initial value:
= {
{0, Genotype::UNKNOWN},
{1, Genotype::HOMOZYGOUS_ALT},
{2, Genotype::HETEROZYGOUS},
{3, Genotype::HOMOZYGOUS_REF},
{4, Genotype::HOMOZYGOUS_ALT},
{5, Genotype::HETEROZYGOUS},
{6, Genotype::HOMOZYGOUS_ALT}
}

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