NCBI C++ ToolKit
Classes | Typedefs | Functions | Variables
alignment_job.cpp File Reference
#include <ncbi_pch.hpp>
#include <gui/widgets/seq_graphic/alignment_job.hpp>
#include <gui/widgets/seq_graphic/graph_cache.hpp>
#include <gui/widgets/seq_graphic/sparse_graph.hpp>
#include <gui/widgets/seq_graphic/alignment_glyph.hpp>
#include <gui/widgets/seq_graphic/gene_model_group.hpp>
#include <gui/widgets/seq_graphic/cds_glyph.hpp>
#include <gui/widgets/seq_graphic/mate_pair_glyph.hpp>
#include <gui/widgets/seq_graphic/alignment_smear_glyph.hpp>
#include <gui/widgets/seq_graphic/alnvec_graphic_ds.hpp>
#include <gui/widgets/seq_graphic/sparsealn_graphic_ds.hpp>
#include <gui/widgets/seq_graphic/denseg_graphic_ds.hpp>
#include <gui/widgets/seq_graphic/simple_graphic_ds.hpp>
#include <gui/widgets/seq_graphic/alignment_sorter_factory.hpp>
#include <gui/widgets/seq_graphic/named_group.hpp>
#include <gui/widgets/seq_graphic/seqgraphic_utils.hpp>
#include <gui/objutils/utils.hpp>
#include <gui/objutils/na_utils.hpp>
#include <objtools/alnmgr/aln_converters.hpp>
#include <objtools/alnmgr/aln_builders.hpp>
#include <objtools/alnmgr/aln_container.hpp>
#include <objmgr/align_ci.hpp>
#include <objmgr/util/sequence.hpp>
#include <objmgr/util/feature.hpp>
#include <objmgr/seq_loc_mapper.hpp>
#include <objmgr/graph_ci.hpp>
#include <objmgr/impl/synonyms.hpp>
#include <objmgr/impl/scope_info.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/User_object.hpp>
#include <objects/seq/Annot_descr.hpp>
#include <objects/seq/Annotdesc.hpp>
#include <objects/seqres/Byte_graph.hpp>
#include <objects/seqres/Int_graph.hpp>
#include <corelib/ncbiutil.hpp>
#include <gui/widgets/seq_graphic/layout_policy.hpp>
#include <math.h>
#include <gui/widgets/seq_graphic/column_layout_policy.hpp>
#include <future>
#include <corelib/rwstream.hpp>
#include <util/checksum.hpp>
#include <connect/services/grid_worker_app.hpp>
#include <corelib/ncbiapp.hpp>
+ Include dependency graph for alignment_job.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CGraphStatCollector_Graph
 
class  CGraphStatCollector_Glyph
 

Typedefs

typedef SStaticPair< const char *, CAlnStatConfig::EStatTypeTGraphTitle
 layout style to layout display name More...
 
typedef CStaticArrayMap< string, CAlnStatConfig::EStatTypeTGraphTitleMap
 

Functions

 USING_SCOPE (objects)
 
static void s_ObjectIdToStr (const CObject_id &id, string &id_str)
 
static bool s_CheckTraceMateAlign (bool match_id, bool is_bam_align, const CSeq_align &align, string &ti, string &mate_ti, const string &expect_mate_ti="")
 
static bool s_IsMatchById (CConstRef< CSeq_annot > aln_annot)
 
static bool s_IsSecondPassAlignment (const CSeq_align &align)
 
 DEFINE_STATIC_ARRAY_MAP (TGraphTitleMap, sm_GraphTitleMap, s_GraphTitles)
 
size_t s_GraphTitleToIndex (const string &title)
 
const strings_GraphIndexToTitle (size_t idx)
 
void GetAnchors (CBioseq_Handle &handle, const CSynonymsSet *synonyms, const CSeq_align &align, vector< CSeq_align::TDim > &anchors)
 
