New column type for DNA sequences. Only for those coded on 2 bits (only

'ATGCatgc') for now.
This commit is contained in:
Celine Mercier
2015-11-19 18:12:48 +01:00
parent e371248567
commit 6ab1c83302
17 changed files with 860 additions and 29 deletions

View File

@ -29,7 +29,7 @@
*/
#define ARRAY_GROWTH_FACTOR (2) /**< The growth factor when an array is enlarged.
*/
#define BYTE_ARRAY_HEADER_SIZE (5) /**< The size of the header of a byte array.
#define BYTE_ARRAY_HEADER_SIZE (9) /**< The size of the header of a byte array.
*/
@ -284,5 +284,34 @@ byte_t* obi_str_to_obibytes(char* value);
const char* obi_obibytes_to_str(byte_t* value_b);
/**
* @brief Converts a DNA sequence to a byte array with a header.
*
* @warning The byte array must be freed by the caller.
*
* @param value The DNA sequence to convert.
*
* @returns A pointer to the byte array created.
* @retval NULL if an error occurred.
*
* @since November 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
byte_t* obi_seq_to_obibytes(char* seq);
/**
* @brief Converts a byte array to a DNA sequence.
*
* @param value_b The byte array to convert.
*
* @returns A pointer to the DNA sequence contained in the byte array.
*
* @since November 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
const char* obi_obibytes_to_seq(byte_t* value_b);
#endif /* OBIARRAY_H_ */