NCBI C++ ToolKit
|
#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 <objtools/alnmgr/aln_generators.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 <objmgr/util/seq_loc_util.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>
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::EStatType > | TGraphTitle |
layout style to layout display name More... | |
typedef CStaticArrayMap< string, CAlnStatConfig::EStatType > | TGraphTitleMap |
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 string & | s_GraphIndexToTitle (size_t idx) |
void | GetAnchors (CBioseq_Handle &handle, const CSynonymsSet *synonyms, const CSeq_align &align, vector< CSeq_align::TDim > &anchors) |
static CRef< CSeq_align > | s_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 SStaticPair<const char*, CAlnStatConfig::EStatType> TGraphTitle |
layout style to layout display name
Definition at line 1550 of file alignment_job.cpp.
Definition at line 1561 of file alignment_job.cpp.
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 2252 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_BuildAlignDataSource(), CSGAlignmentJob::x_GetAlignments(), and CSGAlignStatJob::x_LoadAlignments().
DEFINE_STATIC_ARRAY_MAP | ( | TGraphTitleMap | , |
sm_GraphTitleMap | , | ||
s_GraphTitles | |||
) |
void GetAnchors | ( | CBioseq_Handle & | handle, |
const CSynonymsSet * | synonyms, | ||
const CSeq_align & | align, | ||
vector< CSeq_align::TDim > & | anchors | ||
) |
Definition at line 2174 of file alignment_job.cpp.
References CSeq_align::CheckNumRows(), CBioseq_Handle::ContainsSegment(), eGetId_Best, eGetId_Canonical, eUnknown, GetId(), CBioseq_Handle::GetId(), CBioseq_Handle::GetScope(), CSeq_align::GetSeq_id(), GetSeqId(), NCBI_THROW, and row.
Referenced by CSGAlignmentJob::x_BuildAlignDataSource(), CSGAlignmentJob::x_CreateAlignGlyphsForCrossOriginAlign(), CSGAlignmentJob::x_GetAlignments(), and CSGAlignStatJob::x_LoadAlignments().
|
static |
Definition at line 348 of file alignment_job.cpp.
References CUser_field_Base::GetData(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::GetExt(), CUser_field::GetFieldRef(), CSeq_id_Base::GetGeneral(), GetId(), CDense_seg_Base::GetIds(), CUser_field_Base::C_Data::GetInt(), CSeq_id_Base::GetLocal(), CSeq_align::GetNamedScore(), CSeq_align_Base::GetSegs(), CSeq_align::GetSeq_id(), CUser_field_Base::C_Data::GetStr(), CDbtag_Base::GetTag(), i, NStr::IntToString(), CSeq_align_Base::C_Segs::IsDenseg(), CSeq_id_Base::IsGeneral(), CUser_field_Base::C_Data::IsInt(), CSeq_id_Base::IsLocal(), CSeq_align_Base::IsSetExt(), CUser_field_Base::C_Data::IsStr(), ITERATE, len, NStr::NumericToString(), s_ObjectIdToStr(), and NStr::SizetToString().
Referenced by CSGAlignmentJob::x_CreateCAlignGlyph(), and CSGAlignmentJob::x_GetAlignments().
|
static |
Definition at line 2207 of file alignment_job.cpp.
References ERR_POST, Error(), CSeq_align_Base::eType_not_set, CDense_seg_Base::GetDim(), i, len, r(), CDense_seg_Base::SetDim(), CDense_seg_Base::SetIds(), CDense_seg_Base::SetLens(), CDense_seg_Base::SetNumseg(), CDense_seg_Base::SetStarts(), and CDense_seg_Base::SetStrands().
Referenced by BuildAlignDataSource().
Definition at line 1574 of file alignment_job.cpp.
References _ASSERT, and kEmptyStr.
Referenced by CSGAlignStatJob::x_CreatePileUpGraphs().
Definition at line 1564 of file alignment_job.cpp.
Referenced by CSGAlignStatJob::x_CollectAlignStats().
|
static |
Definition at line 1089 of file alignment_job.cpp.
References CSeq_annot_Base::CanGetDesc(), CAnnot_descr_Base::Get(), CUser_field_Base::C_Data::GetBool(), CUser_field_Base::GetData(), CSeq_annot_Base::GetDesc(), CUser_field::GetFieldRef(), CUser_field_Base::C_Data::IsBool(), and ITERATE.
Referenced by CSGAlignmentJob::x_GetAlignments().
|
static |
Definition at line 1112 of file alignment_job.cpp.
References CSeq_align::GetNamedScore().
Referenced by CSGAlignmentJob::x_GetAlignments().
|
static |
Definition at line 337 of file alignment_job.cpp.
References GetId(), and NStr::NumericToString().
Referenced by s_CheckTraceMateAlign().
USING_SCOPE | ( | objects | ) |
|
static |
Scale at which align details are made visible Align details: unaligned tails, mate pairs.
Definition at line 96 of file alignment_job.cpp.
Referenced by CSGAlignmentJob::x_GetAlignments().
maximal number of alignments allowed to load to avoid potential memery and performance problem.
Unit: number of alignments
Definition at line 101 of file alignment_job.cpp.
Referenced by CSGAlignmentJob::x_LoadAlignments(), and CSGAlignStatJob::x_LoadAlignments().
|
static |
always show individual alignments when zoom level is below this threshold.
Unit: bases per screen pixel (BPP)
Definition at line 92 of file alignment_job.cpp.
Referenced by CSGAlignmentJob::x_LoadAlignments().
|
static |
Definition at line 1551 of file alignment_job.cpp.