Commit bb2e5a92 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 0.1.7

parent 4a49cae3
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ int create_grabix_index(string bgzf_file)
        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);
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −17
Original line number Diff line number Diff line
@@ -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

deleted100644 → 0
−79 B

File deleted.