vector<CSeq_id_Handle> ids;
65ids.push_back(id_hdl);
67vector<CBioseq_Handle> bshs = scope.GetBioseqHandles(ids);
68 autobsh_it = bshs.begin();
69 for(
autoit =
entries.begin(); it !=
entries.end(); ++it, ++bsh_it) {
72 if(se.
IsSeq() && *bsh_it) {
77 if(entry_len == wellknown_seqvec.
size()) {
78 stringentry_seq, wellknown_seq;
79entry_seqvec.
GetSeqData(0, entry_len, entry_seq);
80wellknown_seqvec.
GetSeqData(0, entry_len, wellknown_seq);
81 if(entry_seq == wellknown_seq)
103list< CRef< CSeq_entry > > &seq_set = bss.
SetSeq_set();
106list< CRef< CSeq_entry > > &old_seq_set = old_bss.
SetSeq_set();
107list<ESeqStatus>
stats;
109 autost_it =
stats.begin();
110 for(
autoit = old_seq_set.begin(); it != old_seq_set.end(); ++it, ++st_it) {
116 if(ids.size() > 1) {
117 auto id= ids.begin();
118ids.erase(++
id, ids.end());
121vector<string> parts;
125 if(!acc.empty()) str_id = acc;
128 if(parts.rbegin()->empty()) {
131 stringlcl_id =
"lcl|mod_"+
NStr::Join(parts,
"-");
133mapper.AddMapping(sih, lcl_hndl);
134 if(
nullptr!= local_ids) {
139seq_set.push_back(se);
141 else if(
nullptr!= wellknown_ids) {
143wellknown_ids->push_back(sih.
GetSeqId());
150mapper.MapObject(bss);
156 if(local_ids.empty())
159vector<CRef<CSeq_entry> >
entries;
165entry.SetSet().SetSeq_set()) {
171vector<CSeq_id_Handle> ids;
182 autoit_id = local_ids.find(id_hdl.
GetSeqId());
183 if(it_id == local_ids.end())
187bioseqs[it_id->second] = &seq->SetSeq();
190vector<CBioseq_Handle> bshs = scope.GetBioseqHandles(ids);
191 for(
auto&bsh : bshs) {
192 autobioseq = bioseqs.
find(bsh.GetSeqId());
193 if(bioseq == bioseqs.
end())
195 CopyOrg(bsh, *(bioseq->second));
208 if(
nullptr== biosrc)
217descr->
SetOrg(*org_copy);
219destination.
SetDescr().Set().push_back(descr);
225 if((fasta_id.find(
"mod_") == string::npos) && (fasta_id.find(
"rng_") == string::npos))
228vector<string> to_replace{
"lcl|",
"mod_",
"rng_"};
230 for(
const auto&search : to_replace)
233vector<string> parts;
235 for(
const auto&item : parts) {
236 if(item.length() < 5)
const_iterator end() const
const_iterator find(const key_type &key) const
void CopyOrg(const CBioseq_Handle &source, CBioseq &destination)
CRef< CSeq_id > IdentifyLocalId(const string &fasta_id)
Tries to identify the specified local id (works for ids, prefixed with rng_ or mod_,...
CRef< CSeq_entry > ReplaceWellknownSeqs(CSeq_entry &entry, CScope &scope, vector< CConstRef< CSeq_id >> *wellknown_ids, TSeq_idMap *local_ids)
void GetSeqsStatus(list< CRef< CSeq_entry > > &entries, CScope &scope, list< ESeqStatus > &stat)
void UpdateOrgInformation(objects::CSeq_entry &entry, objects::CScope &scope, const TSeq_idMap &local_ids)
Updates the organism information for the Seq-entry object by copying the information from a well-know...
std::map< CConstRef< objects::CSeq_id >, CConstRef< objects::CSeq_id >, CompareSeq_ids > TSeq_idMap
Maps local ids to well-known ones.
ESeqStatus
Status of the FASTA sequence.
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)
Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...
CConstRef< CSeq_id > GetSeqId(void) const
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
string AsString(void) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
const CBioSource * GetBioSource(const CBioseq &bioseq)
Retrieve the BioSource object for a given bioseq handle.
string GetAccessionForGi(TGi gi, CScope &scope, EAccessionVersion use_version=eWithAccessionVersion, EGetIdType flags=0)
Retrieve the accession for a given GI.
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
#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.
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.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
bool CanGetOrg(void) const
Check if it is safe to call GetOrg method.
const TOrg & GetOrg(void) const
Get the Org member data.
const TSeq & GetSeq(void) const
Get the variant data.
TSet & SetSet(void)
Select the variant.
bool CanGetAnnot(void) const
Check if it is safe to call GetAnnot method.
bool CanGetSeq_set(void) const
Check if it is safe to call GetSeq_set method.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
bool IsSeq(void) const
Check if variant Seq is selected.
list< CRef< CSeq_entry > > TSeq_set
TSeq & SetSeq(void)
Select the variant.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
TId & SetId(void)
Assign a value to Id data member.
TOrg & SetOrg(void)
Select the variant.
const TId & GetId(void) const
Get the Id member data.
list< CRef< CSeq_id > > TId
bool CanGetId(void) const
Check if it is safe to call GetId method.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
const CharType(& source)[N]
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Compares ids as FASTA strings.
static wxAcceleratorEntry entries[3]
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