Major update: New column type to store sequence qualities. Closes #41
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* @file obidsmcolumn_qual.h
|
||||
* @author Celine Mercier
|
||||
* @date May 4th 2016
|
||||
* @brief Header file for the functions handling OBIColumns containing data in the form of indices referring to sequence quality arrays.
|
||||
* @brief Header file for the functions handling OBIColumns containing data in the form of indices referring to sequence qualities.
|
||||
*/
|
||||
|
||||
|
||||
@ -22,6 +22,12 @@
|
||||
#include "obitypes.h"
|
||||
|
||||
|
||||
#define QUALITY_ASCII_BASE (33) /**< The ASCII base of sequence quality.
|
||||
* Used to convert sequence qualities from characters to integers
|
||||
* and the other way around.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets a value in an OBIDMS column containing data in the form of indices referring
|
||||
* to sequence qualities handled by an indexer, and using the index of the element in the column's line.
|
||||
@ -56,7 +62,8 @@ int obi_column_set_obiqual_char_with_elt_idx(OBIDMS_column_p column, index_t lin
|
||||
* @param column A pointer as returned by obi_create_column() or obi_clone_column().
|
||||
* @param line_nb The number of the line where the value should be set.
|
||||
* @param element_idx The index of the element that should be set in the line.
|
||||
* @param value The value that should be set, in the integer format.
|
||||
* @param value The value that should be set, in the integer array format.
|
||||
* @param value_length The length of the integer array.
|
||||
*
|
||||
* @returns An integer value indicating the success of the operation.
|
||||
* @retval 0 on success.
|
||||
@ -65,7 +72,7 @@ int obi_column_set_obiqual_char_with_elt_idx(OBIDMS_column_p column, index_t lin
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
int obi_column_set_obiqual_int_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, uint8_t* value);
|
||||
int obi_column_set_obiqual_int_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, const uint8_t* value, int value_length);
|
||||
|
||||
|
||||
/**
|
||||
@ -79,7 +86,7 @@ int obi_column_set_obiqual_int_with_elt_idx(OBIDMS_column_p column, index_t line
|
||||
* @param element_idx The index of the element that should be recovered in the line.
|
||||
*
|
||||
* @returns The recovered value, in the character string format.
|
||||
* @retval OBIQual_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
* @retval OBIQual_str_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
@ -96,14 +103,15 @@ char* obi_column_get_obiqual_char_with_elt_idx(OBIDMS_column_p column, index_t l
|
||||
* @param column A pointer as returned by obi_create_column().
|
||||
* @param line_nb The number of the line where the value should be recovered.
|
||||
* @param element_idx The index of the element that should be recovered in the line.
|
||||
* @param value_length A pointer on an integer to store the length of the integer array recovered.
|
||||
*
|
||||
* @returns The recovered value, in the integer format.
|
||||
* @retval OBIQual_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
* @returns The recovered value, in the integer array format.
|
||||
* @retval OBIQual_int_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
uint8_t* obi_column_get_obiqual_int_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx);
|
||||
const uint8_t* obi_column_get_obiqual_int_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, int* value_length);
|
||||
|
||||
|
||||
/**
|
||||
@ -133,7 +141,7 @@ int obi_column_set_obiqual_char_with_elt_name(OBIDMS_column_p column, index_t li
|
||||
* @brief Sets a value in an OBIDMS column containing data in the form of indices referring
|
||||
* to sequence qualities handled by an indexer, and using the index of the element in the column's line.
|
||||
*
|
||||
* This function is for quality scores in the integer format.
|
||||
* This function is for quality scores in the integer array format.
|
||||
*
|
||||
* @warning Pointers returned by obi_open_column() don't allow writing.
|
||||
*
|
||||
@ -141,6 +149,7 @@ int obi_column_set_obiqual_char_with_elt_name(OBIDMS_column_p column, index_t li
|
||||
* @param line_nb The number of the line where the value should be set.
|
||||
* @param element_name The name of the element that should be set in the line.
|
||||
* @param value The value that should be set, in the integer format.
|
||||
* @param value_length The length of the integer array.
|
||||
*
|
||||
* @returns An integer value indicating the success of the operation.
|
||||
* @retval 0 on success.
|
||||
@ -149,7 +158,7 @@ int obi_column_set_obiqual_char_with_elt_name(OBIDMS_column_p column, index_t li
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
int obi_column_set_obiqual_int_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name, uint8_t* value);
|
||||
int obi_column_set_obiqual_int_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name, const uint8_t* value, int value_length);
|
||||
|
||||
|
||||
/**
|
||||
@ -163,7 +172,7 @@ int obi_column_set_obiqual_int_with_elt_name(OBIDMS_column_p column, index_t lin
|
||||
* @param element_name The name of the element that should be recovered in the line.
|
||||
*
|
||||
* @returns The recovered value, in the character string format.
|
||||
* @retval OBIQual_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
* @retval OBIQual_str_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
@ -175,19 +184,20 @@ char* obi_column_get_obiqual_char_with_elt_name(OBIDMS_column_p column, index_t
|
||||
* @brief Recovers a value in an OBIDMS column containing data in the form of indices referring
|
||||
* to sequence qualities handled by an indexer, and using the index of the element in the column's line.
|
||||
*
|
||||
* This function returns quality scores in the integer format.
|
||||
* This function returns quality scores in the integer array format.
|
||||
*
|
||||
* @param column A pointer as returned by obi_create_column() or obi_clone_column().
|
||||
* @param line_nb The number of the line where the value should be recovered.
|
||||
* @param element_name The name of the element that should be recovered in the line.
|
||||
* @param value_length A pointer on an integer to store the length of the integer array recovered.
|
||||
*
|
||||
* @returns The recovered value, in the integer format.
|
||||
* @retval OBIQual_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
* @retval OBIQual_int_NA the NA value of the type if an error occurred and obi_errno is set.
|
||||
*
|
||||
* @since May 2016
|
||||
* @author Celine Mercier (celine.mercier@metabarcoding.org)
|
||||
*/
|
||||
utin8_t* obi_column_get_obiqual_int_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name);
|
||||
const uint8_t* obi_column_get_obiqual_int_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name, int* value_length);
|
||||
|
||||
|
||||
#endif /* OBIDMSCOLUMN_QUAL_H_ */
|
||||
|
Reference in New Issue
Block a user