Fixed and cleaned DNA_seq_indexer API

This commit is contained in:
Celine Mercier
2016-04-12 17:20:24 +02:00
parent be05c889e2
commit 04c9470f7d
2 changed files with 8 additions and 17 deletions

View File

@ -16,7 +16,8 @@
#include "obiblob.h"
#include "obiblob_indexer.h"
#include "obidms.h"
#include "obidebug.h"
#include "obitypes.h"
#define DEBUG_LEVEL 0 // TODO has to be defined somewhere else (cython compil flag?)
@ -91,16 +92,11 @@ index_t obi_index_dna_seq(Obi_indexer_p indexer, const char* value)
char* obi_retrieve_dna_seq(Obi_indexer_p indexer, index_t idx)
{
Obi_blob_p value_b;
char* seq;
// Get encoded value
value_b = obi_indexer_get(indexer, idx);
// Decode sequence
seq = obi_blob_to_seq(value_b);
free(value_b);
return seq;
// Return decoded sequence
return obi_blob_to_seq(value_b);
}