]> git.donarmstrong.com Git - fastq-tools.git/blobdiff - src/parse.c
Sort by gc content and mean quality score, and seededing of random sort.
[fastq-tools.git] / src / parse.c
index 560578fb0a45135dc8184638efefd19ad809f809..71b4c2af6916c929b253723c25071fe060c7d9d5 100644 (file)
@@ -142,9 +142,18 @@ uint32_t murmurhash3(uint32_t seed, const uint8_t* data, size_t len_)
 }
 
 
+static uint32_t seq_hash_seed = 0xc062fb4a;
+
+
+void seq_hash_set_seed(uint32_t seed)
+{
+    seq_hash_seed = seed;
+}
+
+
 uint32_t seq_hash(const seq_t* seq)
 {
-    uint32_t h = 0xc062fb4a; /* random seed */
+    uint32_t h = seq_hash_seed;
     h = murmurhash3(h, (uint8_t*) seq->id1.s, seq->id1.n);
     h = murmurhash3(h, (uint8_t*) seq->seq.s, seq->seq.n);
     h = murmurhash3(h, (uint8_t*) seq->id2.s, seq->id2.n);