: m_BlobType(blob_type),
143m_RefIdType(ref.
first->m_File->GetRefIdType()),
144m_File(ref.
first->m_File->GetCSRAName()),
145m_SeqId(ref.
first->GetRefSeqId()),
147m_FileLock(ref.second)
155: m_BlobType(eBlobType_reads),
156m_RefIdType(
file.
first->GetRefIdType()),
158m_FirstSpotId(first_spot_id),
159m_FileLock(
file.second)
173 const char* begin =
str.data();
174 const char* ptr = begin+
str.size();
175 const char* end = ptr;
177 Uint8number_digit = 1;
178 boolparsing_read_id =
true;
179 for( ; ptr != begin; ) {
182 if( parsing_read_id ) {
194 number+= (c-
'0')*number_digit;
197 else if( c ==
'.') {
203 if( ptr[1] ==
'0') {
207 if( parsing_read_id ) {
212parsing_read_id =
false;
232 if( ptr == begin ) {
251 const CDbtag& dbtag =
id->GetGeneral();
261 if( srr_len !=
NPOS) {
274 if( srr_len ==
NPOS) {
280 if( srr->size() != srr_len ) {
292 string* srr_acc_ptr,
300 const string&
str=
id->GetGeneral().GetTag().GetStr();
302 if( srr_end ==
NPOS) {
306*srr_acc_ptr =
str.substr(0, srr_end);
309*label_ptr =
str.substr(srr_end+1);
316 string* srr_acc_ptr,
327 if( srr_end ==
NPOS) {
331*srr_acc_ptr =
str.substr(0, srr_end);
399 "Bad CCSRABlobId: "<<str0);
411 "Bad CCSRABlobId: "<<str0);
416 "Bad CCSRABlobId: "<<str0);
469m_IdMapper(params.m_IdMapper)
497 template<
classCall>
501 unsignedretry_count)
503 if( retry_count == 0 ) {
506 for(
unsigned t= 1;
t< retry_count; ++
t) {
515 LOG_POST(
Warning<<
"CCSRADataLoader::"<<name<<
"() try "<<
t<<
" exception: "<<exc);
517 catch( exception& exc ) {
518 LOG_POST(
Warning<<
"CCSRADataLoader::"<<name<<
"() try "<<
t<<
" exception: "<<exc.
what());
521 LOG_POST(
Warning<<
"CCSRADataLoader::"<<name<<
"() try "<<
t<<
" exception");
526 LOG_POST(
Warning<<
"CCSRADataLoader: waiting "<<wait_sec<<
"s before retry");
582 if( !
file.first ) {
585 return TRefLock(
file.first->GetRefSeqInfo(idh), std::move(
file.second));
592 ERR_POST_X(1,
"CCSRADataLoader::GetRefSeqInfo: " 593 "Seq-id "<<idh<<
" appears in two files: " 594<<ret.first->m_File->GetCSRAName()<<
" & " 595<<
info->m_File->GetCSRAName());
623 if( it->second->m_CSRADb->GetSraIdPart() == acc ) {
626 ERR_POST_X(2,
"CCSRADataLoader::GetReadsFileInfo: " 627 "Seq-id "<<idh<<
" appears in two files: " 628<<it->second->GetCSRAName()<<
" & " 629<<ret.first->GetCSRAName());
632ret.first = it->second;
643 if( !ret.first->IsValidReadId(spot_id, read_id, ref_ptr, ref_pos_ptr) ) {
647*spot_id_ptr = spot_id;
650*read_id_ptr = read_id;
706data_source, cref(blob_id)),
736data_source, cref(idh), choice),
749 boolneed_seq =
false, need_align =
false, need_graph =
false, need_orphan =
false;
752need_seq = need_align = need_graph =
true;
762need_align = need_graph =
true;
788 if( need_align || need_graph ) {
828 if( need_seq || need_graph || (need_align && !ref_info) ) {
832 if( need_align && !ref_info ) {
842 if( need_align && ref_info ) {
847 if( chunk_id >= 0 ) {
865file_info.first->GetRefSeqInfo(blob_id)->LoadAnnotBlob(load_lock);
868file_info.first->GetRefSeqInfo(blob_id)->LoadRefSeqBlob(load_lock);
871file_info.first->LoadReadsBlob(blob_id, load_lock);
881cref(blob_id), ref(chunk_info)),
894file_info.first->GetRefSeqInfo(blob_id)->LoadAnnotChunk(chunk_info);
897file_info.first->GetRefSeqInfo(blob_id)->LoadRefSeqChunk(chunk_info);
910it->second->GetPossibleAnnotNames(
names);
923 return info.first->GetRefSeqIterator();
945cref(idh), ref(ids)),
982 if( (*it)->GetTextseq_Id() ) {
1013 if( (*it)->IsGi() ) {
1014ret.
gi= (*it)->GetGi();
1064 "GetSequenceLength");
1073 returniter.GetSeqLength();
1076 returniter.GetShortLen();
1087 "GetSequenceType");
1109 const string& csra,
1115 stringrefseq_label = seq_id.
AsString();
1122 const string& csra,
1135 switch(
impl.GetPathInId() ) {
1148 impl.m_DirPath, csra),
1149 impl.m_IdMapper.get(),
1153 "CCSRADataLoader("<<csra<<
")="<<
m_CSRADb->GetSraIdPart());
1155 intmax_separate_spot_groups =
impl.GetSpotGroups();
1156 if( max_separate_spot_groups > 1 ) {
1174 if( !name.empty() ) {
1211 if( align_annot_name.empty() ) {
1233 "Found "<<refseq_label<<
" -> "<<refseq_id);
1267 if( ref_pos_ptr ) {
1273 if( ref_ptr || ref_pos_ptr ) {
1303 "CCSRADataLoader:LoadReads("<<blob_id.
ToString()<<
", "<<
1304first_spot_id<<
"-"<<last_spot_id);
1314 for( ; it; ++it ) {
1325 for( ; it; ++it ) {
1332annot->
SetData().SetAlign().push_back(ait.GetMatchAlign());
1348: m_File(csra_file),
1350m_MinMapQuality(csra_file->GetMinMapQuality())
1378 unsignedGetStatCount(
void)
const{
1381 doubleGetStatLen(
void)
const{
1382 returnm_RefPosLast - m_RefPosFirst + .5;
1394 for( ; ait; ++ait ) {
1395 if( min_quality > 0 && ait.GetMapQuality() < min_quality ) {
1399 TSeqPospos = ait.GetRefSeqPos();
1401 if( pos < m_RefPosFirst ) {
1402m_RefPosFirst = pos;
1404 if( pos > m_RefPosLast ) {
1407 if( ++m_Count ==
count) {
1413 "Stat @ "<<ref_pos<<
": "<<m_Count<<
" entries: "<<
1414m_RefPosFirst<<
"-"<<m_RefPosLast<<
1415 " skipped: "<<skipped);
1447 "Align Chunk "<<k<<
": "<<range<<
1457 "Graph Chunk "<<k<<
": "<<range<<
1489 TSeqPosa_empty = 0, g_empty = 0;
1490 for(
TSeqPosp = 0; p < ref_length; p += segment_len ) {
1491 TSeqPosend =
min(ref_length, p + segment_len);
1499 if( (p >
a.start_pos &&
a.align_count+c >= 2*kAlignLimitCount) ||
1500(p >=
a.start_pos+kAlignEmptyLength && c && !
a.align_count) ) {
1506 a.align_count += c;
1509 else if(
a.align_count && end >= a_empty+kAlignEmptyLength ) {
1512 a.start_pos = a_empty;
1515 if(
a.align_count >= kAlignLimitCount ) {
1526 if( (p >
g.start_pos &&
g.align_count+c >= 2*kGraphLimitCount) ||
1527(p >=
g.start_pos+kGraphEmptyLength && c && !
g.align_count) ) {
1533 g.align_count += c;
1536 else if(
g.align_count && end >= g_empty+kGraphEmptyLength ) {
1539 g.start_pos = g_empty;
1542 if(
g.align_count >= kGraphLimitCount ||
1544(p + segment_len -
g.start_pos) >= kGraphLimitLength) ) {
1553 if(
a.align_count ) {
1554 _ASSERT(
a.start_pos < ref_length);
1556 a.start_pos = ref_length;
1559 _ASSERT(
a.start_pos <= ref_length);
1564 if(
g.align_count ) {
1565 _ASSERT(
g.start_pos < ref_length);
1567 g.start_pos = ref_length;
1570 _ASSERT(
g.start_pos <= ref_length);
1575 size_talign_chunks = 0;
1577 if( it->align_count ) {
1581 size_tgraph_chunks = 0;
1583 if( it->align_count ) {
1588 " align count: "<<total<<
1589 " align chunks: "<<align_chunks<<
1590 " graph chunks: "<<graph_chunks<<
1606chunk_len =
max(chunk_len, segment_len);
1607 for(
TSeqPospos = 0; pos < ref_length; pos += chunk_len ) {
1613 " exp count: "<<est_count<<
" chunks: "<<pp.size());
1615pp.push_back(ref_length);
1619 const unsignedkStatCount = 1000;
1623 TSeqPosref_begin = 0, ref_end = ref_length;
1624 doublestat_len = 0, stat_cnt = 0;
1625 const unsignedscan_first = 1;
1629 if( stat[0].m_Count != kStatCount ) {
1632 if( stat[0].m_Count > 0 ) {
1646ref_begin = stat[0].m_RefPosFirst;
1647stat_len = stat[0].GetStatLen();
1648stat_cnt = stat[0].GetStatCount();
1650 for(
unsignedk = scan_first; k <
kNumStat; ++k ) {
1653 if( k && ref_pos < stat[k-1].m_RefPosLast ) {
1654ref_pos = stat[k-1].m_RefPosLast;
1656 _TRACE(
"stat["<<k<<
"] @ "<<ref_pos);
1659stat_len += stat[k].GetStatLen();
1660stat_cnt += stat[k].GetStatCount();
1662 doubledensity = stat_cnt / stat_len;
1663 doubleexp_count = (ref_end-ref_begin)*density;
1665chunks =
min(chunks,
unsigned(sqrt(exp_count)+1));
1668 "Total range: "<<ref_begin<<
"-"<<ref_end-1<<
1669 " exp count: "<<exp_count<<
" chunks: "<<chunks);
1671pp.resize(chunks+1);
1672 for(
unsignedk = 1; k < chunks; ++k ) {
1674 TSeqPos(
double(ref_end-ref_begin)*k/chunks);
1677pp[chunks] = ref_end;
1680 ITERATE( vector<TSeqPos>, it, pp ) {
1691TChunks::const_iterator it =
1712 stringalign_name, pileup_name;
1713 if( !separate_spot_groups ) {
1723 if( separate_spot_groups ) {
1774 "CCSRADataLoader:LoadAnnotMain("<<
1781 if( !separate_spot_groups ) {
1787vector<CRef<CSeq_annot>> new_annots;
1788vector<CRef<CTSE_Chunk_Info>> new_chunks;
1791 if( separate_spot_groups ) {
1799annot->
SetDesc().Set().push_back(desc);
1800new_annots.push_back(annot);
1813 for(
size_tk = 0; k+1 < chunks.size(); ++k ) {
1814 if( !chunks[k].align_count ) {
1819range.
SetFrom(chunks[k].start_pos);
1820range.
SetToOpen(chunks[k+1].start_pos);
1822 if( separate_spot_groups ) {
1843new_chunks.push_back(chunk);
1852 for(
size_tk = 0; k+1 < chunks.size(); ++k ) {
1855range.
SetFrom(chunks[k].start_pos);
1856range.
SetToOpen(chunks[k+1].start_pos);
1857 if( separate_spot_groups ) {
1878new_chunks.push_back(chunk);
1883 for(
auto& annot : new_annots ) {
1888 for(
auto& chunk : new_chunks ) {
1943vector<CTSE_Chunk_Info::TLocation> loc_set(1);
1964range.
SetFrom(range_id*chunk_data_size);
1968 "CCSRADataLoader:LoadRefSeqData("<<
1973list< CRef<CSeq_literal> >
data;
2048 return ss[pos].cnts[stat];
2053 ss[pos].cnts[stat] += 1;
2073 if( pos <
size() ) {
2076 case 'A': stat =
kStat_A;
break;
2077 case 'C': stat =
kStat_C;
break;
2078 case 'G': stat =
kStat_G;
break;
2079 case 'T': stat =
kStat_T;
break;
2097pair<unsigned, unsigned> c_min_max;
2098 if( !
ss.empty() && !
x_empty(stat) ) {
2099c_min_max.first = c_min_max.second =
x_get(stat, 0);
2101 unsignedc =
x_get(stat,
i);
2102c_min_max.first =
min(c_min_max.first, c);
2103c_min_max.second =
max(c_min_max.second, c);
2111vv.reserve(
size());
2118vv.reserve(
size());
2139 void Create(
const string& name);
2146m_SeparateSpotGroups(!m_File->GetSeparateSpotGroups().
empty()),
2148m_LastAnnot(m_Annots.end())
2167 Create(spot_group_name);
2198 "CCSRADataLoader:LoadAlignChunk("<<
2208 size_tskipped = 0,
count= 0;
2213 for( ; ait; ++ait ){
2215 if( min_quality > 0 && ait.
GetMapQuality() < min_quality ) {
2230chunk_info.
x_LoadAnnot(place, *it->second.first);
2236pos<<
"-"<<(end-1)<<
": "<<
2237 count<<
" skipped: "<<skipped);
2250 "CCSRADataLoader:LoadPileupChunk("<<
2262 size_t count= 0, skipped = 0;
2267 for( ; ait; ++ait ) {
2268 if( min_quality > 0 && ait.
GetMapQuality() < min_quality ) {
2280 const char* ptr = cigar.
data();
2281 const char* end = cigar.
end();
2282 while( ptr != end ) {
2285 for( ; ptr != end; ) {
2287 if( c >=
'0'&& c <=
'9') {
2288seglen = seglen*10+(c-
'0');
2295 if( seglen == 0 ) {
2297 "Bad CIGAR length: "<<
type<<
2300 if(
type==
'=') {
2306 else if(
type==
'M'||
type==
'X') {
2308 for(
int i= 0;
i< seglen; ++
i) {
2309 if( ref_pos <
len) {
2310ss.
add_base(read[read_pos], ref_pos);
2316 else if(
type==
'I'||
type==
'S') {
2317 if(
type==
'S') {
2323 else if(
type==
'N') {
2327 else if(
type==
'D') {
2332 else if(
type!=
'P') {
2334 "Bad CIGAR char: "<<
type<<
" in "<<cigar);
2342pos<<
"-"<<(end-1)<<
": "<<
2343 count<<
" skipped: "<<skipped);
2346 size_ttotal_bytes = 0;
2352 for(
intk = 0; k <
kNumStat; ++k ) {
2354 static const char*
consttitles[6] = {
2355 "Number of A bases",
2356 "Number of C bases",
2357 "Number of G bases",
2358 "Number of T bases",
2359 "Number of inserts",
2370 if( c_min_max.second == 0 ) {
2372 data.SetValues().resize(
len);
2376total_bytes +=
data.SetValues().size();
2378 else if( c_min_max.second < 256 ) {
2382 data.SetMin(c_min_max.first);
2383 data.SetMax(c_min_max.second);
2385total_bytes += vv.size();
2391 data.SetMin(c_min_max.first);
2392 data.SetMax(c_min_max.second);
2394total_bytes += vv.size()*
sizeof(vv[0]);
2396it->second.first->SetData().SetGraph().push_back(graph);
2401pos<<
"-"<<(end-1)<<
": "<<
2404chunk_info.
x_LoadAnnot(place, *it->second.first);
2409pos<<
"-"<<(end-1)<<
": "<<total_bytes<<
" bytes");
Blob state exceptions, used by GenBank loader.
CCSraDb::ERefIdType m_RefIdType
pair< CRef< CCSRARefSeqInfo >, TSRRFiles::CLock > TRefLock
string ToString(void) const
Get string representation of blob id.
static bool GetGeneralSRAAccLabel(const CSeq_id_Handle &idh, string *srr_acc_ptr=0, string *label_ptr=0)
pair< CRef< CCSRAFileInfo >, TSRRFiles::CLock > TFileLock
bool operator==(const CBlobId &id) const
static EGeneralIdType GetGeneralIdType(const CSeq_id_Handle &idh, EGeneralIdType allow_type, const string *srr=0)
static bool GetGeneralSRAAccReadId(const CSeq_id_Handle &idh, string *srr_acc_ptr=0, TVDBRowId *spot_id_ptr=0, Uint4 *read_id_ptr=0)
bool operator<(const CBlobId &id) const
void FromString(CTempString str)
TSRRFiles::CLock m_FileLock
CCSRABlobId(const CTempString &str)
static SIZE_TYPE ParseReadId(CTempString str, TVDBRowId *spot_id_ptr=0, Uint4 *read_id_ptr=0)
TFileLock GetReadsFileInfo(const CSeq_id_Handle &idh, TVDBRowId *spot_id_ptr=0, Uint4 *read_id_ptr=0, CRef< CCSRARefSeqInfo > *ref_ptr=0, TSeqPos *ref_pos_ptr=0)
CTSE_LoadLock GetBlobById(CDataSource *data_source, const CCSRABlobId &blob_id)
CRef< TSRRFiles > m_SRRFiles
CRef< CCSRABlobId > GetReadsBlobId(const TFileLock &lock, TVDBRowId spot_id)
CCSRADataLoader_Impl(const CCSRADataLoader::SLoaderParams ¶ms)
TRefLock GetRefSeqInfo(const CSeq_id_Handle &idh)
CDataSource::STypeFound GetSequenceTypeOnce(const CSeq_id_Handle &idh)
CDataSource::SGiFound GetGi(const CSeq_id_Handle &idh)
void SetSpotReadAlign(bool value)
void GetChunkOnce(const CCSRABlobId &blob_id, CTSE_Chunk_Info &chunk)
CRef< CCSRABlobId > GetBlobId(const CSeq_id_Handle &idh)
vector< CSeq_id_Handle > TIds
CDataLoader::TTSE_LockSet GetRecords(CDataSource *data_source, const CSeq_id_Handle &idh, CDataLoader::EChoice choice)
void GetIds(const CSeq_id_Handle &idh, TIds &ids)
string GetLabel(const CSeq_id_Handle &idh)
CDataSource::STypeFound GetSequenceType(const CSeq_id_Handle &idh)
void AddCSRAFileOnce(const string &csra)
CCSRADataLoader::TAnnotNames TAnnotNames
CRef< CCSRABlobId > GetBlobIdOnce(const CSeq_id_Handle &idh)
std::invoke_result< Call >::type CallWithRetry(Call &&call, const char *name, unsigned retry_count=0)
void GetIdsOnce(const CSeq_id_Handle &idh, TIds &ids)
CTSE_LoadLock GetBlobByIdOnce(CDataSource *data_source, const CCSRABlobId &blob_id)
CDataSource::SGiFound GetGiOnce(const CSeq_id_Handle &idh)
~CCSRADataLoader_Impl(void)
CDataSource::SAccVerFound GetAccVerOnce(const CSeq_id_Handle &idh)
void AddCSRAFile(const string &csra)
pair< CRef< CCSRARefSeqInfo >, TSRRFiles::CLock > TRefLock
friend class CCSRAFileInfo
TSeqPos GetSequenceLength(const CSeq_id_Handle &idh)
string GetLabelOnce(const CSeq_id_Handle &idh)
TFileLock GetSRRFile(const string &acc)
CCSraRefSeqIterator GetRefSeqIterator(const CSeq_id_Handle &idh)
CDataSource::SAccVerFound GetAccVer(const CSeq_id_Handle &idh)
TFileLock GetFileInfo(const CCSRABlobId &blob_id)
bool GetSpotReadAlign(void) const
CCSraShortReadIterator GetShortReadIterator(const CSeq_id_Handle &idh)
void LoadBlob(const CCSRABlobId &blob_id, CTSE_LoadLock &load_lock)
TTaxId GetTaxIdOnce(const CSeq_id_Handle &idh)
TSeqPos GetSequenceLengthOnce(const CSeq_id_Handle &idh)
TAnnotNames GetPossibleAnnotNames(void) const
TTaxId GetTaxId(const CSeq_id_Handle &idh)
CDataLoader::TTSE_LockSet GetRecordsOnce(CDataSource *data_source, const CSeq_id_Handle &idh, CDataLoader::EChoice choice)
pair< CRef< CCSRAFileInfo >, TSRRFiles::CLock > TFileLock
void GetChunk(const CCSRABlobId &blob_id, CTSE_Chunk_Info &chunk)
vector< CAnnotName > TAnnotNames
void x_Initialize(CCSRADataLoader_Impl &impl, const string &csra, CCSraDb::ERefIdType ref_id_type)
void GetPossibleAnnotNames(TAnnotNames &names) const
void LoadReadsBlob(const CCSRABlobId &blob_id, CTSE_LoadLock &load_lock)
CCSRADataLoader::TAnnotNames TAnnotNames
string GetPileupAnnotName(void) const
CCSraDb::ERefIdType m_RefIdType
void AddRefSeq(const string &refseq_label, const CSeq_id_Handle &refseq_id)
bool GetPileupGraphs(void) const
const vector< string > & GetSeparateSpotGroups(void) const
CRef< CCSRARefSeqInfo > GetRefSeqInfo(const CSeq_id_Handle &seq_id)
CCSRAFileInfo(CCSRADataLoader_Impl &impl, const string &csra, CCSraDb::ERefIdType ref_id_type)
const string & GetCSRAName(void) const
const string & GetBaseAnnotName(void) const
bool IsValidReadId(TVDBRowId spot_id, Uint4 read_id, CRef< CCSRARefSeqInfo > *ref_ptr=0, TSeqPos *ref_pos_ptr=0)
string GetAnnotName(const string &spot_group, ECSRAAnnotChunkIdType type) const
string GetAlignAnnotName(void) const
vector< string > m_SeparateSpotGroups
CRef< CSeq_annot > m_CovAnnot
void LoadAnnotMainChunk(CTSE_Chunk_Info &chunk_info)
const CSeq_id_Handle & GetRefSeqId(void) const
void LoadRefSeqBlob(CTSE_LoadLock &load_lock)
CCSraRefSeqIterator GetRefSeqIterator(void) const
void LoadAnnotPileupChunk(CTSE_Chunk_Info &chunk_info)
int GetAnnotChunkId(TSeqPos ref_pos) const
vector< SChunkInfo > TChunks
CCSRARefSeqInfo(CCSRAFileInfo *csra_file, const CSeq_id_Handle &seq_id)
void LoadAnnotAlignChunk(CTSE_Chunk_Info &chunk_info)
void LoadAnnotChunk(CTSE_Chunk_Info &chunk_info)
void LoadAnnotBlob(CTSE_LoadLock &load_lock)
void LoadRefSeqChunk(CTSE_Chunk_Info &chunk_info)
void LoadAnnotMainSplit(CTSE_LoadLock &load_lock)
void LoadRefSeqMainEntry(CTSE_LoadLock &load_lock)
void x_LoadRangesStat(void)
CTempString GetSpotGroup(void) const
TSeqPos GetShortPos(void) const
CTempString GetMismatchRead(void) const
static CRef< CSeq_annot > MakeSeq_annot(const string &annot_name)
CRef< CSeq_id > GetRefSeq_id(void) const
int GetMapQuality(void) const
TSeqPos GetRefSeqPos(void) const
static CRef< CSeq_annot > MakeEmptyMatchAnnot(const string &annot_name)
CRef< CSeq_align > GetMatchAlign(void) const
CTempString GetCIGARLong(void) const
void GetSpotGroups(TSpotGroups &spot_groups)
TSeqPos GetRowSize(void) const
static string MakeSraIdPart(EPathInIdType path_in_id_type, const string &dir_path, const string &csra_file)
Uint8 GetEstimatedNumberOfAlignments(void) const
size_t GetAlignCountAtPos(TSeqPos pos, TAlignType type=fAnyAlign) const
void GetRefLiterals(TLiterals &literals, TRange range, ELoadData load=eLoadData) const
TSeqPos GetAlnOverToOpen(TRange range) const
CRef< CBioseq > GetRefBioseq(ELoadData load=eLoadData) const
TSeqPos GetSeqLength(void) const
const CSeq_id_Handle & GetRefSeq_id_Handle(void) const
CRef< CSeq_annot > GetCoverageAnnot(void) const
CRef< CBioseq > GetShortBioseq(TBioseqFlags flags=fDefaultBioseqFlags) const
void SetLastSpotId(TVDBRowId spot_id)
CCSraAlignIterator GetAlignIter() const
CCSraRefSeqIterator GetRefSeqIter(TSeqPos *ref_pos_ptr=NULL) const
CFastMutex & GetValueMutex()
CTSE_LoadLock GetTSE_LoadLock(const TBlobId &blob_id)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
void SetNameDesc(const string &name)
@ eProtectedDb
DB is protected.
@ eNotFoundDb
DB main file not found.
virtual TErrCode GetErrCode(void) const
pair< TBioseqId, TBioseq_setId > TPlace
void x_AddAnnotPlace(const TBioseqId &id)
TBlobId GetBlobId(void) const
void x_LoadAnnot(const TPlace &place, const CSeq_annot &annot)
void x_SetLoadSeconds(double seconds)
void x_AddUsedMemory(size_t size)
void x_LoadSequence(const TPlace &place, TSeqPos pos, const TSequence &seq)
void SetLoaded(CObject *obj=0)
TChunkId GetChunkId(void) const
void x_AddAnnotType(const CAnnotName &annot_name, const SAnnotTypeSelector &annot_type, const TLocationId &location_id)
void x_SetLoadBytes(Uint4 bytes)
void x_AddSeq_data(const TLocationSet &location)
const CTSE_Split_Info & GetSplitInfo(void) const
void x_LoadChunk(TChunkId chunk_id) const
CTSE_Split_Info & GetSplitInfo(void)
void SetSeq_entry(CSeq_entry &entry, CTSE_SetObjectInfo *set_info=0)
bool IsLoaded(void) const
void AddChunk(CTSE_Chunk_Info &chunk_info)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
static const int chunk_size
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char kFileEnd[]
static const char kRefIdPrefixGeneral[]
static const unsigned kMaxReadId
static unsigned GetRetryCountParam(void)
static const unsigned kGraphEmptyPages
#define SPOT_GROUP_SEPARATOR
NCBI_PARAM_DEF(unsigned, CSRA_LOADER, RETRY_COUNT, 3)
static const double k_make_align_seconds
static const unsigned kGraphChunkSize
static const unsigned kAlignEmptyPages
static const double k_read_byte_seconds
static const char kBlobPrefixReads[]
static const char kBlobPrefixAnnot[]
static size_t GetGCSize(void)
NCBI_PARAM_DECL(int, CSRA_LOADER, DEBUG)
static const unsigned kAlignChunkSize
static const unsigned kReadsPerBlob
static int GetDebugLevel(void)
static const unsigned kChunkSeqDataMul
static const double k_make_graph_seconds
static const char kRefIdPrefixId[]
static const Uint4 k_align_bytes
static const bool kOmitEmptyPileup
static const unsigned kChunkGraphMul
NCBI_PARAM_DEF_EX(int, CSRA_LOADER, DEBUG, 0, eParam_NoThread, CSRA_LOADER_DEBUG)
static const bool kUseFullAlignCounts
NCBI_DEFINE_ERR_SUBCODE_X(16)
static const char kBlobPrefixReadsAlign[]
static const int kMainChunkId
static const char kBlobPrefixRefSeq[]
#define PILEUP_NAME_SUFFIX
static const bool kEstimateAlignCounts
static const Uint8 kMaxSpotId
@ eCSRAAnnotChunk_pileup_graph
std::ofstream out("events_result.xml")
main entry point for tests
static const struct name_t names[]
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
SStrictId_Tax::TId TTaxId
Taxon id type.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
#define LOG_POST_X(err_subcode, message)
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Warning(CExceptionArgs_Base &args)
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
void Info(CExceptionArgs_Base &args)
static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)
Assemble a path from basic components.
#define MSerial_AsnText
I/O stream manipulators â.
CConstRef< CSeq_id > GetSeqId(void) const
void Reset(void)
Reset the handle (remove seq-id reference)
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
string AsString(void) const
CSeq_id::E_Choice Which(void) const
string GetLabel(const CSeq_id &id)
string ToString(void) const
EChoice
main blob is blob with sequence all other blobs are external and contain external annotations
@ eExtFeatures
external features
@ eExtAnnot
all external annotations
@ eExtAlign
external aligns
@ eAll
all blobs (main and external)
@ eOrphanAnnot
all external annotations if no Bioseq exists
@ eGraph
graph annotations from main blob
@ eAnnot
all annotations from main blob
@ eBioseq
main blob with complete bioseq
@ eAlign
aligns from main blob
@ eBioseqCore
main blob with bioseq core (no seqdata and annots)
@ eExtGraph
external graph annotations
@ eFeatures
features from main blob
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
#define NCBI_PARAM_TYPE(section, name)
Generate typename for a parameter from its {section, name} attributes.
@ eParam_NoThread
Do not use per-thread values.
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
TThisType & SetToOpen(position_type toOpen)
TThisType & SetLength(position_type length)
static TThisType GetWhole(void)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
NCBI_NS_STD::string::size_type SIZE_TYPE
const_iterator end() const
Return an iterator to the string's ending position (one past the end of the represented sequence)
const char * data(void) const
Return a pointer to the array represented.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Start(void)
Start the timer.
static const char label[]
void SetFrom(TFrom value)
Assign a value to From data member.
TFrom GetFrom(void) const
Get the From member data.
bool IsStr(void) const
Check if variant Str is selected.
const TTag & GetTag(void) const
Get the Tag member data.
const TDb & GetDb(void) const
Get the Db member data.
const TStr & GetStr(void) const
Get the variant data.
void SetTo(TTo value)
Assign a value to To data member.
void SetId(TId &value)
Assign a value to Id data member.
void SetFrom(TFrom value)
Assign a value to From data member.
@ e_General
for other databases
void SetTitle(const TTitle &value)
Assign a value to Title data member.
void SetNumval(TNumval value)
Assign a value to Numval data member.
void SetGraph(TGraph &value)
Assign a value to Graph data member.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
TSet & SetSet(void)
Select the variant.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
void SetId(TId &value)
Assign a value to Id data member.
TSeq & SetSeq(void)
Select the variant.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
void SetData(TData &value)
Assign a value to Data data member.
const TGraph & GetGraph(void) const
Get the variant data.
void SetDesc(TDesc &value)
Assign a value to Desc data member.
TName & SetName(void)
Select the variant.
list< CRef< CSeq_id > > TId
const TData & GetData(void) const
Get the Data member data.
@ eMol_na
just a nucleic acid
unsigned int
A callback function used to compare two keys in a database.
Definition of all error codes used in SRA C++ support libraries.
constexpr auto sort(_Init &&init)
constexpr bool empty(list< Ts... >) noexcept
double value_type
The numeric datatype used by the parser.
string s_Value(TValue value)
const GenericPointer< typename T::ValueType > T2 value
#define NCBI_CONST_UINT8(v)
void SleepMilliSec(unsigned long ml_sec, EInterruptOnSignal onsignal=eRestartOnSignal)
Helper classes and templates to implement plugins.
bool GetEffectiveQualityGraphs(void) const
int GetEffectiveMinMapQuality(void) const
int GetEffectiveSpotGroups(void) const
bool GetEffectiveSpotReadAlign(void) const
bool GetEffectivePileupGraphs(void) const
vector< string > m_CSRAFiles
Better replacement of GetAccVer(), this method should be defined in data loaders, GetAccVer() is left...
Better replacement of GetGi(), this method should be defined in data loaders, GetGi() is left for com...
Better replacement of GetSequenceType(), this method should be defined in data loaders,...
void add_stat(EBaseStat stat, TSeqPos pos)
void get_bytes(EBaseStat stat, CByte_graph::TValues &vv)
void add_match(TSeqPos pos)
pair< unsigned, unsigned > get_min_max(EBaseStat stat) const
void add_insert(TSeqPos pos, TSeqPos count)
void x_add(EBaseStat stat, TSeqPos pos)
bool x_empty(EBaseStat stat) const
void add_base(TSeqPos pos, char b)
void add_base(char b, TSeqPos pos)
void get_ints(EBaseStat stat, CInt_graph::TValues &vv)
void add_match(TSeqPos pos, TSeqPos count)
unsigned x_get(EBaseStat stat, TSeqPos pos) const
void add_stat(EBaseStat stat, TSeqPos pos, TSeqPos count)
TAnnots::iterator m_LastAnnot
ECSRAAnnotChunkIdType m_Type
SChunkAnnots(CCSRAFileInfo *file_info, ECSRAAnnotChunkIdType type)
TSlot & Select(const CCSraAlignIterator &ait)
pair< CRef< CSeq_annot >, SBaseStats > TSlot
void Create(const string &name)
bool m_SeparateSpotGroups
map< string, TSlot > TAnnots
CRef< CCSRAFileInfo > m_File
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
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