Added possibility to specify the offset for encoding and decoding
sequence quality character strings
This commit is contained in:
@ -2942,11 +2942,11 @@ obiint_t obi_get_int_with_elt_name_and_col_name_in_view(Obiview_p view, const ch
|
||||
|
||||
/*********** FOR QUAL COLUMNS ***********/
|
||||
|
||||
int obi_set_qual_char_with_elt_idx_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, index_t element_idx, const char* value)
|
||||
int obi_set_qual_char_with_elt_idx_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, index_t element_idx, const char* value, int offset)
|
||||
{
|
||||
if (prepare_to_set_value_in_column(view, &column, &line_nb) < 0)
|
||||
return -1;
|
||||
return obi_column_set_obiqual_char_with_elt_idx(column, line_nb, element_idx, value);
|
||||
return obi_column_set_obiqual_char_with_elt_idx(column, line_nb, element_idx, value, offset);
|
||||
}
|
||||
|
||||
|
||||
@ -2958,11 +2958,11 @@ int obi_set_qual_int_with_elt_idx_and_col_p_in_view(Obiview_p view, OBIDMS_colum
|
||||
}
|
||||
|
||||
|
||||
char* obi_get_qual_char_with_elt_idx_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, index_t element_idx)
|
||||
char* obi_get_qual_char_with_elt_idx_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, index_t element_idx, int offset)
|
||||
{
|
||||
if (prepare_to_get_value_from_column(view, &line_nb) < 0)
|
||||
return OBIQual_char_NA;
|
||||
return obi_column_get_obiqual_char_with_elt_idx(column, line_nb, element_idx);
|
||||
return obi_column_get_obiqual_char_with_elt_idx(column, line_nb, element_idx, offset);
|
||||
}
|
||||
|
||||
|
||||
@ -2974,12 +2974,12 @@ const uint8_t* obi_get_qual_int_with_elt_idx_and_col_p_in_view(Obiview_p view, O
|
||||
}
|
||||
|
||||
|
||||
int obi_set_qual_char_with_elt_name_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, const char* element_name, const char* value)
|
||||
int obi_set_qual_char_with_elt_name_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, const char* element_name, const char* value, int offset)
|
||||
{
|
||||
index_t element_idx = obi_column_get_element_index_from_name(column, element_name);
|
||||
if (element_idx == OBIIdx_NA)
|
||||
return -1;
|
||||
return obi_set_qual_char_with_elt_idx_and_col_p_in_view(view, column, line_nb, element_idx, value);
|
||||
return obi_set_qual_char_with_elt_idx_and_col_p_in_view(view, column, line_nb, element_idx, value, offset);
|
||||
}
|
||||
|
||||
|
||||
@ -2992,12 +2992,12 @@ int obi_set_qual_int_with_elt_name_and_col_p_in_view(Obiview_p view, OBIDMS_colu
|
||||
}
|
||||
|
||||
|
||||
char* obi_get_qual_char_with_elt_name_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, const char* element_name)
|
||||
char* obi_get_qual_char_with_elt_name_and_col_p_in_view(Obiview_p view, OBIDMS_column_p column, index_t line_nb, const char* element_name, int offset)
|
||||
{
|
||||
index_t element_idx = obi_column_get_element_index_from_name(column, element_name);
|
||||
if (element_idx == OBIIdx_NA)
|
||||
return OBIQual_char_NA;
|
||||
return obi_get_qual_char_with_elt_idx_and_col_p_in_view(view, column, line_nb, element_idx);
|
||||
return obi_get_qual_char_with_elt_idx_and_col_p_in_view(view, column, line_nb, element_idx, offset);
|
||||
}
|
||||
|
||||
|
||||
@ -3010,43 +3010,43 @@ const uint8_t* obi_get_qual_int_with_elt_name_and_col_p_in_view(Obiview_p view,
|
||||
}
|
||||
|
||||
|
||||
int obi_set_qual_char_with_elt_name_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, const char* element_name, const char* value)
|
||||
int obi_set_qual_char_with_elt_name_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, const char* element_name, const char* value, int offset)
|
||||
{
|
||||
OBIDMS_column_p column_p;
|
||||
column_p = obi_view_get_column(view, column_name);
|
||||
if (column_p == NULL)
|
||||
return -1;
|
||||
return obi_set_qual_char_with_elt_name_and_col_p_in_view(view, column_p, line_nb, element_name, value);
|
||||
return obi_set_qual_char_with_elt_name_and_col_p_in_view(view, column_p, line_nb, element_name, value, offset);
|
||||
}
|
||||
|
||||
|
||||
int obi_set_qual_char_with_elt_idx_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, index_t element_idx, const char* value)
|
||||
int obi_set_qual_char_with_elt_idx_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, index_t element_idx, const char* value, int offset)
|
||||
{
|
||||
OBIDMS_column_p column_p;
|
||||
column_p = obi_view_get_column(view, column_name);
|
||||
if (column_p == NULL)
|
||||
return -1;
|
||||
return obi_set_qual_char_with_elt_idx_and_col_p_in_view(view, column_p, line_nb, element_idx, value);
|
||||
return obi_set_qual_char_with_elt_idx_and_col_p_in_view(view, column_p, line_nb, element_idx, value, offset);
|
||||
}
|
||||
|
||||
|
||||
char* obi_get_qual_char_with_elt_idx_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, index_t element_idx)
|
||||
char* obi_get_qual_char_with_elt_idx_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, index_t element_idx, int offset)
|
||||
{
|
||||
OBIDMS_column_p column_p;
|
||||
column_p = obi_view_get_column(view, column_name);
|
||||
if (column_p == NULL)
|
||||
return OBIQual_char_NA;
|
||||
return obi_get_qual_char_with_elt_idx_and_col_p_in_view(view, column_p, line_nb, element_idx);
|
||||
return obi_get_qual_char_with_elt_idx_and_col_p_in_view(view, column_p, line_nb, element_idx, offset);
|
||||
}
|
||||
|
||||
|
||||
char* obi_get_qual_char_with_elt_name_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, const char* element_name)
|
||||
char* obi_get_qual_char_with_elt_name_and_col_name_in_view(Obiview_p view, const char* column_name, index_t line_nb, const char* element_name, int offset)
|
||||
{
|
||||
OBIDMS_column_p column_p;
|
||||
column_p = obi_view_get_column(view, column_name);
|
||||
if (column_p == NULL)
|
||||
return OBIQual_char_NA;
|
||||
return obi_get_qual_char_with_elt_name_and_col_p_in_view(view, column_p, line_nb, element_name);
|
||||
return obi_get_qual_char_with_elt_name_and_col_p_in_view(view, column_p, line_nb, element_name, offset);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user