AlignAccessMgr;
60 structAlignAccessRefSeqEnumerator;
61 structAlignAccessAlignmentEnumerator;
108 #define SRZ_CONFIG_NAME "analysis.bam.cfg" 114 CSrzPath(
const string& rep_path,
const string& vol_path);
116 static stringGetDefaultRepPath(
void);
117 static stringGetDefaultVolPath(
void);
119 voidAddRepPath(
const string& rep_path);
120 voidAddVolPath(
const string& vol_path);
126 stringFindAccPath(
const string& acc, EMissing mising);
129 returnFindAccPath(acc, eMissing_Throw);
133 returnFindAccPath(acc, eMissing_Empty);
178 returnm_AlignAccessMgr;
198 const string& db_name,
199EUseAPI use_api = eUseDefaultAPI);
203 const string& db_name,
204 const string& idx_name,
205EUseAPI use_api = eUseDefaultAPI);
209 static boolUseRawIndex(
EUseAPIuse_api);
238m_IdMapper.reset(idmapper, ownership);
242 returnm_IdMapper.get();
248 return n.size() == 2 &&
n[0] == name[0] &&
n[1] == name[1];
257 returnm_IncludedAlignTags;
265 CRef<CSeq_id>GetShortSeq_id(
const string&
str,
boolexternal =
false)
const;
267 TSeqPosGetRefSeqLength(
const string&
str)
const;
269 stringGetHeaderText(
void)
const;
271 #define HAVE_NEW_PILEUP_COLLECTOR 273 #ifdef HAVE_NEW_PILEUP_COLLECTOR 275 structSPileupValues;
322 returnm_IntronMode != eNoCountIntron;
345 returncc_acgt.
data()->cc;
350 if( m_SplitACGTLen <
len) {
353 returncc_split_acgt[k].
data();
357 returncc_match.
data();
361 returncc_gap.
data();
365 returncc_intron.
data();
374 for( ; pos < end; ++pos ) {
404 if( callback && ref_pos >= m_RefFrom+FLUSH_SIZE && 2*ref_pos >= m_RefFrom+m_RefToOpen ) {
405advance_current_beg(ref_pos, callback);
411 if( ref_end <= m_RefFrom ) {
415 if( ref_pos < m_RefFrom ) {
418 if( ref_end > m_RefStop ) {
421 if( ref_end > m_RefToOpen ) {
422advance_current_end(ref_end);
429 if( ref_end <= m_RefFrom ) {
433 if( ref_pos < m_RefFrom ) {
435read_pos += m_RefFrom - ref_pos;
438 if( ref_end > m_RefStop ) {
441 if( ref_end > m_RefToOpen ) {
442advance_current_end(ref_end);
448 if( trim_ref_range(ref_pos, ref_end) ) {
449add_match_graph_range(ref_pos - m_RefFrom,
450ref_end - m_RefFrom);
455 if( trim_ref_range(ref_pos, ref_end) ) {
456add_gap_graph_range(ref_pos - m_RefFrom,
457ref_end - m_RefFrom);
462 if( count_introns() && trim_ref_range(ref_pos, ref_end) ) {
463add_intron_graph_range(ref_pos - m_RefFrom,
464ref_end - m_RefFrom);
470 if( trim_ref_range(ref_pos, ref_end, read_pos) ) {
471add_bases_graph_range(ref_pos - m_RefFrom,
479 if( trim_ref_range(ref_pos, ref_end, read_pos) ) {
480add_bases_graph_range_raw(ref_pos - m_RefFrom,
490 returnmax_count[
type];
495 const string& ref_id,
509 SAADBImpl(
const CBamMgr& mgr,
const string& db_name,
string& idx_name);
532: m_Size(0), m_Capacity(0)
544 if(
char* p = m_Buffer.get() ) {
554 if( capacity() < min_capacity ) {
555x_reserve(min_capacity);
569 returnm_Buffer.get();
573 returnm_Buffer[pos];
586 returnm_Buffer.get();
600 voidx_reserve(
size_tmin_capacity);
611 return out.write(
str.data(),
str.size());
628 returnm_DB->GetIdMapper();
639 typedef rc_t(*TGetString)(
constAlignAccessRefSeqEnumerator *
self,
640 char*
buffer,
size_tbsize,
size_t*
size);
642 voidx_AllocBuffers(
void);
643 voidx_InvalidateBuffers(
void);
645 voidx_CheckValid(
void)
const;
649 const char*
msg, TGetString func)
const;
666:
public CBamRef<const BAMAlignment>
671 Int4GetRefSeqIndex(
void)
const;
673 Uint2GetFlags(
void)
const;
690 const CBGZFPos* file_pos =
nullptr);
692 const string& ref_id,
695ESearchMode search_mode = eSearchByOverlap,
696 const CBGZFPos* file_pos =
nullptr);
698 const string& ref_id,
703ESearchMode search_mode = eSearchByOverlap,
704 const CBGZFPos* file_pos =
nullptr);
714 returnm_DB->GetIdMapper();
731m_SpotIdDetector = spot_id_detector;
735 returnm_SpotIdDetector.GetNCPointerOrNull();
750 returnm_RawImpl? &m_RawImpl.GetNCObject().m_Iter: 0;
753 Int4GetRefSeqIndex(
void)
const;
755 TSeqPosGetRefSeqPos(
void)
const;
758 Int4GetNextRefSeqIndex()
const;
760 TSeqPosGetNextRefSeqPos()
const;
765 TSeqPosGetShortSequenceLength(
void)
const;
768 TSeqPosGetCIGARPos(
void)
const;
770 TSeqPosGetCIGARRefSize(
void)
const;
771 TSeqPosGetCIGARShortSize(
void)
const;
774 Uint2GetRawCIGAROpsCount()
const;
776 voidGetRawCIGAR(vector<Uint4>& raw_cigar)
const;
791 boolIsSetStrand(
void)
const;
794 Uint1GetMapQuality(
void)
const;
796 boolIsPaired(
void)
const;
797 boolIsFirstInPair(
void)
const;
798 boolIsSecondInPair(
void)
const;
799 boolIsSecondary(
void)
const;
801 Uint2GetFlags(
void)
const;
810 typedef rc_t(*TGetString)(
constAlignAccessAlignmentEnumerator *
self,
811 char*
buffer,
size_tbsize,
size_t*
size);
812 typedef rc_t(*TGetString2)(
constAlignAccessAlignmentEnumerator *
self,
814 char*
buffer,
size_tbsize,
size_t*
size);
816 voidx_CheckValid(
void)
const;
820 const char*
msg, TGetString func)
const;
822 const char*
msg, TGetString2 func)
const;
823 voidx_GetCIGAR(
void)
const;
824 boolx_HasAmbiguousMatch()
const;
825 voidx_GetStrand(
void)
const;
845AlignAccessAlignmentEnumerator* ptr);
849 voidx_InvalidateBuffers();
850 boolx_HasAmbiguousMatch()
const;
860 const CBGZFPos* file_pos =
nullptr);
862 const string& ref_label,
866 const CBGZFPos* file_pos =
nullptr);
868 const string& ref_label,
874 const CBGZFPos* file_pos =
nullptr);
876 voidx_InvalidateBuffers();
885eStrand_not_read = -2,
938 return m_RawImpl->m_Iter.GetCIGAROpsCount();
945 return m_RawImpl->m_Iter.GetCIGAROp(index);
CNcbiOstream & operator<<(CNcbiOstream &out, const CBamString &str)
SPECIALIZE_BAM_REF_TRAITS(AlignAccessMgr, const)
ISpotIdDetector interface is used to detect spot id in case of incorrect flag combination.
virtual void AddSpotId(string &short_id, const CBamAlignIterator *iter)=0
ISpotIdDetector * GetSpotIdDetector(void) const
CIRef< ISpotIdDetector > m_SpotIdDetector
CRef< CSeq_annot > GetSeq_annot(void) const
AutoPtr< SCreateCache > m_CreateCache
DECLARE_OPERATOR_BOOL(m_AADBImpl||m_RawImpl)
CRef< CSeq_annot > x_GetSeq_annot(const string *annot_name) const
CRef< SRawImpl > m_RawImpl
Uint2 GetRawCIGAROpsCount() const
CRef< CObject_id > TObjectIdCache
void x_MapId(CSeq_id &id) const
CBamRawAlignIterator * GetRawIndexIteratorPtr() const
IIdMapper * GetIdMapper(void) const
void SetSpotIdDetector(ISpotIdDetector *spot_id_detector)
EBamFlagsAvailability m_BamFlagsAvailability
CRef< CSeq_id > m_ShortSeq_id
bool UsesRawIndex() const
CRef< SAADBImpl > m_AADBImpl
bool UsesAlignAccessDB() const
Uint4 GetRawCIGAROp(Uint2 index) const
CRef< CSeq_id > m_RefSeq_id
CRef< CSeq_entry > GetMatchEntry(void) const
CRef< CSeq_entry > x_GetMatchEntry(const string *annot_name) const
virtual void AddValuesTail(TSeqPos count, const SPileupValues &values)=0
virtual ~ICollectPileupCallback()
virtual void AddZerosBy16(TSeqPos count)=0
virtual bool AcceptAlign(const CBamAlignIterator &ait)
virtual void AddValuesBy16(TSeqPos count, const SPileupValues &values)=0
AutoPtr< TRefSeqLengths > m_RefSeqLengths
DECLARE_OPERATOR_BOOL(m_AADB||m_RawDB)
bool UsesAlignAccessDB() const
size_t CollectPileup(SPileupValues &values, const string &ref_id, CRange< TSeqPos > graph_range, ICollectPileupCallback *callback=0, SPileupValues::EIntronMode intron_mode=SPileupValues::eNoCountIntron, TSeqPos gap_to_intron_threshold=kInvalidSeqPos) const
bool UsesRawIndex() const
TTagList m_IncludedAlignTags
AutoPtr< IIdMapper > m_IdMapper
void SetIdMapper(IIdMapper *idmapper, EOwnership ownership)
const string & GetDbName(void) const
vector< STagInfo > TTagList
unordered_map< string, CRef< CSeq_id > > TRefSeqIds
AutoPtr< TRefSeqIds > m_RefSeqIds
IIdMapper * GetIdMapper(void) const
const TTagList & GetIncludedAlignTags() const
const string & GetIndexName(void) const
CRef< CObjectFor< CBamRawDb > > m_RawDB
unordered_map< string, TSeqPos > TRefSeqLengths
const CBamRef< const AlignAccessMgr > & GetAlignAccessMgr() const
const CBamVFSManager & GetVFSManager() const
CBamRef< const AlignAccessMgr > m_AlignAccessMgr
CRef< CObjectFor< CBamRawDb > > m_RawDB
DECLARE_OPERATOR_BOOL(m_AADBImpl||m_RawDB)
CRef< CSeq_id > m_CachedRefSeq_id
IIdMapper * GetIdMapper(void) const
CRef< SAADBImpl > m_AADBImpl
void reserve(size_t min_capacity)
char operator[](size_t pos) const
void operator=(const CBamString &)
AutoArray< char > m_Buffer
const char * data() const
CBamString(const CBamString &)
Reallocable memory buffer (no memory copy overhead) Mimics vector<>, without the overhead of explicit...
const value_type * data() const
@ eBadFormat
Invalid SRZ accession format.
NCBI_EXCEPTION_DEFAULT(CSrzException, CException)
vector< string > m_VolPath
vector< string > m_RepPath
string FindAccPathNoThrow(const string &acc)
string FindAccPath(const string &acc)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
General IdMapper interface.
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
CException & operator=(const CException &)
Private assignment operator to prohibit assignment.
virtual void x_Init(const CDiagCompileInfo &info, const string &message, const CException *prev_exception, EDiagSev severity)
Helper method for initializing exception data.
EErrCode
Error types that an application can generate.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
ENa_strand GetStrand(const CSeq_loc &loc, CScope *scope=0)
Returns eNa_strand_unknown if multiple Bioseqs in loc Returns eNa_strand_other if multiple strands in...
uint8_t Uint1
1-byte (8-bit) unsigned integer
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
#define NCBI_BAMREAD_EXPORT
static const char label[]
ENa_strand
strand of nucleic acid
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines NCBI C++ exception handling.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static int GetDebugLevel()
CConstRef< CBamDb::SAADBImpl > m_DB
CBamRef< AlignAccessAlignmentEnumerator > m_Iter
CBamString m_ShortSequence
CRef< CObjectFor< CBamRawDb > > m_RawDB
CBamString m_ShortSequence
CBamRawAlignIterator m_Iter
CBamRef< const AlignAccessDB > m_DB
void add_match_graph_pos(TSeqPos pos)
TCount get_max_count(int type) const
void add_gap_graph_range(TSeqPos pos, TSeqPos end)
void advance_current_end(TSeqPos ref_end)
void add_gap_ref_range(TSeqPos ref_pos, TSeqPos ref_end)
void add_bases_ref_range_raw(TSeqPos ref_pos, TSeqPos ref_end, const CTempString &read, TSeqPos read_pos)
void add_match_ref_range(TSeqPos ref_pos, TSeqPos ref_end)
void decode_intron(TSeqPos len)
void add_bases_ref_range(TSeqPos ref_pos, TSeqPos ref_end, const CTempString &read, TSeqPos read_pos)
bool trim_ref_range(TSeqPos &ref_pos, TSeqPos &ref_end, TSeqPos &read_pos)
SPileupValues(CRange< TSeqPos > ref_range, EIntronMode intron_mode=eNoCountIntron)
void add_bases_graph_range_raw(TSeqPos pos, TSeqPos end, CTempString read, TSeqPos read_pos)
const TCount * get_intron_counts() const
CSimpleBufferT< TCount > cc_gap
void add_intron_graph_range(TSeqPos pos, TSeqPos end)
void update_max_counts(TSeqPos len)
CSimpleBufferT< TCount > cc_intron
bool trim_ref_range(TSeqPos &ref_pos, TSeqPos &ref_end)
void add_bases_graph_range(TSeqPos pos, TSeqPos end, CTempString read, TSeqPos read_pos)
const TCount * get_match_counts() const
void add_intron_ref_range(TSeqPos ref_pos, TSeqPos ref_end)
CSimpleBufferT< TCount > cc_match
void finalize(ICollectPileupCallback *callback)
CSimpleBufferT< SCountACGT > cc_acgt
void initialize(CRange< TSeqPos > ref_range, EIntronMode intron_mode=eNoCountIntron)
const TCount * get_acgt_counts() const
void add_match_graph_range(TSeqPos pos, TSeqPos end)
void advance_current_beg(TSeqPos ref_pos, ICollectPileupCallback *callback)
const TCount * get_split_acgt_counts(int k, TSeqPos len) const
void decode_gap(TSeqPos len)
void update_current_ref_start(TSeqPos ref_pos, ICollectPileupCallback *callback)
const TCount * get_gap_counts() const
void make_split_acgt(TSeqPos len)
bool count_introns() const
bool operator==(CTempString n) const
CRef< CObject_id > id_cache
CBamString m_RefSeqIdBuffer
CBamRef< AlignAccessRefSeqEnumerator > m_Iter
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4