[med-svn] [Git][med-team/libtabixpp][upstream] New upstream version 1.1.2
Andreas Tille (@tille)
gitlab at salsa.debian.org
Thu Jan 19 08:59:11 GMT 2023
Andreas Tille pushed to branch upstream at Debian Med / libtabixpp
Commits:
7a71f0f6 by Andreas Tille at 2023-01-19T09:54:36+01:00
New upstream version 1.1.2
- - - - -
1 changed file:
- tabix.hpp
Changes:
=====================================
tabix.hpp
=====================================
@@ -1,3 +1,5 @@
+#pragma once
+
#include <string>
#include <stdlib.h>
#include <sys/stat.h>
@@ -24,6 +26,30 @@ class Tabix {
bool has_jumped;
vector<string>::iterator current_chrom;
+ /* uncompressed file pos
+ off_t hts_utell1(htsFile *fp)
+ {
+ if (fp->is_bgzf) {
+ return bgzf_htell(fp->fp.bgzf);
+ }
+ else
+ return htell(fp->fp.hfile);
+ }
+ */
+
+ // Get file position in compressed file - really on disk
+ off_t bgzf_htell1(BGZF *fp) {
+ if (fp->mt) {
+ return -1; // skip if multithreading
+ //pthread_mutex_lock(&fp->mt->job_pool_m);
+ //off_t pos = fp->block_address + fp->block_clength;
+ //pthread_mutex_unlock(&fp->mt->job_pool_m);
+ //return pos;
+ } else {
+ return htell(fp->fp);
+ }
+}
+
public:
string filename;
vector<string> chroms;
@@ -37,5 +63,6 @@ public:
bool setRegion(string& region);
bool getNextLine(string& line);
bool getNextLineKS();
-
+ // Specialised function gets actual file position when using bgzf
+ long file_pos() { return bgzf_htell1(fn->fp.bgzf); };
};
View it on GitLab: https://salsa.debian.org/med-team/libtabixpp/-/commit/7a71f0f6097fbe173e40288ffbfece2d02b3bc09
--
View it on GitLab: https://salsa.debian.org/med-team/libtabixpp/-/commit/7a71f0f6097fbe173e40288ffbfece2d02b3bc09
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230119/e3b275ff/attachment-0001.htm>
More information about the debian-med-commit
mailing list