cgatools::mapping::MergedMap2SamConverter Class Reference

Inheritance diagram for cgatools::mapping::MergedMap2SamConverter:
cgatools::mapping::Map2SamConverter

List of all members.

Public Types

typedef boost::array
< std::vector< size_t >, 2 > 
MappingIndicesBySide
typedef boost::array
< std::vector< double >, 2 > 
MappingWeightsBySide

Public Member Functions

 MergedMap2SamConverter (const MergedMap2SamConfig &config, std::ostream &outSamFile)
virtual void init ()

Protected Member Functions

virtual bool alternativeMappingProcessing (const mapping::ReadsRecord &readsRecord, SamRecordArray &records)
 override the method to merge the evidence mappings
virtual void filterMappingRecords (SamRecordArray &records)
 Prefilter mapping records.
virtual void writeMappingRecord (const SamRecord &m)
 Export mapping record in SAM format.
void addEvidenceRecords (const mapping::ReadsRecord &readsRecord, SamRecordArray &records)
 Merge evidence records into the base mappings.
void regroupMappings (const mapping::ReadsRecord &readsRecord, SamRecordArray &records)
 Process merged mappings: recompute MAPQ, deduplicate, select best mapping pairs.
void computeMappingWeights (const SamRecordArray &records, const MappingIndicesBySide &mappings, MappingWeightsBySide &weights) const
 computes P(DNBs) * P(gaps)
void filterDuplicatedMappings (SamRecordArray &records) const
 filter the mappings that have equal position and alignment, leave Evidence mappings if equal to base
void computeWeightMatrix (const SamRecordArray &records, const MappingIndicesBySide &mappings, const MappingWeightsBySide &weights, DoubleMatrix &weightMatrix, DoubleMatrix &mateGaps) const
double computeTotalWeight (const DoubleMatrix &weightMatrix, MappingWeightsBySide &sumAllPairs) const
void findBestCandidates (const DoubleMatrix &m, const DoubleMatrix &mateGaps, const MappingIndicesBySide &mappingsBySide, const MappingWeightsBySide &sumAllPairs, MappingIndicesBySide &bestGroupMappings, MappingIndicesBySide &groups) const
void reweightSingleMappings (SamRecordArray &records, const MappingIndicesBySide &mappingsBySide, const MappingWeightsBySide &dnbArmWeights, const MappingWeightsBySide &sumAllPairs) const
 compute weights of double arm mappings and detect primary mappings for each group
void reweightDoubleArmMappings (SamRecordArray &records, const MappingIndicesBySide &mappingsBySide, const DoubleMatrix &weightMatrix, const DoubleMatrix &mateGapFrequency, const MappingWeightsBySide &sumAllPairs, const MappingIndicesBySide &bestFullMappedArms, const MappingIndicesBySide &groups, const double &totalWeight) const
 compute weights of single arm mappings
void detectTheBestMappingAndMakeItPrimary (SamRecordArray &records) const
 the function selects the best mapping record based on MAPQ set by reweightDoubleArmMappings
void leaveOneBestMapping (SamRecordArray &records) const
 the function filters mapping records based on primary flags set by reweightDoubleArmMappings
void dumpBestLocalMatches (const mapping::ReadsRecord &readsRecord, const SamRecordArray &records, const MappingIndicesBySide &mappingsBySide, const MappingWeightsBySide &dnbArmWeights, const DoubleMatrix &weights, const DoubleMatrix &mateGaps, const MappingWeightsBySide &sumAllPairs, const MappingIndicesBySide &bestFullMappedArms, const MappingIndicesBySide &groups, const double &totalWeight) const
 output debug information to stdout
void printMatrix (const DoubleMatrix &m, std::ostream &ostr) const

Protected Attributes

const MergedMap2SamConfigconfig_
mapping::BatchRecords evidenceBatchRecords_

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2