.AppendString(seq_id_str);
62 id.AppendString(bed_id);
65 id.AppendInteger(seq_len);
66 id.AppendHost(remote_path);
67 stringlmd = last_modified;
71 id.AppendString(lmd);
75 return id.ToString();
82 if(cache_key.empty())
89 m_SeqId= field_seq_id.GetString();
92 autofield_id = field_seq_id.GetNextNeighbor();
96 autofield_len = field_id.GetNextNeighbor();
97 m_SeqLen= (size_t)field_len.GetInteger();
100 autofield_path = field_len.GetNextNeighbor();
119: m_SeqId(
data.m_SeqId)
120, m_RemoteId(
data.m_RemoteId)
121, m_SeqLen(
data.m_SeqLen)
122, m_RemotePath(
data.m_RemotePath)
123, m_LastModified(
data.m_LastModified)
124, m_DataKey(
data.m_DataKey)
125, m_Data(
data.m_Data)
139 size_tblob_size = 0;
142}
catch(exception& e) {
149is.read(
reinterpret_cast<char*
>(&from),
sizeof(from));
150 if(is.gcount() == 0)
152is.read(
reinterpret_cast<char*
>(&to),
sizeof(to));
153 if(is.gcount() == 0)
155 m_Data.emplace_back(from, to);
158}
catch(exception& e) {
173 void s_GetData(
const string& data_url,
const string& chrom,
const string& length, vector<TSeqRange>& ranges)
184sTmpFilename.c_str(),
192 if(ExitCode == -1) {
207is.read(
reinterpret_cast<char*
>(&from),
sizeof(from));
208 if(is.gcount() == 0)
211is.read(
reinterpret_cast<char*
>(&to),
sizeof(to));
213ranges.emplace_back(from, to);
220 for(
const auto&
r:
m_Data) {
221 uint32_tfrom =
r.GetFrom(), to =
r.GetTo();
222w.write(
reinterpret_cast<char*
>(&from),
sizeof(from));
224w.write(
reinterpret_cast<char*
>(&to),
sizeof(to));
244 for(
const auto&
r:
m_Data) {
245 if(
r.GetTo() <= range.
GetFrom())
247 if(
r.GetFrom() >= range.
GetTo())
249 data.emplace_back(max<int>(range.
GetFrom(),
r.GetFrom()), min<int>(range.
GetTo(),
r.GetTo()));
Serialization / compression of bvector<>. Set theoretical operations on compressed BLOBs.
Serialization for sparse_vector<>
Checksum and hash calculation classes.
CChecksum â Checksum calculator.
Pool of recycled CCompoundID objects.
CCompoundID NewID(ECompoundIDClass new_id_class)
Create and return a new CCompoundID objects.
CCompoundID FromString(const string &cid)
Unpack the base64-encoded ID and return a CCompoundID object for field extraction.
CCompoundIDField GetFirst(ECompoundIDFieldType field_type)
Return the first field of the specified type or NULL if this compound ID contains no fields of such t...
The result type for Spawn methods.
Guard that can be used to automatically return object to the pool after leaving some scope.
Extended exit information for waited process.
Note about the "buf_size" parameter for streams in this API.
@ fOwnReader
Own the underlying reader.
@ fOwnWriter
Own the underlying writer.
@ ESuggestedAction_Access
try to access the remote file
@ ESuggestedAction_Skip
do not access the file
static void Set(const string &sKey, ESuggestedAction KnownAccessibility)
static ESuggestedAction Check(const string &sKey)
void x_InitData(ICache &icache)
void GetData(const TSeqRange &range, vector< TSeqRange > &data)
void x_SaveData(ICache &icache)
void Init(TGraphCachePool &icache_pool)
Save is invoked by CGraphCache when cached data needs to be permanently saved into NetCache.
string m_LastModified
timestamp of the remote data last modified date as reported by www server
string m_RemotePath
path to remote data or srz accession
CVcfHeatmap(const string &cache_key)
Copy constructor is invoked by CGraphCache which clones the data for aynchroneous saving operation.
mutex m_DataMutex
data access mutex
static string GetCacheKey(objects::CScope &scope, const objects::CSeq_id &seq_id, const string &bed_id, const string &remote_path, const string &last_modified=NcbiEmptyString)
CVcfHeatmap.
void Save(TGraphCachePool &icache_pool)
vector< TSeqRange > m_Data
Writer-based output stream.
BLOB cache read/write/maintenance interface.
virtual IWriter * GetWriteStream(const string &key, TBlobVersion version, const string &subkey, unsigned int time_to_live=0, const string &owner=kEmptyStr)=0
Return sequential stream interface to write BLOB data.
string GetHexSum(void) const
Return string with checksum in hexadecimal form.
void AddLine(const char *line, size_t len)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Error(CExceptionArgs_Base &args)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static CResult SpawnL(EMode mode, const char *cmdname, const char *argv,...)
Spawn a new process with specified command-line arguments.
TProcessHandle GetProcessHandle(void)
Get process handle/pid.
@ eNoWait
Continues to execute calling process concurrently with new process (asynchronous spawn).
static fstream * CreateTmpFile(const string &filename=kEmptyStr, ETextBinary text_binary=eBinary, EAllowRead allow_read=eAllowRead)
Create temporary file and return pointer to corresponding stream.
static string GetTmpName(ETmpFileCreationMode mode=eTmpFileGetName)
Get temporary file name.
@ eTmpFileCreate
Create empty file for each GetTmpName* call.
static void GetLastModified(const string &url, string &last_modified)
HTTP: Returns header's Last-Modified in the last_modified parameter FTP: Returns MD5 of first 512 byt...
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
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.
CSeq_id_Handle GetAccVer(const CSeq_id_Handle &idh, TGetFlags flags=0)
Get accession.version Seq-id Returns null CSeq_id_Handle if the sequence is not found or if it doesn'...
TSeqPos GetSequenceLength(const CSeq_id &id, TGetFlags flags=0)
Get sequence length Return kInvalidSeqPos if sequence is not found.
int Wait(unsigned long timeout=kInfiniteTimeoutMs, CExitInfo *info=0) const
Wait until process terminates.
int GetExitCode(void) const
Get process exit code.
@ eHandle
A process handle (MS Windows).
position_type GetLength(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
Defines a portable execute class.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Reader-writer based streams.
void s_GetData(const string &data_url, const string &chrom, const string &length, vector< TSeqRange > &ranges)
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