Fixed and cleaned DNA_seq_indexer API
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user