static CRef< CSeq_aligns_CompressDiscToDenseq (list< CRef< CSeq_align >> &aln_set, int anchor_row)
 
void BuildAlignDataSource (CBioseq_Handle &handle, vector< CSeq_align::TDim > &anchors, const CSeq_align &align, bool sparseAln, TModelUnit window, TAlnDataSources &data_sources, CRange< TSeqPos > *range)
 

Variables

static const double kSequenceZoomLevel = 1.0/8.
 always show individual alignments when zoom level is below this threshold. More...
 
static const double kDetailsZoomLevel = 2
 Scale at which align details are made visible Align details: unaligned tails, mate pairs. More...
 
static const int kMaxAlignmentLoaded = 250000
 maximal number of alignments allowed to load to avoid potential memery and performance problem. More...
 
static const TGraphTitle s_GraphTitles []
 

Typedef Documentation

◆ TGraphTitle

layout style to layout display name

Definition at line 1435 of file alignment_job.cpp.

◆ TGraphTitleMap

Definition at line 1446 of file alignment_job.cpp.

Function Documentation

◆ BuildAlignDataSource()

void BuildAlignDataSource ( CBioseq_Handle handle,
vector< CSeq_align::TDim > &  anchors,
const CSeq_align align,
bool  sparseAln,
TModelUnit  window,
TAlnDataSources data_sources,
CRange< TSeqPos > *  range 
)

Definition at line 2137 of file alignment_job.cpp.

References _ASSERT, CAlnMix::Add(), BuildAln(), CSeq_align::CheckNumRows(), CDense_seg::CheckNumSegs(), CreateAnchoredAlnFromAln(), CAlnUserOptions::eBothDirections, CAlnUserOptions::eDefaultMergeAlgo, eNa_strand_minus, IAlnGraphicDataSource::ePartial_3prime, IAlnGraphicDataSource::ePartial_5prime, IAlnGraphicDataSource::ePartial_None, CAlnUserOptions::ePreserveRows, CSeq_align_Base::eType_disc, eUnknown, CAlnMix::fGapJoin, CAlignRangeCollectionList< CAlignRange< TSignedSeqPos > >::fOverlap, CSeq_align_set_Base::Get(), CAlnStats< _TAlnIdVec >::GetAlnCount(), CSeq_align_Base::C_Segs::GetDenseg(), CAlnMix::GetDenseg(), CAnchoredAln::GetDim(), CSparseAln::GetDim(), CSeq_align_Base::C_Segs::GetDisc(), COpenRange< Position >::GetLength(), CAnchoredAln::GetPairwiseAlns(), CBioseq_Handle::GetScope(), CSeq_align_Base::GetSegs(), CSeq_align::GetSeqRange(), CSeq_align_Base::C_Segs::GetStd(), CAlnContainer::insert(), CSeq_align_Base::C_Segs::IsDenseg(), CSeq_align_Base::C_Segs::IsDisc(), CAlignRangeCollectionList< TAlnRange >::IsSet(), CDense_seg::IsSetWidths(), CSeq_align_Base::C_Segs::IsStd(), ITERATE, LOG_POST, CAlnUserOptions::m_Direction, CAlnUserOptions::m_MergeAlgo, CAlnMix::Merge(), NCBI_THROW, NON_CONST_ITERATE, prev(), CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back(), r(), compile_time_bits::range(), Ref(), CRef< C, Locker >::Reset(), CConstRef< C, Locker >::Reset(), row, s_CompressDiscToDenseq(), CAlnMap::SetAnchor(), CDensegGraphicDataSource::SetColoringAvailable(), CSimpleGraphicDataSource::SetRegularity(), CAnchoredAln::SetScore(), CAlnContainer::size(), swap(), and Warning().

Referenced by CSGAlignmentJob::x_GetAlignments(), and CSGAlignStatJob::x_LoadAlignments().

