[med-svn] [Git][med-team/grabix][upstream] New upstream version 0.1.7
Andreas Tille
gitlab at salsa.debian.org
Sun Oct 28 16:04:55 GMT 2018
Andreas Tille pushed to branch upstream at Debian Med / grabix
Commits:
bb2e5a92 by Andreas Tille at 2018-10-28T13:14:46Z
New upstream version 0.1.7
- - - - -
4 changed files:
- grabix.cpp
- grabix.h
- test.sh
- − tests/empty.fastq.gz
Changes:
=====================================
grabix.cpp
=====================================
@@ -86,7 +86,7 @@ int create_grabix_index(string bgzf_file)
int64_t offset = 0;
while ((status = bgzf_getline(bgzf_fp, '\n', line)) >= 0)
{
- offset = bgzf_tell(bgzf_fp);
+ offset = bgzf_tell (bgzf_fp);
if (line->s[0] != '#')
break;
prev_offset = offset;
@@ -104,10 +104,10 @@ int create_grabix_index(string bgzf_file)
{
// grab the next line and store the offset
eof = bgzf_getline(bgzf_fp, '\n', line);
- offset = bgzf_tell(bgzf_fp);
+ offset = bgzf_tell (bgzf_fp);
chunk_count++;
// stop if we have encountered an empty line
- if (eof < 0 || offset == prev_offset)
+ if (eof <= 0)
{
if (bgzf_check_EOF(bgzf_fp) == 1) {
if (offset > prev_offset) {
@@ -116,7 +116,7 @@ int create_grabix_index(string bgzf_file)
}
break;
}
- break;
+ //break;
}
// store the offset of this chunk start
else if (chunk_count == CHUNK_SIZE)
@@ -214,7 +214,7 @@ int grab(string bgzf_file, int64_t from_line, int64_t to_line)
line->l = 0;
line->m = 0;
- while ((status = bgzf_getline(bgzf_fp, '\n', line)) > 0)
+ while ((status = bgzf_getline(bgzf_fp, '\n', line)) != 0)
{
if (line->s[0] == '#')
printf("%s\n", line->s);
=====================================
grabix.h
=====================================
@@ -7,7 +7,7 @@ using namespace std;
#include "bgzf.h"
-#define VERSION "0.1.8"
+#define VERSION "0.1.7"
// we only want to store the offset for every 10000th
// line. otherwise, were we to store the position of every
// line in the file, the index could become very large for
=====================================
test.sh
=====================================
@@ -9,29 +9,13 @@ echo "indexing"
time ./grabix index $FQ
echo "indexed"
python tests/test-fastq.py $FQ
-a=$(./grabix grab test.cnt.gz $(($lines * 4)))
+a=$(grabix grab test.cnt.gz $(($lines * 4)))
b=$(zless $FQ | tail -1)
if [[ "$a" != "$b" ]]; then
echo FAIL last record
- exit 1
-else
- echo OK last record
fi
rm -f ${FQ}{,.gbi}
-rm -f tests/empty.fastq.gz.gbi
-./grabix index tests/empty.fastq.gz
-
-a=$(cat tests/empty.fastq.gz.gbi | awk 'NR == 2')
-if [[ "$a" != "16" ]]; then
- echo FAIL index wrong size
- exit 1
-else
- echo "OK index size"
-fi
-
-
-
for V in \
test.PLs.vcf \
test.auto_dom.no_parents.2.vcf \
=====================================
tests/empty.fastq.gz deleted
=====================================
Binary files a/tests/empty.fastq.gz and /dev/null differ
View it on GitLab: https://salsa.debian.org/med-team/grabix/commit/bb2e5a92f2d5ce1e285e7dbcef1788384a7c52d2
--
View it on GitLab: https://salsa.debian.org/med-team/grabix/commit/bb2e5a92f2d5ce1e285e7dbcef1788384a7c52d2
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/20181028/eb237f94/attachment-0001.html>
More information about the debian-med-commit
mailing list