63 "&mode=AssemblyOnly" +
73 return "dev.ncbi.nlm.nih.gov";
75 return "www.ncbi.nlm.nih.gov";
81 return "/projects/sviewer/seqconfig.cgi";
106 for (
const auto&
a : it->second)
125 best_acc = it->second;
145 static void s_GetAccessions(
const string& seqAcc, list<string>& accessions,
string& best_acc)
150 string url =
"https://" + host + path +
"?" + params;
151 string errMsg =
"s_GetAccessions: " + url;
161 if (res->CanGetAssm_accs())
162 accessions = res->GetAssm_accs();
163 if (res->CanGetAssm_acc_best())
164 best_acc = res->GetAssm_acc_best();
173 for (
const auto& acc : accessions) {
174 if (!assmaccs.empty()) assmaccs +=
",";
181 string url =
"https://" + host + path +
"?" + params;
182 string errMsg =
"s_GetAssemblies: " + url;
190 if (res && res->CanGetAssemblies())
191 assemblies = res->GetAssemblies();
206 list<string> toLoadCopy = std::move(
m_ToLoad);
209 for (
const auto& seqAcc : toLoadCopy) {
216 list<string> accessions;
218 vector<string> toLoad;
223 if (!best_acc.empty()) {
225 }
else if (!accessions.empty()) {
228 for (
const auto& acc : accessions) {
230 toLoad.push_back(acc);
234 list<CRef<objects::CGC_Assembly> > assemblies;
240 for (
auto a : assemblies)
244 for (
const auto& acc : accessions) {
270 list<string>::const_iterator it2 = find(
m_ToLoad.begin(),
m_ToLoad.end(), seqAcc);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static string s_GetHost()
static string s_GetPath()
static string s_GetAssmInfoParams(const string &assmaccs)
static void s_GetAccessions(const string &seqAcc, list< string > &accessions, string &best_acc)
static string s_GetAssmAccsParams(const string &seqAcc)
static void s_GetAssemblies(const vector< string > &accessions, list< CRef< objects::CGC_Assembly > > &assemblies)
bool GetBestAssemblyAcc(const string &seqAcc, string &best_acc)
map< string, vector< string > > m_MolMap
void x_Load(const string &seqAcc)
std::condition_variable m_QueueCheck
map< string, string > m_BestAccMap
bool GetAssemblies(const string &seqAcc, list< CRef< objects::CGC_Assembly > > &assAcc)
map< string, CRef< objects::CGC_Assembly > > m_AssMap
static CAssemblyCache & GetInstance()
CRef< CWorkerThread > m_WorkerThread
CNcbiIstream & GetResponseStream()
CObjectIStreamAsnBinary –.
const_iterator end() const
const_iterator find(const key_type &key) const
#define NCBI_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string URLEncode(const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars)
URL-encode string.