Loading grabix.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) Loading Loading @@ -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); Loading grabix.h +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading test.sh +1 −17 Original line number Diff line number Diff line Loading @@ -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 \ Loading tests/empty.fastq.gzdeleted 100644 → 0 −79 B File deleted. View file Loading
grabix.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) Loading Loading @@ -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); Loading
grabix.h +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
test.sh +1 −17 Original line number Diff line number Diff line Loading @@ -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 \ Loading