68 return "NHGRI GWAS catalog";
112 }
else if (
depth >= 0){
127 if(iter.
size() != 1) {
161 int pos_start, pos_end;
163 string title, comment;
175 for(
int row = pos_start; row < pos_end; ++row ) {
177 if(res->m_SigEntry.
Empty()) {
178 res->m_SigEntry = BinEntry;
181 res->m_SigEntry = BinEntry;
184 res->m_EntryList.push_back(BinEntry);
215 int snpid, ClinSigID;
217 string trait, pmids, rgenes, mgenes;
218 string title, comment, population;
222 string dbgaptext, geneName;
226 if(col_pos.
TryGet(annot, row, pos)) {
230 entry->
trackSubType = col_sub_type.
TryGet(annot, row, trackSubType) ? trackSubType :
"";
231 entry->
snpid = col_snpid.
TryGet(annot, row, snpid) ? (
unsigned int)snpid : 0;
232 entry->
pvalue = (col_val.
TryGet(annot, row, pvalue) || col_val_synonym.
TryGet(annot, row, pvalue)) ? pvalue : 0;
233 entry->
trait = col_trait.
TryGet(annot, row, trait) ? trait :
"";
234 entry->
pmids = col_pmids.
TryGet(annot, row, pmids) ? pmids :
"";
237 entry->
ClinSigID = col_clinsigid.
TryGet(annot, row, ClinSigID) ? ClinSigID : -1;
238 entry->
sHGVS = col_hgvs.
TryGet(annot, row, sHGVS) ? sHGVS :
"";
239 entry->
dbgaptext = col_dbgaptext.
TryGet(annot, row, dbgaptext) ? dbgaptext :
"";
240 entry->
context = col_context.
TryGet(annot, row, context) ? context :
"";
242 entry->
population = col_population.
TryGet(annot, row, population) ? population :
"";
243 entry->
geneName = col_geneName.
TryGet(annot, row, geneName) ? geneName :
"";
245 entry->
geneId = col_geneId.
TryGet(annot, row, geneId) ? geneId : -1;
247 entry->
geneStringId = col_geneStringId.
TryGet(annot, row, geneStringId) ? geneStringId :
"";
256 list<string> GeneSymIDPairsList;
260 ITERATE(list<string>, iGeneSymIDPairsList, GeneSymIDPairsList) {
261 list<string> GeneSymIDPair;
263 m_GeneMap[GeneSymIDPair.front()] = GeneSymIDPair.
size() == 2 ? GeneSymIDPair.back() :
string();
272 sRes += (sRes.empty() ?
"" :
":") + iGeneMap->first +
"^" + iGeneMap->second;
279 int pos_value_from,
int pos_value_to,
280 int& pos_index_begin,
int& pos_index_end)
286 pos_index_begin = -1;
287 pos_index_end = rows-1;
290 col_sub_type.
TryGet(annot, 0, trackSubType);
296 int lower_pos_index_bound = 0;
297 int upper_pos_index_bound = rows-1;
301 pos_index_k = (lower_pos_index_bound + upper_pos_index_bound)/2;
302 col_pos_end.
TryGet(annot, pos_index_k, pos_value_k);
303 if(pos_value_k < pos_value_from) {
304 pos_index_begin = pos_index_k;
305 lower_pos_index_bound = pos_index_k+1;
307 upper_pos_index_bound = pos_index_k-1;
309 }
while (pos_value_k != pos_value_from && lower_pos_index_bound <= upper_pos_index_bound);
312 pos_index_begin = (pos_value_from == pos_value_k ? pos_index_k : pos_index_begin+1);
315 int SlidingBegin(pos_index_begin-1);
316 while(SlidingBegin >= 0) {
317 col_pos_end.
TryGet(annot, SlidingBegin, pos_value_k);
318 if(pos_value_k < pos_value_from)
320 pos_index_begin = SlidingBegin;
325 lower_pos_index_bound=0;
326 upper_pos_index_bound=rows-1;
329 pos_index_k = (lower_pos_index_bound+upper_pos_index_bound)/2;
330 col_pos.
TryGet(annot, pos_index_k, pos_value_k);
331 if (pos_value_k < pos_value_to) {
332 lower_pos_index_bound = pos_index_k+1;
335 pos_index_end = pos_index_k;
336 upper_pos_index_bound = pos_index_k-1;
338 }
while (pos_value_k != pos_value_to && lower_pos_index_bound <= upper_pos_index_bound);
341 size_t SlidingEnd(pos_index_end);
342 while(SlidingEnd < rows) {
343 col_pos.
TryGet(annot, SlidingEnd, pos_value_k);
344 if(pos_value_k > pos_value_to)
346 pos_index_end = SlidingEnd+1;
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Checksum and hash calculation classes.
bool TryGet(const CFeat_CI &feat_ci, Value &v) const
void x_Init(const string &sSrc)
string AsString() const
recreate the string that was used for creation
static int ChooseSignificant(const SBinEntry *entry1, const SBinEntry *entry2, TBinType type)
choose a more significant entry of the two offered
static void GetBinSelector(const string &sTrackAccession, bool isAdaptive, int depth, objects::SAnnotSelector &sel)
get a selector for a bin from a NA track accession
static bool GetBinHandle(objects::CScope &scope, const objects::SAnnotSelector &sel, const objects::CSeq_loc &loc, objects::CSeq_annot_Handle &annot)
get an annotation handle that is needed to load a singular bin on range
static CRef< SBin > GetBin(const objects::CSeq_annot_Handle &annot, TSeqRange range)
get a singular bin corresponding to a position range
static void ReadAnnotDesc(const objects::CSeq_annot_Handle &handle, string &title, string &comment)
get title and comment out of annot.desc
@ eCLIN
Clinical Variations.
@ eGAP
dbGaP analysis files
static bool isGeneMarker(const string &trackSubType)
determine whether a string in TrackSubType describes a Gene Marker ("102_1" or "102_3")
static void FindPosIndexRange(const objects::CSeq_annot_Handle &annot, int pos_value_from, int pos_value_to, int &pos_index_begin, int &pos_index_end)
Perform iterative binary search to find table indexes (rows) 'pos_index_begin' and 'pos_index_end' in...
static string SourceAsString(TSource Source)
get human-readable text for various source types
static CRef< SBinEntry > GetEntry(const objects::CSeq_annot_Handle &annot, int row)
get a bin entry corresponding to a row position in the table presumed contained within the handle
static unsigned char depth[2 *(256+1+29)+1]
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
size_t GetSeq_tableNumRows(void) const
const CSeq_annot::TDesc & Seq_annot_GetDesc(void) const
bool Seq_annot_CanGetDesc(void) const
SAnnotSelector & SetExactDepth(bool value=true)
SetExactDepth() specifies that annotations will be searched on the segment level specified by SetReso...
SAnnotSelector & SetResolveAll(void)
SetResolveAll() is equivalent to SetResolveMethod(eResolve_All).
SAnnotSelector & SetOverlapTotalRange(void)
Check overlapping only of total ranges.
size_t size(void) const
Get number of collected Seq-annots.
SAnnotSelector & SetAdaptiveDepth(bool value=true)
SetAdaptiveDepth() requests to restrict subsegment resolution depending on annotations found on lower...
SAnnotSelector & SetResolveDepth(int depth)
SetResolveDepth sets the limit of subsegment resolution in searching annotations.
SAnnotSelector & IncludeNamedAnnotAccession(const string &acc, int zoom_level=0)
SAnnotSelector & SetAnnotType(TAnnotType type)
Set annotation type (feat, align, graph)
SAnnotSelector & AddNamedAnnots(const CAnnotName &name)
Add named annot to set of annots names to look for.
void Reset(void)
Reset reference object.
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
const Tdata & Get(void) const
Get the member data.
bool IsComment(void) const
Check if variant Comment is selected.
const TTitle & GetTitle(void) const
Get the variant data.
const TComment & GetComment(void) const
Get the variant data.
bool IsTitle(void) const
Check if variant Title is selected.
list< CRef< CAnnotdesc > > Tdata
@ eClinical_significance_probable_pathogenic
@ eClinical_significance_pathogenic
unsigned int
A callback function used to compare two keys in a database.
range(_Ty, _Ty) -> range< _Ty >
const CharType(& source)[N]
TSeqPos pos_end
gene end when trackSubType is (Gene association)
string geneStringId
when external Gene IDs are used, it can be a string
string geneName
gene name when trackSubType is (Gene association)
string dbgaptext
specially formatted, see document
string population
population description for GWAS/pha tracks
string genes_reported
specially formatted, see document
int ClinSigID
clinical significance ID,
string trackSubType
used to further differentiate some GWAS/pha tracks (see SV-2201)
string genes_mapped
specially formatted, see document
string pmids
comma-delimited list of PubMed IDs
TSeqPos pos
! arrange member names as in the dumped file
int geneId
gene ID when trackSubType is (Gene association)