New column type for DNA sequences. Only for those coded on 2 bits (only
'ATGCatgc') for now.
This commit is contained in:
@ -533,12 +533,12 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
obidebug(1, "\nCan't create column because of empty column name");
|
||||
return NULL;
|
||||
}
|
||||
if ((data_type < 1) || (data_type > 5))
|
||||
if ((data_type < 1) || (data_type > 6))
|
||||
{
|
||||
obidebug(1, "\nCan't create column because of invalid data type");
|
||||
return NULL;
|
||||
}
|
||||
if ((data_type == 5) && (array_name == NULL))
|
||||
if (((data_type == 5) || (data_type == 6)) && (array_name == NULL))
|
||||
{
|
||||
obidebug(1, "\nCan't create column because of empty array name");
|
||||
return NULL;
|
||||
@ -701,8 +701,8 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
if (comments != NULL)
|
||||
strncpy(header->comments, comments, COMMENTS_MAX_LENGTH);
|
||||
|
||||
// If the data type is OBI_IDX, the associated obi_array is opened or created
|
||||
if (data_type == 5)
|
||||
// If the data type is OBI_STR or OBI_SEQ, the associated obi_array is opened or created
|
||||
if ((data_type == 5) || (data_type == 6))
|
||||
{
|
||||
array = obi_array(dms, array_name);
|
||||
if (array == NULL)
|
||||
@ -838,8 +838,8 @@ OBIDMS_column_p obi_open_column(OBIDMS_p dms,
|
||||
|
||||
column->writable = false;
|
||||
|
||||
// If the data type is OBI_IDX, the associated obi_array is opened or created
|
||||
if ((column->header)->data_type == 5)
|
||||
// If the data type is OBI_STR or OBI_SEQ, the associated obi_array is opened or created
|
||||
if (((column->header)->data_type == 5) || ((column->header)->data_type == 6))
|
||||
{
|
||||
array = obi_array(dms, (column->header)->array_name);
|
||||
if (array == NULL)
|
||||
@ -1175,7 +1175,8 @@ void obi_ini_to_NA_values(OBIDMS_column_p column,
|
||||
}
|
||||
break;
|
||||
|
||||
case OBI_IDX: for (i=start;i<end;i++)
|
||||
case OBI_STR:
|
||||
case OBI_SEQ: for (i=start;i<end;i++)
|
||||
{
|
||||
*(((index_t*) (column->data)) + i) = OBIIdx_NA;
|
||||
}
|
||||
|
Reference in New Issue
Block a user