◆ DEFINE_STATIC_ARRAY_MAP()

DEFINE_STATIC_ARRAY_MAP ( TGraphTitleMap  ,
sm_GraphTitleMap  ,
s_GraphTitles   
)

◆ GetAnchors()

void GetAnchors ( CBioseq_Handle handle,
const CSynonymsSet synonyms,
const CSeq_align align,
vector< CSeq_align::TDim > &  anchors 
)

◆ s_CheckTraceMateAlign()

static bool s_CheckTraceMateAlign ( bool  match_id,
bool  is_bam_align,
const CSeq_align align,
string ti,
string mate_ti,
const string expect_mate_ti = "" 
)
static

◆ s_CompressDiscToDenseq()

static CRef<CSeq_align> s_CompressDiscToDenseq ( list< CRef< CSeq_align >> &  aln_set,
int  anchor_row 
)
static

◆ s_GraphIndexToTitle()

const string& s_GraphIndexToTitle ( size_t  idx)

Definition at line 1459 of file alignment_job.cpp.

References _ASSERT, and kEmptyStr.

Referenced by CSGAlignStatJob::x_CreatePileUpGraphs().

◆ s_GraphTitleToIndex()

size_t s_GraphTitleToIndex ( const string title)

Definition at line 1449 of file alignment_job.cpp.

Referenced by CSGAlignStatJob::x_CollectAlignStats().

◆ s_IsMatchById()

static bool s_IsMatchById ( CConstRef< CSeq_annot aln_annot)
static

◆ s_IsSecondPassAlignment()

static bool s_IsSecondPassAlignment ( const CSeq_align align)
static

Definition at line 1108 of file alignment_job.cpp.

References CSeq_align::GetNamedScore().

Referenced by CSGAlignmentJob::x_GetAlignments().

◆ s_ObjectIdToStr()

static void s_ObjectIdToStr ( const CObject_id id,
string id_str 
)
static

Definition at line 335 of file alignment_job.cpp.

References GetId(), and NStr::NumericToString().

Referenced by s_CheckTraceMateAlign().

◆ USING_SCOPE()

USING_SCOPE ( objects  )

Variable Documentation

◆ kDetailsZoomLevel

const double kDetailsZoomLevel = 2
static

Scale at which align details are made visible Align details: unaligned tails, mate pairs.

Definition at line 94 of file alignment_job.cpp.

Referenced by CSGAlignmentJob::x_GetAlignments().

◆ kMaxAlignmentLoaded

const int kMaxAlignmentLoaded = 250000
static

maximal number of alignments allowed to load to avoid potential memery and performance problem.

Unit: number of alignments

Definition at line 99 of file alignment_job.cpp.

Referenced by CSGAlignmentJob::x_LoadAlignments(), and CSGAlignStatJob::x_LoadAlignments().

◆ kSequenceZoomLevel

const double kSequenceZoomLevel = 1.0/8.
static

always show individual alignments when zoom level is below this threshold.

Unit: bases per screen pixel (BPP)

Definition at line 90 of file alignment_job.cpp.

Referenced by CSGAlignmentJob::x_LoadAlignments().

◆ s_GraphTitles

const TGraphTitle s_GraphTitles[]
static
Initial value:
= {
{"Number of A bases", CAlnStatConfig::eStat_A},
{"Number of C bases", CAlnStatConfig::eStat_C},
{"Number of G bases", CAlnStatConfig::eStat_G},
{"Number of T bases", CAlnStatConfig::eStat_T},
{"Number of inserts", CAlnStatConfig::eStat_Gap},
{"Number of introns", CAlnStatConfig::eStat_Intron },
{"Number of matches", CAlnStatConfig::eStat_Match}
}
@ eStat_Intron
intron (for mRNA-to-genome alignments)

Definition at line 1436 of file alignment_job.cpp.

Modified on Fri Jul 12 16:18:49 2024 by modify_doxy.py rev. 669887